Launch Darkly

v0.0.4 published on Tuesday, Oct 4, 2022 by lbrlabs

AuditLogSubscription

Provides a LaunchDarkly audit log subscription resource.

This resource allows you to create and manage LaunchDarkly audit log subscriptions.

import * as pulumi from "@pulumi/pulumi";
import * as launchdarkly from "@pulumi/launchdarkly";

const example = new launchdarkly.AuditLogSubscription("example", {
    config: {
        api_key: "yoursecretkey",
        host_url: "https://api.datadoghq.com",
    },
    integrationKey: "datadog",
    statements: [{
        actions: ["*"],
        effect: "allow",
        resources: ["proj/*:env/*:flag/*"],
    }],
    tags: [
        "integrations",
        "terraform",
    ],
});
import pulumi
import lbrlabs_pulumi_launchdarkly as launchdarkly

example = launchdarkly.AuditLogSubscription("example",
    config={
        "api_key": "yoursecretkey",
        "host_url": "https://api.datadoghq.com",
    },
    integration_key="datadog",
    statements=[launchdarkly.AuditLogSubscriptionStatementArgs(
        actions=["*"],
        effect="allow",
        resources=["proj/*:env/*:flag/*"],
    )],
    tags=[
        "integrations",
        "terraform",
    ])
using System.Collections.Generic;
using Pulumi;
using Launchdarkly = Lbrlabs.PulumiPackage.Launchdarkly;

return await Deployment.RunAsync(() => 
{
    var example = new Launchdarkly.AuditLogSubscription("example", new()
    {
        Config = 
        {
            { "api_key", "yoursecretkey" },
            { "host_url", "https://api.datadoghq.com" },
        },
        IntegrationKey = "datadog",
        Statements = new[]
        {
            new Launchdarkly.Inputs.AuditLogSubscriptionStatementArgs
            {
                Actions = new[]
                {
                    "*",
                },
                Effect = "allow",
                Resources = new[]
                {
                    "proj/*:env/*:flag/*",
                },
            },
        },
        Tags = new[]
        {
            "integrations",
            "terraform",
        },
    });

});
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.NewAuditLogSubscription(ctx, "example", &launchdarkly.AuditLogSubscriptionArgs{
			Config: pulumi.AnyMap{
				"api_key":  pulumi.Any("yoursecretkey"),
				"host_url": pulumi.Any("https://api.datadoghq.com"),
			},
			IntegrationKey: pulumi.String("datadog"),
			Statements: AuditLogSubscriptionStatementArray{
				&AuditLogSubscriptionStatementArgs{
					Actions: pulumi.StringArray{
						pulumi.String("*"),
					},
					Effect: pulumi.String("allow"),
					Resources: pulumi.StringArray{
						pulumi.String("proj/*:env/*:flag/*"),
					},
				},
			},
			Tags: pulumi.StringArray{
				pulumi.String("integrations"),
				pulumi.String("terraform"),
			},
		})
		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.AuditLogSubscription;
