Launch Darkly v0.0.6 published on Sunday, Feb 19, 2023 by lbrlabs
launchdarkly.getEnvironment
Explore with Pulumi AI
Provides a LaunchDarkly environment data source.
This data source allows you to retrieve environment information from your LaunchDarkly organization.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Launchdarkly = Pulumi.Launchdarkly;
return await Deployment.RunAsync(() =>
{
var example = Launchdarkly.GetEnvironment.Invoke(new()
{
Key = "example-env",
ProjectKey = "example-project",
});
});
package main
import (
"github.com/lbrlabs/pulumi-launchdarkly/sdk/go/launchdarkly"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err = launchdarkly.LookupEnvironment(ctx, &launchdarkly.LookupEnvironmentArgs{
Key: "example-env",
ProjectKey: "example-project",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.launchdarkly.LaunchdarklyFunctions;
import com.pulumi.launchdarkly.inputs.GetEnvironmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = LaunchdarklyFunctions.getEnvironment(GetEnvironmentArgs.builder()
.key("example-env")
.projectKey("example-project")
.build());
}
}
import pulumi
import pulumi_launchdarkly as launchdarkly
example = launchdarkly.get_environment(key="example-env",
project_key="example-project")
import * as pulumi from "@pulumi/pulumi";
import * as launchdarkly from "@pulumi/launchdarkly";
const example = launchdarkly.getEnvironment({
key: "example-env",
projectKey: "example-project",
});
variables:
example:
fn::invoke:
Function: launchdarkly:getEnvironment
Arguments:
key: example-env
projectKey: example-project
Using getEnvironment
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getEnvironment(args: GetEnvironmentArgs, opts?: InvokeOptions): Promise<GetEnvironmentResult>
function getEnvironmentOutput(args: GetEnvironmentOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentResult>
def get_environment(approval_settings: Optional[Sequence[GetEnvironmentApprovalSetting]] = None,
confirm_changes: Optional[bool] = None,
default_track_events: Optional[bool] = None,
default_ttl: Optional[int] = None,
key: Optional[str] = None,
project_key: Optional[str] = None,
require_comments: Optional[bool] = None,
secure_mode: Optional[bool] = None,
tags: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetEnvironmentResult
def get_environment_output(approval_settings: Optional[pulumi.Input[Sequence[pulumi.Input[GetEnvironmentApprovalSettingArgs]]]] = None,
confirm_changes: Optional[pulumi.Input[bool]] = None,
default_track_events: Optional[pulumi.Input[bool]] = None,
default_ttl: Optional[pulumi.Input[int]] = None,
key: Optional[pulumi.Input[str]] = None,
project_key: Optional[pulumi.Input[str]] = None,
require_comments: Optional[pulumi.Input[bool]] = None,
secure_mode: Optional[pulumi.Input[bool]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentResult]
func LookupEnvironment(ctx *Context, args *LookupEnvironmentArgs, opts ...InvokeOption) (*LookupEnvironmentResult, error)
func LookupEnvironmentOutput(ctx *Context, args *LookupEnvironmentOutputArgs, opts ...InvokeOption) LookupEnvironmentResultOutput
> Note: This function is named LookupEnvironment
in the Go SDK.
public static class GetEnvironment
{
public static Task<GetEnvironmentResult> InvokeAsync(GetEnvironmentArgs args, InvokeOptions? opts = null)
public static Output<GetEnvironmentResult> Invoke(GetEnvironmentInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: launchdarkly:index/getEnvironment:getEnvironment
arguments:
# arguments dictionary
The following arguments are supported:
- Key string
- The environment's unique key.
- Project
Key string - The environment's project key.
- Approval
Settings List<Lbrlabs.Pulumi Package. Launchdarkly. Inputs. Get Environment Approval Setting> - Confirm
Changes bool - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - Default
Track boolEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - Default
Ttl int - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- Require
Comments bool - A value of
true
indicates that this environment requires comments for flag and segment changes. - Secure
Mode bool - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - List<string>
- Set of tags associated with the environment.
- Key string
- The environment's unique key.
- Project
Key string - The environment's project key.
- Approval
Settings []GetEnvironment Approval Setting - Confirm
Changes bool - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - Default
Track boolEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - Default
Ttl int - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- Require
Comments bool - A value of
true
indicates that this environment requires comments for flag and segment changes. - Secure
Mode bool - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - []string
- Set of tags associated with the environment.
- key String
- The environment's unique key.
- project
Key String - The environment's project key.
- approval
Settings List<GetEnvironment Approval Setting> - confirm
Changes Boolean - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - default
Track BooleanEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - default
Ttl Integer - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- require
Comments Boolean - A value of
true
indicates that this environment requires comments for flag and segment changes. - secure
Mode Boolean - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - List<String>
- Set of tags associated with the environment.
- key string
- The environment's unique key.
- project
Key string - The environment's project key.
- approval
Settings GetEnvironment Approval Setting[] - confirm
Changes boolean - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - default
Track booleanEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - default
Ttl number - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- require
Comments boolean - A value of
true
indicates that this environment requires comments for flag and segment changes. - secure
Mode boolean - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - string[]
- Set of tags associated with the environment.
- key str
- The environment's unique key.
- project_
key str - The environment's project key.
- approval_
settings Sequence[GetEnvironment Approval Setting] - confirm_
changes bool - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - default_
track_ boolevents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - default_
ttl int - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- require_
comments bool - A value of
true
indicates that this environment requires comments for flag and segment changes. - secure_
mode bool - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - Sequence[str]
- Set of tags associated with the environment.
- key String
- The environment's unique key.
- project
Key String - The environment's project key.
- approval
Settings List<Property Map> - confirm
Changes Boolean - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - default
Track BooleanEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - default
Ttl Number - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- require
Comments Boolean - A value of
true
indicates that this environment requires comments for flag and segment changes. - secure
Mode Boolean - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - List<String>
- Set of tags associated with the environment.
getEnvironment Result
The following output properties are available:
- Api
Key string - The environment's SDK key.
- Approval
Settings List<Lbrlabs.Pulumi Package. Launchdarkly. Outputs. Get Environment Approval Setting> - Client
Side stringId - The environment's client-side ID.
- Color string
- The color swatch as an RGB hex value with no leading
#
. For example:000000
. - Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Mobile
Key string - The environment's mobile key.
- Name string
- The name of the environment.
- Project
Key string - Confirm
Changes bool - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - Default
Track boolEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - Default
Ttl int - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- Require
Comments bool - A value of
true
indicates that this environment requires comments for flag and segment changes. - Secure
Mode bool - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - List<string>
- Set of tags associated with the environment.
- Api
Key string - The environment's SDK key.
- Approval
Settings []GetEnvironment Approval Setting - Client
Side stringId - The environment's client-side ID.
- Color string
- The color swatch as an RGB hex value with no leading
#
. For example:000000
. - Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Mobile
Key string - The environment's mobile key.
- Name string
- The name of the environment.
- Project
Key string - Confirm
Changes bool - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - Default
Track boolEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - Default
Ttl int - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- Require
Comments bool - A value of
true
indicates that this environment requires comments for flag and segment changes. - Secure
Mode bool - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - []string
- Set of tags associated with the environment.
- api
Key String - The environment's SDK key.
- approval
Settings List<GetEnvironment Approval Setting> - client
Side StringId - The environment's client-side ID.
- color String
- The color swatch as an RGB hex value with no leading
#
. For example:000000
. - id String
- The provider-assigned unique ID for this managed resource.
- key String
- mobile
Key String - The environment's mobile key.
- name String
- The name of the environment.
- project
Key String - confirm
Changes Boolean - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - default
Track BooleanEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - default
Ttl Integer - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- require
Comments Boolean - A value of
true
indicates that this environment requires comments for flag and segment changes. - secure
Mode Boolean - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - List<String>
- Set of tags associated with the environment.
- api
Key string - The environment's SDK key.
- approval
Settings GetEnvironment Approval Setting[] - client
Side stringId - The environment's client-side ID.
- color string
- The color swatch as an RGB hex value with no leading
#
. For example:000000
. - id string
- The provider-assigned unique ID for this managed resource.
- key string
- mobile
Key string - The environment's mobile key.
- name string
- The name of the environment.
- project
Key string - confirm
Changes boolean - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - default
Track booleanEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - default
Ttl number - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- require
Comments boolean - A value of
true
indicates that this environment requires comments for flag and segment changes. - secure
Mode boolean - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - string[]
- Set of tags associated with the environment.
- api_
key str - The environment's SDK key.
- approval_
settings Sequence[GetEnvironment Approval Setting] - client_
side_ strid - The environment's client-side ID.
- color str
- The color swatch as an RGB hex value with no leading
#
. For example:000000
. - id str
- The provider-assigned unique ID for this managed resource.
- key str
- mobile_
key str - The environment's mobile key.
- name str
- The name of the environment.
- project_
key str - confirm_
changes bool - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - default_
track_ boolevents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - default_
ttl int - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- require_
comments bool - A value of
true
indicates that this environment requires comments for flag and segment changes. - secure_
mode bool - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - Sequence[str]
- Set of tags associated with the environment.
- api
Key String - The environment's SDK key.
- approval
Settings List<Property Map> - client
Side StringId - The environment's client-side ID.
- color String
- The color swatch as an RGB hex value with no leading
#
. For example:000000
. - id String
- The provider-assigned unique ID for this managed resource.
- key String
- mobile
Key String - The environment's mobile key.
- name String
- The name of the environment.
- project
Key String - confirm
Changes Boolean - A value of
true
indicates that this environment requires confirmation for flag and segment changes. - default
Track BooleanEvents - A value of
true
enables data export for every flag created in this environment. To learn more, read Data Export. - default
Ttl Number - The TTL for the environment. This will be a numeric value between 0 and 60 in minutes. The TTL setting only applies to environments using the PHP SDK. To learn more, read TTL settings.
- require
Comments Boolean - A value of
true
indicates that this environment requires comments for flag and segment changes. - secure
Mode Boolean - A value of true
true
ensures a user of the client-side SDK cannot impersonate another user. - List<String>
- Set of tags associated with the environment.
Supporting Types
GetEnvironmentApprovalSetting
- Can
Apply boolDeclined Changes - Can
Review boolOwn Request - Min
Num intApprovals - Required bool
- List<string>
- Can
Apply boolDeclined Changes - Can
Review boolOwn Request - Min
Num intApprovals - Required bool
- []string
- can
Apply BooleanDeclined Changes - can
Review BooleanOwn Request - min
Num IntegerApprovals - required Boolean
- List<String>
- can
Apply booleanDeclined Changes - can
Review booleanOwn Request - min
Num numberApprovals - required boolean
- string[]
- can_
apply_ booldeclined_ changes - can_
review_ boolown_ request - min_
num_ intapprovals - required bool
- Sequence[str]
- can
Apply BooleanDeclined Changes - can
Review BooleanOwn Request - min
Num NumberApprovals - required Boolean
- List<String>
Package Details
- Repository
- launchdarkly lbrlabs/pulumi-launchdarkly
- License
- Notes
- This Pulumi package is based on the
launchdarkly
Terraform Provider.