1. Packages
  2. Launch Darkly
  3. API Docs
  4. getFlagTrigger
Launch Darkly v0.0.6 published on Sunday, Feb 19, 2023 by lbrlabs

launchdarkly.getFlagTrigger

Explore with Pulumi AI

Launch Darkly v0.0.6 published on Sunday, Feb 19, 2023 by lbrlabs

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",
    });

});
Copy
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
	})
}
Copy
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());

    }
}
Copy
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",
});
Copy
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")
Copy
variables:
  example:
    fn::invoke:
      Function: launchdarkly:getFlagTrigger
      Arguments:
        id: <project_key>/<env_key>/<flag_key>/61d490757f7821150815518f
        instructions:
          kind: turnFlagOff
        integrationKey: datadog
Copy

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>
Copy
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]
Copy
func LookupFlagTrigger(ctx *Context, args *LookupFlagTriggerArgs, opts ...InvokeOption) (*LookupFlagTriggerResult, error)
func LookupFlagTriggerOutput(ctx *Context, args *LookupFlagTriggerOutputArgs, opts ...InvokeOption) LookupFlagTriggerResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetFlagTriggerResult> getFlagTrigger(GetFlagTriggerArgs args, InvokeOptions options)
public static Output<GetFlagTriggerResult> getFlagTrigger(GetFlagTriggerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: launchdarkly:index/getFlagTrigger:getFlagTrigger
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EnvKey
This property is required.
Changes to this property will trigger replacement.
string
The unique key of the environment the flag trigger will work in.
FlagKey
This property is required.
Changes to this property will trigger replacement.
string
The unique key of the associated flag.
Id This property is required. string
ProjectKey
This property is required.
Changes to this property will trigger replacement.
string
The unique key of the project encompassing the associated flag.
Enabled bool
Whether the trigger is currently active or not.
Instructions Lbrlabs.PulumiPackage.Launchdarkly.Inputs.GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
IntegrationKey Changes to this property will trigger replacement. string
The unique identifier of the integration your trigger is set up with.
EnvKey
This property is required.
Changes to this property will trigger replacement.
string
The unique key of the environment the flag trigger will work in.
FlagKey
This property is required.
Changes to this property will trigger replacement.
string
The unique key of the associated flag.
Id This property is required. string
ProjectKey
This property is required.
Changes to this property will trigger replacement.
string
The unique key of the project encompassing the associated flag.
Enabled bool
Whether the trigger is currently active or not.
Instructions GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
IntegrationKey Changes to this property will trigger replacement. string
The unique identifier of the integration your trigger is set up with.
envKey
This property is required.
Changes to this property will trigger replacement.
String
The unique key of the environment the flag trigger will work in.
flagKey
This property is required.
Changes to this property will trigger replacement.
String
The unique key of the associated flag.
id This property is required. String
projectKey
This property is required.
Changes to this property will trigger replacement.
String
The unique key of the project encompassing the associated flag.
enabled Boolean
Whether the trigger is currently active or not.
instructions GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
integrationKey Changes to this property will trigger replacement. String
The unique identifier of the integration your trigger is set up with.
envKey
This property is required.
Changes to this property will trigger replacement.
string
The unique key of the environment the flag trigger will work in.
flagKey
This property is required.
Changes to this property will trigger replacement.
string
The unique key of the associated flag.
id This property is required. string
projectKey
This property is required.
Changes to this property will trigger replacement.
string
The unique key of the project encompassing the associated flag.
enabled boolean
Whether the trigger is currently active or not.
instructions GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
integrationKey Changes to this property will trigger replacement. string
The unique identifier of the integration your trigger is set up with.
env_key
This property is required.
Changes to this property will trigger replacement.
str
The unique key of the environment the flag trigger will work in.
flag_key
This property is required.
Changes to this property will trigger replacement.
str
The unique key of the associated flag.
id This property is required. str
project_key
This property is required.
Changes to this property will trigger replacement.
str
The unique key of the project encompassing the associated flag.
enabled bool
Whether the trigger is currently active or not.
instructions GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
integration_key Changes to this property will trigger replacement. str
The unique identifier of the integration your trigger is set up with.
envKey
This property is required.
Changes to this property will trigger replacement.
String
The unique key of the environment the flag trigger will work in.
flagKey
This property is required.
Changes to this property will trigger replacement.
String
The unique key of the associated flag.
id This property is required. String
projectKey
This property is required.
Changes to this property will trigger replacement.
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 the kind field nested on the instructions attribute.
integrationKey Changes to this property will trigger replacement. 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.PulumiPackage.Launchdarkly.Outputs.GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
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 GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
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 GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
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 GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
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 GetFlagTriggerInstructions
Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are "turnFlagOn" and "turnFlagOff". These can be found on the kind field nested on the instructions attribute.
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 the kind field nested on the instructions attribute.
integrationKey String
The unique identifier of the integration your trigger is set up with.

Supporting Types

GetFlagTriggerInstructions

Kind This property is required. string
Kind This property is required. string
kind This property is required. String
kind This property is required. string
kind This property is required. str
kind This property is required. String

Package Details

Repository
launchdarkly lbrlabs/pulumi-launchdarkly
License
Notes
This Pulumi package is based on the launchdarkly Terraform Provider.
Launch Darkly v0.0.6 published on Sunday, Feb 19, 2023 by lbrlabs