UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

124 lines (123 loc) 5.11 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a CloudWatch Logs destination policy resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const testDestination = new aws.cloudwatch.LogDestination("test_destination", { * name: "test_destination", * roleArn: iamForCloudwatch.arn, * targetArn: kinesisForCloudwatch.arn, * }); * const testDestinationPolicy = aws.iam.getPolicyDocumentOutput({ * statements: [{ * effect: "Allow", * principals: [{ * type: "AWS", * identifiers: ["123456789012"], * }], * actions: ["logs:PutSubscriptionFilter"], * resources: [testDestination.arn], * }], * }); * const testDestinationPolicyLogDestinationPolicy = new aws.cloudwatch.LogDestinationPolicy("test_destination_policy", { * destinationName: testDestination.name, * accessPolicy: testDestinationPolicy.apply(testDestinationPolicy => testDestinationPolicy.json), * }); * ``` * * ## Import * * Using `pulumi import`, import CloudWatch Logs destination policies using the `destination_name`. For example: * * ```sh * $ pulumi import aws:cloudwatch/logDestinationPolicy:LogDestinationPolicy test_destination_policy test_destination * ``` */ export declare class LogDestinationPolicy extends pulumi.CustomResource { /** * Get an existing LogDestinationPolicy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LogDestinationPolicyState, opts?: pulumi.CustomResourceOptions): LogDestinationPolicy; /** * Returns true if the given object is an instance of LogDestinationPolicy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is LogDestinationPolicy; /** * The policy document. This is a JSON formatted string. */ readonly accessPolicy: pulumi.Output<string>; /** * A name for the subscription filter */ readonly destinationName: pulumi.Output<string>; /** * Specify true if you are updating an existing destination policy to grant permission to an organization ID instead of granting permission to individual AWS accounts. */ readonly forceUpdate: pulumi.Output<boolean | undefined>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * Create a LogDestinationPolicy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: LogDestinationPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LogDestinationPolicy resources. */ export interface LogDestinationPolicyState { /** * The policy document. This is a JSON formatted string. */ accessPolicy?: pulumi.Input<string>; /** * A name for the subscription filter */ destinationName?: pulumi.Input<string>; /** * Specify true if you are updating an existing destination policy to grant permission to an organization ID instead of granting permission to individual AWS accounts. */ forceUpdate?: pulumi.Input<boolean>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; } /** * The set of arguments for constructing a LogDestinationPolicy resource. */ export interface LogDestinationPolicyArgs { /** * The policy document. This is a JSON formatted string. */ accessPolicy: pulumi.Input<string>; /** * A name for the subscription filter */ destinationName: pulumi.Input<string>; /** * Specify true if you are updating an existing destination policy to grant permission to an organization ID instead of granting permission to individual AWS accounts. */ forceUpdate?: pulumi.Input<boolean>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; }