launchdarkly.getFlagTrigger
Explore with Pulumi AI
Provides a LaunchDarkly flag trigger data source.
Note: Flag triggers are available to customers on an Enterprise LaunchDarkly plan. To learn more, read about our pricing. To upgrade your plan, contact LaunchDarkly Sales.
This data source allows you to retrieve information about flag triggers from your LaunchDarkly organization.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Launchdarkly = Pulumi.Launchdarkly;
return await Deployment.RunAsync(() => 
{
    var example = Launchdarkly.GetFlagTrigger.Invoke(new()
    {
        Id = "<project_key>/<env_key>/<flag_key>/61d490757f7821150815518f",
        Instructions = new Launchdarkly.Inputs.GetFlagTriggerInstructionsInputArgs
        {
            Kind = "turnFlagOff",
        },
        IntegrationKey = "datadog",
    });
});
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.LookupFlagTrigger(ctx, &launchdarkly.LookupFlagTriggerArgs{
			Id: "<project_key>/<env_key>/<flag_key>/61d490757f7821150815518f",
			Instructions: launchdarkly.GetFlagTriggerInstructions{
				Kind: "turnFlagOff",
			},
			IntegrationKey: pulumi.StringRef("datadog"),
		}, 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.GetFlagTriggerArgs;
import com.pulumi.launchdarkly.inputs.GetFlagTriggerInstructionsArgs;
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.getFlagTrigger(GetFlagTriggerArgs.builder()
            .id("<project_key>/<env_key>/<flag_key>/61d490757f7821150815518f")
            .instructions(GetFlagTriggerInstructionsArgs.builder()
                .kind("turnFlagOff")
                .build())
            .integrationKey("datadog")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as launchdarkly from "@pulumi/launchdarkly";
const example = launchdarkly.getFlagTrigger({
    id: "<project_key>/<env_key>/<flag_key>/61d490757f7821150815518f",
    instructions: {
        kind: "turnFlagOff",
    },
    integrationKey: "datadog",
});
import pulumi
import pulumi_launchdarkly as launchdarkly
example = launchdarkly.get_flag_trigger(id="<project_key>/<env_key>/<flag_key>/61d490757f7821150815518f",
    instructions=launchdarkly.GetFlagTriggerInstructionsArgs(
        kind="turnFlagOff",
    ),
    integration_key="datadog")
variables:
  example:
    fn::invoke:
      Function: launchdarkly:getFlagTrigger
      Arguments:
        id: <project_key>/<env_key>/<flag_key>/61d490757f7821150815518f
        instructions:
          kind: turnFlagOff
        integrationKey: datadog
Using getFlagTrigger
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 getFlagTrigger(args: GetFlagTriggerArgs, opts?: InvokeOptions): Promise<GetFlagTriggerResult>
function getFlagTriggerOutput(args: GetFlagTriggerOutputArgs, opts?: InvokeOptions): Output<GetFlagTriggerResult>def get_flag_trigger(enabled: Optional[bool] = None,
                     env_key: Optional[str] = None,
                     flag_key: Optional[str] = None,
                     id: Optional[str] = None,
                     instructions: Optional[GetFlagTriggerInstructions] = None,
                     integration_key: Optional[str] = None,
                     project_key: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFlagTriggerResult
def get_flag_trigger_output(enabled: Optional[pulumi.Input[bool]] = None,
                     env_key: Optional[pulumi.Input[str]] = None,
                     flag_key: Optional[pulumi.Input[str]] = None,
                     id: Optional[pulumi.Input[str]] = None,
                     instructions: Optional[pulumi.Input[GetFlagTriggerInstructionsArgs]] = None,
                     integration_key: Optional[pulumi.Input[str]] = None,
                     project_key: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetFlagTriggerResult]func LookupFlagTrigger(ctx *Context, args *LookupFlagTriggerArgs, opts ...InvokeOption) (*LookupFlagTriggerResult, error)
func LookupFlagTriggerOutput(ctx *Context, args *LookupFlagTriggerOutputArgs, opts ...InvokeOption) LookupFlagTriggerResultOutput> Note: This function is named LookupFlagTrigger in the Go SDK.
public static class GetFlagTrigger 
{
    public static Task<GetFlagTriggerResult> InvokeAsync(GetFlagTriggerArgs args, InvokeOptions? opts = null)
    public static Output<GetFlagTriggerResult> Invoke(GetFlagTriggerInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFlagTriggerResult> getFlagTrigger(GetFlagTriggerArgs args, InvokeOptions options)
public static Output<GetFlagTriggerResult> getFlagTrigger(GetFlagTriggerArgs args, InvokeOptions options)
fn::invoke:
  function: launchdarkly:index/getFlagTrigger:getFlagTrigger
  arguments:
    # arguments dictionaryThe following arguments are supported:
- EnvKey string
- The unique key of the environment the flag trigger will work in.
- FlagKey string
- The unique key of the associated flag.
- Id string
- ProjectKey string
- The unique key of the project encompassing the associated flag.
- Enabled bool
- Whether the trigger is currently active or not.
- Instructions
Lbrlabs.Pulumi Package. Launchdarkly. Inputs. Get Flag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- IntegrationKey string
- The unique identifier of the integration your trigger is set up with.
- EnvKey string
- The unique key of the environment the flag trigger will work in.
- FlagKey string
- The unique key of the associated flag.
- Id string
- ProjectKey string
- The unique key of the project encompassing the associated flag.
- Enabled bool
- Whether the trigger is currently active or not.
- Instructions
GetFlag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- IntegrationKey string
- The unique identifier of the integration your trigger is set up with.
- envKey String
- The unique key of the environment the flag trigger will work in.
- flagKey String
- The unique key of the associated flag.
- id String
- projectKey String
- The unique key of the project encompassing the associated flag.
- enabled Boolean
- Whether the trigger is currently active or not.
- instructions
GetFlag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- integrationKey String
- The unique identifier of the integration your trigger is set up with.
- envKey string
- The unique key of the environment the flag trigger will work in.
- flagKey string
- The unique key of the associated flag.
- id string
- projectKey string
- The unique key of the project encompassing the associated flag.
- enabled boolean
- Whether the trigger is currently active or not.
- instructions
GetFlag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- integrationKey string
- The unique identifier of the integration your trigger is set up with.
- env_key str
- The unique key of the environment the flag trigger will work in.
- flag_key str
- The unique key of the associated flag.
- id str
- project_key str
- The unique key of the project encompassing the associated flag.
- enabled bool
- Whether the trigger is currently active or not.
- instructions
GetFlag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- integration_key str
- The unique identifier of the integration your trigger is set up with.
- envKey String
- The unique key of the environment the flag trigger will work in.
- flagKey String
- The unique key of the associated flag.
- id String
- projectKey String
- The unique key of the project encompassing the associated flag.
- enabled Boolean
- Whether the trigger is currently active or not.
- instructions Property Map
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- integrationKey String
- The unique identifier of the integration your trigger is set up with.
getFlagTrigger Result
The following output properties are available:
- EnvKey string
- The unique key of the environment the flag trigger will work in.
- FlagKey string
- The unique key of the associated flag.
- Id string
- MaintainerId string
- ProjectKey string
- The unique key of the project encompassing the associated flag.
- TriggerUrl string
- Enabled bool
- Whether the trigger is currently active or not.
- Instructions
Lbrlabs.Pulumi Package. Launchdarkly. Outputs. Get Flag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- IntegrationKey string
- The unique identifier of the integration your trigger is set up with.
- EnvKey string
- The unique key of the environment the flag trigger will work in.
- FlagKey string
- The unique key of the associated flag.
- Id string
- MaintainerId string
- ProjectKey string
- The unique key of the project encompassing the associated flag.
- TriggerUrl string
- Enabled bool
- Whether the trigger is currently active or not.
- Instructions
GetFlag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- IntegrationKey string
- The unique identifier of the integration your trigger is set up with.
- envKey String
- The unique key of the environment the flag trigger will work in.
- flagKey String
- The unique key of the associated flag.
- id String
- maintainerId String
- projectKey String
- The unique key of the project encompassing the associated flag.
- triggerUrl String
- enabled Boolean
- Whether the trigger is currently active or not.
- instructions
GetFlag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- integrationKey String
- The unique identifier of the integration your trigger is set up with.
- envKey string
- The unique key of the environment the flag trigger will work in.
- flagKey string
- The unique key of the associated flag.
- id string
- maintainerId string
- projectKey string
- The unique key of the project encompassing the associated flag.
- triggerUrl string
- enabled boolean
- Whether the trigger is currently active or not.
- instructions
GetFlag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- integrationKey string
- The unique identifier of the integration your trigger is set up with.
- env_key str
- The unique key of the environment the flag trigger will work in.
- flag_key str
- The unique key of the associated flag.
- id str
- maintainer_id str
- project_key str
- The unique key of the project encompassing the associated flag.
- trigger_url str
- enabled bool
- Whether the trigger is currently active or not.
- instructions
GetFlag Trigger Instructions 
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- integration_key str
- The unique identifier of the integration your trigger is set up with.
- envKey String
- The unique key of the environment the flag trigger will work in.
- flagKey String
- The unique key of the associated flag.
- id String
- maintainerId String
- projectKey String
- The unique key of the project encompassing the associated flag.
- triggerUrl String
- enabled Boolean
- Whether the trigger is currently active or not.
- instructions Property Map
- Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn"and"turnFlagOff". These can be found on thekindfield nested on theinstructionsattribute.
- integrationKey String
- The unique identifier of the integration your trigger is set up with.
Supporting Types
GetFlagTriggerInstructions   
- Kind string
- Kind string
- kind String
- kind string
- kind str
- kind String
Package Details
- Repository
- launchdarkly lbrlabs/pulumi-launchdarkly
- License
- Notes
- This Pulumi package is based on the launchdarklyTerraform Provider.