import com.pulumi.launchdarkly.AuditLogSubscriptionArgs;
import com.pulumi.launchdarkly.inputs.AuditLogSubscriptionStatementArgs;
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) {
        var example = new AuditLogSubscription("example", AuditLogSubscriptionArgs.builder()        
            .config(Map.ofEntries(
                Map.entry("api_key", "yoursecretkey"),
                Map.entry("host_url", "https://api.datadoghq.com")
            ))
            .integrationKey("datadog")
            .statements(AuditLogSubscriptionStatementArgs.builder()
                .actions("*")
                .effect("allow")
                .resources("proj/*:env/*:flag/*")
                .build())
            .tags(            
                "integrations",
                "terraform")
            .build());

    }
}
resources:
  example:
    type: launchdarkly:AuditLogSubscription
    properties:
      config:
        api_key: yoursecretkey
        host_url: https://api.datadoghq.com
      integrationKey: datadog
      statements:
        - actions:
            - '*'
          effect: allow
          resources:
            - proj/*:env/*:flag/*
      tags:
        - integrations
        - terraform

Create AuditLogSubscription Resource

new AuditLogSubscription(name: string, args: AuditLogSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def AuditLogSubscription(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         config: Optional[Mapping[str, Any]] = None,
                         integration_key: Optional[str] = None,
                         name: Optional[str] = None,
                         on: Optional[bool] = None,
                         statements: Optional[Sequence[AuditLogSubscriptionStatementArgs]] = None,
                         tags: Optional[Sequence[str]] = None)
@overload
def AuditLogSubscription(resource_name: str,
                         args: AuditLogSubscriptionArgs,
                         opts: Optional[ResourceOptions] = None)
func NewAuditLogSubscription(ctx *Context, name string, args AuditLogSubscriptionArgs, opts ...ResourceOption) (*AuditLogSubscription, error)
public AuditLogSubscription(string name, AuditLogSubscriptionArgs args, CustomResourceOptions? opts = null)
public AuditLogSubscription(String name, AuditLogSubscriptionArgs args)
public AuditLogSubscription(String name, AuditLogSubscriptionArgs args, CustomResourceOptions options)
type: launchdarkly:AuditLogSubscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AuditLogSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AuditLogSubscriptionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AuditLogSubscriptionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuditLogSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AuditLogSubscriptionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AuditLogSubscription Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AuditLogSubscription resource accepts the following input properties:

Config Dictionary<string, object>
IntegrationKey string

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

On bool

Whether or not you want your subscription enabled, i.e. to actively send events.

Statements List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.AuditLogSubscriptionStatementArgs>

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

Name string

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

Tags List<string>

Set of tags associated with the subscription object.

Config map[string]interface{}
IntegrationKey string

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

On bool

Whether or not you want your subscription enabled, i.e. to actively send events.

Statements []AuditLogSubscriptionStatementArgs

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

Name string

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

Tags []string

Set of tags associated with the subscription object.

config Map<String,Object>
integrationKey String

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

on Boolean

Whether or not you want your subscription enabled, i.e. to actively send events.

statements List<AuditLogSubscriptionStatementArgs>

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

name String

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

tags List<String>

Set of tags associated with the subscription object.

config {[key: string]: any}
integrationKey string

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

on boolean

Whether or not you want your subscription enabled, i.e. to actively send events.

statements AuditLogSubscriptionStatementArgs[]

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

name string

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

tags string[]

Set of tags associated with the subscription object.

config Mapping[str, Any]
integration_key str

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

on bool

Whether or not you want your subscription enabled, i.e. to actively send events.

statements Sequence[AuditLogSubscriptionStatementArgs]

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

name str

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

tags Sequence[str]

Set of tags associated with the subscription object.

config Map<Any>
integrationKey String

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

on Boolean

Whether or not you want your subscription enabled, i.e. to actively send events.

statements List<Property Map>

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

name String

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

tags List<String>

Set of tags associated with the subscription object.

Outputs

All input properties are implicitly available as output properties. Additionally, the AuditLogSubscription resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing AuditLogSubscription Resource

Get an existing AuditLogSubscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AuditLogSubscriptionState, opts?: CustomResourceOptions): AuditLogSubscription
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config: Optional[Mapping[str, Any]] = None,
        integration_key: Optional[str] = None,
        name: Optional[str] = None,
        on: Optional[bool] = None,
        statements: Optional[Sequence[AuditLogSubscriptionStatementArgs]] = None,
        tags: Optional[Sequence[str]] = None) -> AuditLogSubscription
func GetAuditLogSubscription(ctx *Context, name string, id IDInput, state *AuditLogSubscriptionState, opts ...ResourceOption) (*AuditLogSubscription, error)
public static AuditLogSubscription Get(string name, Input<string> id, AuditLogSubscriptionState? state, CustomResourceOptions? opts = null)
public static AuditLogSubscription get(String name, Output<String> id, AuditLogSubscriptionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Config Dictionary<string, object>
IntegrationKey string

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

Name string

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

On bool

Whether or not you want your subscription enabled, i.e. to actively send events.

Statements List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.AuditLogSubscriptionStatementArgs>

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

Tags List<string>

Set of tags associated with the subscription object.

Config map[string]interface{}
IntegrationKey string

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

Name string

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

On bool

Whether or not you want your subscription enabled, i.e. to actively send events.

Statements []AuditLogSubscriptionStatementArgs

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

Tags []string

Set of tags associated with the subscription object.

config Map<String,Object>
integrationKey String

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

name String

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

on Boolean

Whether or not you want your subscription enabled, i.e. to actively send events.

statements List<AuditLogSubscriptionStatementArgs>

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

tags List<String>

Set of tags associated with the subscription object.

config {[key: string]: any}
integrationKey string

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

name string

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

on boolean

Whether or not you want your subscription enabled, i.e. to actively send events.

statements AuditLogSubscriptionStatementArgs[]

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

tags string[]

Set of tags associated with the subscription object.

config Mapping[str, Any]
integration_key str

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

name str

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

on bool

Whether or not you want your subscription enabled, i.e. to actively send events.

statements Sequence[AuditLogSubscriptionStatementArgs]

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

tags Sequence[str]

Set of tags associated with the subscription object.

config Map<Any>
integrationKey String

The integration key. As of January 2022, supported integrations are "datadog", "dynatrace", "elastic", "honeycomb", "logdna", "msteams", "new-relic-apm", "signalfx", "slack", and "splunk". A change in this field will force the destruction of the existing resource and the creation of a new one.

name String

A human-friendly name for your audit log subscription viewable from within the LaunchDarkly Integrations page.

on Boolean

Whether or not you want your subscription enabled, i.e. to actively send events.

statements List<Property Map>

A block representing the resources to which you wish to subscribe. To learn more about how to configure these blocks, read Nested Subscription Statements Blocks.

tags List<String>

Set of tags associated with the subscription object.

Supporting Types

AuditLogSubscriptionStatement

Effect string

Either allow or deny. This argument defines whether the statement allows or denies access to the named resources and actions.

Actions List<string>

The list of action specifiers defining the actions to which the statement applies. For a list of available actions, read Using actions.

NotActions List<string>

The list of action specifiers defining the actions to which the statement does not apply. For a list of available actions, read Using actions.

NotResources List<string>

The list of resource specifiers defining the resources to which the statement does not apply. To learn more about how to configure these, read Using resources.

Resources List<string>

The list of resource specifiers defining the resources to which the statement applies. To learn more about how to configure these, read Using resources.

Effect string

Either allow or deny. This argument defines whether the statement allows or denies access to the named resources and actions.

Actions []string

The list of action specifiers defining the actions to which the statement applies. For a list of available actions, read Using actions.

NotActions []string

The list of action specifiers defining the actions to which the statement does not apply. For a list of available actions, read Using actions.

NotResources []string

The list of resource specifiers defining the resources to which the statement does not apply. To learn more about how to configure these, read Using resources.

Resources []string

The list of resource specifiers defining the resources to which the statement applies. To learn more about how to configure these, read Using resources.

effect String

Either allow or deny. This argument defines whether the statement allows or denies access to the named resources and actions.

actions List<String>

The list of action specifiers defining the actions to which the statement applies. For a list of available actions, read Using actions.

notActions List<String>

The list of action specifiers defining the actions to which the statement does not apply. For a list of available actions, read Using actions.

notResources List<String>

The list of resource specifiers defining the resources to which the statement does not apply. To learn more about how to configure these, read Using resources.

resources List<String>

The list of resource specifiers defining the resources to which the statement applies. To learn more about how to configure these, read Using resources.

effect string

Either allow or deny. This argument defines whether the statement allows or denies access to the named resources and actions.

actions string[]

The list of action specifiers defining the actions to which the statement applies. For a list of available actions, read Using actions.

notActions string[]

The list of action specifiers defining the actions to which the statement does not apply. For a list of available actions, read Using actions.

notResources string[]

The list of resource specifiers defining the resources to which the statement does not apply. To learn more about how to configure these, read Using resources.

resources string[]

The list of resource specifiers defining the resources to which the statement applies. To learn more about how to configure these, read Using resources.

effect str

Either allow or deny. This argument defines whether the statement allows or denies access to the named resources and actions.

actions Sequence[str]

The list of action specifiers defining the actions to which the statement applies. For a list of available actions, read Using actions.

not_actions Sequence[str]

The list of action specifiers defining the actions to which the statement does not apply. For a list of available actions, read Using actions.

not_resources Sequence[str]

The list of resource specifiers defining the resources to which the statement does not apply. To learn more about how to configure these, read Using resources.

resources Sequence[str]

The list of resource specifiers defining the resources to which the statement applies. To learn more about how to configure these, read Using resources.

effect String

Either allow or deny. This argument defines whether the statement allows or denies access to the named resources and actions.

actions List<String>

The list of action specifiers defining the actions to which the statement applies. For a list of available actions, read Using actions.

notActions List<String>

The list of action specifiers defining the actions to which the statement does not apply. For a list of available actions, read Using actions.

notResources List<String>

The list of resource specifiers defining the resources to which the statement does not apply. To learn more about how to configure these, read Using resources.

resources List<String>

The list of resource specifiers defining the resources to which the statement applies. To learn more about how to configure these, read Using resources.

Package Details

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

This Pulumi package is based on the launchdarkly Terraform Provider.