Launch Darkly v0.0.6 published on Sunday, Feb 19, 2023 by lbrlabs
launchdarkly.getFeatureFlagEnvironment
Explore with Pulumi AI
Provides a LaunchDarkly environment-specific feature flag data source.
This data source allows you to retrieve environment-specific feature flag information from your LaunchDarkly organization.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Launchdarkly = Pulumi.Launchdarkly;
return await Deployment.RunAsync(() =>
{
var example = Launchdarkly.GetFeatureFlagEnvironment.Invoke(new()
{
EnvKey = "example-env",
FlagId = "example-project/example-flag",
});
});
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.LookupFeatureFlagEnvironment(ctx, &launchdarkly.LookupFeatureFlagEnvironmentArgs{
EnvKey: "example-env",
FlagId: "example-project/example-flag",
}, 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.GetFeatureFlagEnvironmentArgs;
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.getFeatureFlagEnvironment(GetFeatureFlagEnvironmentArgs.builder()
.envKey("example-env")
.flagId("example-project/example-flag")
.build());
}
}
import pulumi
import pulumi_launchdarkly as launchdarkly
example = launchdarkly.get_feature_flag_environment(env_key="example-env",
flag_id="example-project/example-flag")
import * as pulumi from "@pulumi/pulumi";
import * as launchdarkly from "@pulumi/launchdarkly";
const example = launchdarkly.getFeatureFlagEnvironment({
envKey: "example-env",
flagId: "example-project/example-flag",
});
variables:
example:
fn::invoke:
Function: launchdarkly:getFeatureFlagEnvironment
Arguments:
envKey: example-env
flagId: example-project/example-flag
Using getFeatureFlagEnvironment
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 getFeatureFlagEnvironment(args: GetFeatureFlagEnvironmentArgs, opts?: InvokeOptions): Promise<GetFeatureFlagEnvironmentResult>
function getFeatureFlagEnvironmentOutput(args: GetFeatureFlagEnvironmentOutputArgs, opts?: InvokeOptions): Output<GetFeatureFlagEnvironmentResult>
def get_feature_flag_environment(env_key: Optional[str] = None,
fallthrough: Optional[GetFeatureFlagEnvironmentFallthrough] = None,
flag_id: Optional[str] = None,
off_variation: Optional[int] = None,
on: Optional[bool] = None,
prerequisites: Optional[Sequence[GetFeatureFlagEnvironmentPrerequisite]] = None,
rules: Optional[Sequence[GetFeatureFlagEnvironmentRule]] = None,
targets: Optional[Sequence[GetFeatureFlagEnvironmentTarget]] = None,
track_events: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetFeatureFlagEnvironmentResult
def get_feature_flag_environment_output(env_key: Optional[pulumi.Input[str]] = None,
fallthrough: Optional[pulumi.Input[GetFeatureFlagEnvironmentFallthroughArgs]] = None,
flag_id: Optional[pulumi.Input[str]] = None,
off_variation: Optional[pulumi.Input[int]] = None,
on: Optional[pulumi.Input[bool]] = None,
prerequisites: Optional[pulumi.Input[Sequence[pulumi.Input[GetFeatureFlagEnvironmentPrerequisiteArgs]]]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input[GetFeatureFlagEnvironmentRuleArgs]]]] = None,
targets: Optional[pulumi.Input[Sequence[pulumi.Input[GetFeatureFlagEnvironmentTargetArgs]]]] = None,
track_events: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFeatureFlagEnvironmentResult]
func LookupFeatureFlagEnvironment(ctx *Context, args *LookupFeatureFlagEnvironmentArgs, opts ...InvokeOption) (*LookupFeatureFlagEnvironmentResult, error)
func LookupFeatureFlagEnvironmentOutput(ctx *Context, args *LookupFeatureFlagEnvironmentOutputArgs, opts ...InvokeOption) LookupFeatureFlagEnvironmentResultOutput
> Note: This function is named LookupFeatureFlagEnvironment
in the Go SDK.
public static class GetFeatureFlagEnvironment
{
public static Task<GetFeatureFlagEnvironmentResult> InvokeAsync(GetFeatureFlagEnvironmentArgs args, InvokeOptions? opts = null)
public static Output<GetFeatureFlagEnvironmentResult> Invoke(GetFeatureFlagEnvironmentInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFeatureFlagEnvironmentResult> getFeatureFlagEnvironment(GetFeatureFlagEnvironmentArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: launchdarkly:index/getFeatureFlagEnvironment:getFeatureFlagEnvironment
arguments:
# arguments dictionary
The following arguments are supported:
- Env
Key string - The environment key.
- Flag
Id string - The feature flag's unique
id
in the formatproject_key/flag_key
. - Fallthrough
Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Get Feature Flag Environment Fallthrough - Off
Variation int - The index of the variation served when targeting is disabled.
- On bool
- Whether targeting is enabled.
- Prerequisites
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Get Feature Flag Environment Prerequisite> - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- Rules
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Get Feature Flag Environment Rule> - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- Targets
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Get Feature Flag Environment Target> - Track
Events bool - Whether event data will be sent back to LaunchDarkly.
- Env
Key string - The environment key.
- Flag
Id string - The feature flag's unique
id
in the formatproject_key/flag_key
. - Fallthrough
Get
Feature Flag Environment Fallthrough - Off
Variation int - The index of the variation served when targeting is disabled.
- On bool
- Whether targeting is enabled.
- Prerequisites
[]Get
Feature Flag Environment Prerequisite - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- Rules
[]Get
Feature Flag Environment Rule - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- Targets
[]Get
Feature Flag Environment Target - Track
Events bool - Whether event data will be sent back to LaunchDarkly.
- env
Key String - The environment key.
- flag
Id String - The feature flag's unique
id
in the formatproject_key/flag_key
. - fallthrough
Get
Feature Flag Environment Fallthrough - off
Variation Integer - The index of the variation served when targeting is disabled.
- on Boolean
- Whether targeting is enabled.
- prerequisites
List<Get
Feature Flag Environment Prerequisite> - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
List<Get
Feature Flag Environment Rule> - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
List<Get
Feature Flag Environment Target> - track
Events Boolean - Whether event data will be sent back to LaunchDarkly.
- env
Key string - The environment key.
- flag
Id string - The feature flag's unique
id
in the formatproject_key/flag_key
. - fallthrough
Get
Feature Flag Environment Fallthrough - off
Variation number - The index of the variation served when targeting is disabled.
- on boolean
- Whether targeting is enabled.
- prerequisites
Get
Feature Flag Environment Prerequisite[] - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
Get
Feature Flag Environment Rule[] - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
Get
Feature Flag Environment Target[] - track
Events boolean - Whether event data will be sent back to LaunchDarkly.
- env_
key str - The environment key.
- flag_
id str - The feature flag's unique
id
in the formatproject_key/flag_key
. - fallthrough
Get
Feature Flag Environment Fallthrough - off_
variation int - The index of the variation served when targeting is disabled.
- on bool
- Whether targeting is enabled.
- prerequisites
Sequence[Get
Feature Flag Environment Prerequisite] - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
Sequence[Get
Feature Flag Environment Rule] - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
Sequence[Get
Feature Flag Environment Target] - track_
events bool - Whether event data will be sent back to LaunchDarkly.
- env
Key String - The environment key.
- flag
Id String - The feature flag's unique
id
in the formatproject_key/flag_key
. - fallthrough Property Map
- off
Variation Number - The index of the variation served when targeting is disabled.
- on Boolean
- Whether targeting is enabled.
- prerequisites List<Property Map>
- List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules List<Property Map>
- List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets List<Property Map>
- track
Events Boolean - Whether event data will be sent back to LaunchDarkly.
getFeatureFlagEnvironment Result
The following output properties are available:
- Env
Key string - Flag
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Fallthrough
Lbrlabs.
Pulumi Package. Launchdarkly. Outputs. Get Feature Flag Environment Fallthrough - Off
Variation int - The index of the variation served when targeting is disabled.
- On bool
- Whether targeting is enabled.
- Prerequisites
List<Lbrlabs.
Pulumi Package. Launchdarkly. Outputs. Get Feature Flag Environment Prerequisite> - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- Rules
List<Lbrlabs.
Pulumi Package. Launchdarkly. Outputs. Get Feature Flag Environment Rule> - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- Targets
List<Lbrlabs.
Pulumi Package. Launchdarkly. Outputs. Get Feature Flag Environment Target> - Track
Events bool - Whether event data will be sent back to LaunchDarkly.
- Env
Key string - Flag
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Fallthrough
Get
Feature Flag Environment Fallthrough - Off
Variation int - The index of the variation served when targeting is disabled.
- On bool
- Whether targeting is enabled.
- Prerequisites
[]Get
Feature Flag Environment Prerequisite - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- Rules
[]Get
Feature Flag Environment Rule - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- Targets
[]Get
Feature Flag Environment Target - Track
Events bool - Whether event data will be sent back to LaunchDarkly.
- env
Key String - flag
Id String - id String
- The provider-assigned unique ID for this managed resource.
- fallthrough
Get
Feature Flag Environment Fallthrough - off
Variation Integer - The index of the variation served when targeting is disabled.
- on Boolean
- Whether targeting is enabled.
- prerequisites
List<Get
Feature Flag Environment Prerequisite> - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
List<Get
Feature Flag Environment Rule> - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
List<Get
Feature Flag Environment Target> - track
Events Boolean - Whether event data will be sent back to LaunchDarkly.
- env
Key string - flag
Id string - id string
- The provider-assigned unique ID for this managed resource.
- fallthrough
Get
Feature Flag Environment Fallthrough - off
Variation number - The index of the variation served when targeting is disabled.
- on boolean
- Whether targeting is enabled.
- prerequisites
Get
Feature Flag Environment Prerequisite[] - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
Get
Feature Flag Environment Rule[] - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
Get
Feature Flag Environment Target[] - track
Events boolean - Whether event data will be sent back to LaunchDarkly.
- env_
key str - flag_
id str - id str
- The provider-assigned unique ID for this managed resource.
- fallthrough
Get
Feature Flag Environment Fallthrough - off_
variation int - The index of the variation served when targeting is disabled.
- on bool
- Whether targeting is enabled.
- prerequisites
Sequence[Get
Feature Flag Environment Prerequisite] - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
Sequence[Get
Feature Flag Environment Rule] - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
Sequence[Get
Feature Flag Environment Target] - track_
events bool - Whether event data will be sent back to LaunchDarkly.
- env
Key String - flag
Id String - id String
- The provider-assigned unique ID for this managed resource.
- fallthrough Property Map
- off
Variation Number - The index of the variation served when targeting is disabled.
- on Boolean
- Whether targeting is enabled.
- prerequisites List<Property Map>
- List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules List<Property Map>
- List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets List<Property Map>
- track
Events Boolean - Whether event data will be sent back to LaunchDarkly.
Supporting Types
GetFeatureFlagEnvironmentFallthrough
- Bucket
By string - Group percentage rollout by a custom attribute.
- Rollout
Weights List<int> - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - Variation int
- The integer variation index served when the rule clauses evaluate to
true
.
- Bucket
By string - Group percentage rollout by a custom attribute.
- Rollout
Weights []int - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - Variation int
- The integer variation index served when the rule clauses evaluate to
true
.
- bucket
By String - Group percentage rollout by a custom attribute.
- rollout
Weights List<Integer> - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - variation Integer
- The integer variation index served when the rule clauses evaluate to
true
.
- bucket
By string - Group percentage rollout by a custom attribute.
- rollout
Weights number[] - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - variation number
- The integer variation index served when the rule clauses evaluate to
true
.
- bucket_
by str - Group percentage rollout by a custom attribute.
- rollout_
weights Sequence[int] - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - variation int
- The integer variation index served when the rule clauses evaluate to
true
.
- bucket
By String - Group percentage rollout by a custom attribute.
- rollout
Weights List<Number> - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - variation Number
- The integer variation index served when the rule clauses evaluate to
true
.
GetFeatureFlagEnvironmentPrerequisite
GetFeatureFlagEnvironmentRule
- Bucket
By string - Group percentage rollout by a custom attribute.
- Clauses
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Get Feature Flag Environment Rule Clause> - List of nested blocks specifying the logical clauses evaluated. To learn more, read Nested Clauses Blocks.
- Rollout
Weights List<int> - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - Variation int
- The integer variation index served when the rule clauses evaluate to
true
.
- Bucket
By string - Group percentage rollout by a custom attribute.
- Clauses
[]Get
Feature Flag Environment Rule Clause - List of nested blocks specifying the logical clauses evaluated. To learn more, read Nested Clauses Blocks.
- Rollout
Weights []int - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - Variation int
- The integer variation index served when the rule clauses evaluate to
true
.
- bucket
By String - Group percentage rollout by a custom attribute.
- clauses
List<Get
Feature Flag Environment Rule Clause> - List of nested blocks specifying the logical clauses evaluated. To learn more, read Nested Clauses Blocks.
- rollout
Weights List<Integer> - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - variation Integer
- The integer variation index served when the rule clauses evaluate to
true
.
- bucket
By string - Group percentage rollout by a custom attribute.
- clauses
Get
Feature Flag Environment Rule Clause[] - List of nested blocks specifying the logical clauses evaluated. To learn more, read Nested Clauses Blocks.
- rollout
Weights number[] - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - variation number
- The integer variation index served when the rule clauses evaluate to
true
.
- bucket_
by str - Group percentage rollout by a custom attribute.
- clauses
Sequence[Get
Feature Flag Environment Rule Clause] - List of nested blocks specifying the logical clauses evaluated. To learn more, read Nested Clauses Blocks.
- rollout_
weights Sequence[int] - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - variation int
- The integer variation index served when the rule clauses evaluate to
true
.
- bucket
By String - Group percentage rollout by a custom attribute.
- clauses List<Property Map>
- List of nested blocks specifying the logical clauses evaluated. To learn more, read Nested Clauses Blocks.
- rollout
Weights List<Number> - List of integer percentage rollout weights applied to each variation when the rule clauses evaluates to
true
. - variation Number
- The integer variation index served when the rule clauses evaluate to
true
.
GetFeatureFlagEnvironmentRuleClause
- Attribute string
- The user attribute operated on.
- Op string
- The operator associated with the rule clause. This will be one of
in
,endsWith
,startsWith
,matches
,contains
,lessThan
,lessThanOrEqual
,greaterThanOrEqual
,before
,after
,segmentMatch
,semVerEqual
,semVerLessThan
, andsemVerGreaterThan
. - Values List<string>
- The list of values associated with the rule clause.
- Negate bool
- Whether the rule clause is negated.
- Value
Type string - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
.
- Attribute string
- The user attribute operated on.
- Op string
- The operator associated with the rule clause. This will be one of
in
,endsWith
,startsWith
,matches
,contains
,lessThan
,lessThanOrEqual
,greaterThanOrEqual
,before
,after
,segmentMatch
,semVerEqual
,semVerLessThan
, andsemVerGreaterThan
. - Values []string
- The list of values associated with the rule clause.
- Negate bool
- Whether the rule clause is negated.
- Value
Type string - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
.
- attribute String
- The user attribute operated on.
- op String
- The operator associated with the rule clause. This will be one of
in
,endsWith
,startsWith
,matches
,contains
,lessThan
,lessThanOrEqual
,greaterThanOrEqual
,before
,after
,segmentMatch
,semVerEqual
,semVerLessThan
, andsemVerGreaterThan
. - values List<String>
- The list of values associated with the rule clause.
- negate Boolean
- Whether the rule clause is negated.
- value
Type String - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
.
- attribute string
- The user attribute operated on.
- op string
- The operator associated with the rule clause. This will be one of
in
,endsWith
,startsWith
,matches
,contains
,lessThan
,lessThanOrEqual
,greaterThanOrEqual
,before
,after
,segmentMatch
,semVerEqual
,semVerLessThan
, andsemVerGreaterThan
. - values string[]
- The list of values associated with the rule clause.
- negate boolean
- Whether the rule clause is negated.
- value
Type string - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
.
- attribute str
- The user attribute operated on.
- op str
- The operator associated with the rule clause. This will be one of
in
,endsWith
,startsWith
,matches
,contains
,lessThan
,lessThanOrEqual
,greaterThanOrEqual
,before
,after
,segmentMatch
,semVerEqual
,semVerLessThan
, andsemVerGreaterThan
. - values Sequence[str]
- The list of values associated with the rule clause.
- negate bool
- Whether the rule clause is negated.
- value_
type str - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
.
- attribute String
- The user attribute operated on.
- op String
- The operator associated with the rule clause. This will be one of
in
,endsWith
,startsWith
,matches
,contains
,lessThan
,lessThanOrEqual
,greaterThanOrEqual
,before
,after
,segmentMatch
,semVerEqual
,semVerLessThan
, andsemVerGreaterThan
. - values List<String>
- The list of values associated with the rule clause.
- negate Boolean
- Whether the rule clause is negated.
- value
Type String - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
.
GetFeatureFlagEnvironmentTarget
Package Details
- Repository
- launchdarkly lbrlabs/pulumi-launchdarkly
- License
- Notes
- This Pulumi package is based on the
launchdarkly
Terraform Provider.