Launch Darkly

v0.0.3 published on Sunday, Sep 18, 2022 by lbrlabs

getEnvironment

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, &GetEnvironmentArgs{
			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 = pulumi.output(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.

ProjectKey string

The environment's project key.

ApprovalSettings List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.GetEnvironmentApprovalSetting>
ConfirmChanges bool

A value of true indicates that this environment requires confirmation for flag and segment changes.

DefaultTrackEvents bool

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

DefaultTtl 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.

RequireComments bool

A value of true indicates that this environment requires comments for flag and segment changes.

SecureMode bool

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

Tags List<string>

Set of tags associated with the environment.

Key string

The environment's unique key.

ProjectKey string

The environment's project key.

ApprovalSettings []GetEnvironmentApprovalSetting
ConfirmChanges bool

A value of true indicates that this environment requires confirmation for flag and segment changes.

DefaultTrackEvents bool

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

DefaultTtl 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.

RequireComments bool

A value of true indicates that this environment requires comments for flag and segment changes.

SecureMode bool

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

Tags []string

Set of tags associated with the environment.

key String

The environment's unique key.

projectKey String

The environment's project key.

approvalSettings List<GetEnvironmentApprovalSetting>
confirmChanges Boolean

A value of true indicates that this environment requires confirmation for flag and segment changes.

defaultTrackEvents Boolean

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

defaultTtl 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.

requireComments Boolean

A value of true indicates that this environment requires comments for flag and segment changes.

secureMode Boolean

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

tags List<String>

Set of tags associated with the environment.

key string

The environment's unique key.

projectKey string

The environment's project key.

approvalSettings GetEnvironmentApprovalSetting[]
confirmChanges boolean

A value of true indicates that this environment requires confirmation for flag and segment changes.

defaultTrackEvents boolean

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

defaultTtl 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.

requireComments boolean

A value of true indicates that this environment requires comments for flag and segment changes.

secureMode boolean

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

tags 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[GetEnvironmentApprovalSetting]
confirm_changes bool

A value of true indicates that this environment requires confirmation for flag and segment changes.

default_track_events bool

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.

tags Sequence[str]

Set of tags associated with the environment.

key String

The environment's unique key.

projectKey String

The environment's project key.

approvalSettings List<Property Map>
confirmChanges Boolean

A value of true indicates that this environment requires confirmation for flag and segment changes.

defaultTrackEvents Boolean

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

defaultTtl 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.

requireComments Boolean

A value of true indicates that this environment requires comments for flag and segment changes.

secureMode Boolean

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

tags List<String>

Set of tags associated with the environment.

getEnvironment Result

The following output properties are available:

ApiKey string

The environment's SDK key.

ApprovalSettings List<Lbrlabs.PulumiPackage.Launchdarkly.Outputs.GetEnvironmentApprovalSetting>
ClientSideId string

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
MobileKey string

The environment's mobile key.

Name string

The name of the environment.

ProjectKey string
ConfirmChanges bool

A value of true indicates that this environment requires confirmation for flag and segment changes.

DefaultTrackEvents bool

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

DefaultTtl 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.

RequireComments bool

A value of true indicates that this environment requires comments for flag and segment changes.

SecureMode bool

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

Tags List<string>

Set of tags associated with the environment.

ApiKey string

The environment's SDK key.

ApprovalSettings []GetEnvironmentApprovalSetting
ClientSideId string

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
MobileKey string

The environment's mobile key.

Name string

The name of the environment.

ProjectKey string
ConfirmChanges bool

A value of true indicates that this environment requires confirmation for flag and segment changes.

DefaultTrackEvents bool

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

DefaultTtl 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.

RequireComments bool

A value of true indicates that this environment requires comments for flag and segment changes.

SecureMode bool

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

Tags []string

Set of tags associated with the environment.

apiKey String

The environment's SDK key.

approvalSettings List<GetEnvironmentApprovalSetting>
clientSideId String

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
mobileKey String

The environment's mobile key.

name String

The name of the environment.

projectKey String
confirmChanges Boolean

A value of true indicates that this environment requires confirmation for flag and segment changes.

defaultTrackEvents Boolean

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

defaultTtl 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.

requireComments Boolean

A value of true indicates that this environment requires comments for flag and segment changes.

secureMode Boolean

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

tags List<String>

Set of tags associated with the environment.

apiKey string

The environment's SDK key.

approvalSettings GetEnvironmentApprovalSetting[]
clientSideId string

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
mobileKey string

The environment's mobile key.

name string

The name of the environment.

projectKey string
confirmChanges boolean

A value of true indicates that this environment requires confirmation for flag and segment changes.

defaultTrackEvents boolean

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

defaultTtl 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.

requireComments boolean

A value of true indicates that this environment requires comments for flag and segment changes.

secureMode boolean

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

tags string[]

Set of tags associated with the environment.

api_key str

The environment's SDK key.

approval_settings Sequence[GetEnvironmentApprovalSetting]
client_side_id str

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_events bool

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.

tags Sequence[str]

Set of tags associated with the environment.

apiKey String

The environment's SDK key.

approvalSettings List<Property Map>
clientSideId String

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
mobileKey String

The environment's mobile key.

name String

The name of the environment.

projectKey String
confirmChanges Boolean

A value of true indicates that this environment requires confirmation for flag and segment changes.

defaultTrackEvents Boolean

A value of true enables data export for every flag created in this environment. To learn more, read Data Export.

defaultTtl 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.

requireComments Boolean

A value of true indicates that this environment requires comments for flag and segment changes.

secureMode Boolean

A value of true true ensures a user of the client-side SDK cannot impersonate another user.

tags List<String>

Set of tags associated with the environment.

Supporting Types

GetEnvironmentApprovalSetting

Package Details

Repository
https://github.com/lbrlabs/pulumi-launchdarkly
License
Notes

This Pulumi package is based on the launchdarkly Terraform Provider.