UNPKG

@pulumi/aws

Version:

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

212 lines (211 loc) • 9.36 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a DocumentDB event subscription resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.docdb.Cluster("example", { * clusterIdentifier: "example", * availabilityZones: [ * available.names[0], * available.names[1], * available.names[2], * ], * masterUsername: "foo", * masterPassword: "mustbeeightcharaters", * skipFinalSnapshot: true, * }); * const exampleTopic = new aws.sns.Topic("example", {name: "example-events"}); * const exampleEventSubscription = new aws.docdb.EventSubscription("example", { * name: "example", * enabled: true, * eventCategories: [ * "creation", * "failure", * ], * sourceType: "db-cluster", * sourceIds: [example.id], * snsTopicArn: exampleTopic.arn, * }); * ``` * * ## Import * * Using `pulumi import`, import DocumentDB Event Subscriptions using the `name`. For example: * * ```sh * $ pulumi import aws:docdb/eventSubscription:EventSubscription example event-sub * ``` */ export declare class EventSubscription extends pulumi.CustomResource { /** * Get an existing EventSubscription 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?: EventSubscriptionState, opts?: pulumi.CustomResourceOptions): EventSubscription; /** * Returns true if the given object is an instance of EventSubscription. 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 EventSubscription; /** * The Amazon Resource Name of the DocumentDB event notification subscription */ readonly arn: pulumi.Output<string>; /** * The AWS customer account associated with the DocumentDB event notification subscription */ readonly customerAwsId: pulumi.Output<string>; /** * A boolean flag to enable/disable the subscription. Defaults to true. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/documentdb/latest/developerguide/API_Event.html or run `aws docdb describe-event-categories`. */ readonly eventCategories: pulumi.Output<string[] | undefined>; /** * The name of the DocumentDB event subscription. By default generated by this provider. */ readonly name: pulumi.Output<string>; /** * The name of the DocumentDB event subscription. Conflicts with `name`. */ readonly namePrefix: pulumi.Output<string>; /** * 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>; readonly snsTopicArn: pulumi.Output<string>; /** * A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a sourceType must also be specified. */ readonly sourceIds: pulumi.Output<string[] | undefined>; /** * The type of source that will be generating the events. Valid options are `db-instance`, `db-cluster`, `db-parameter-group`, `db-security-group`,` db-cluster-snapshot`. If not set, all sources will be subscribed to. */ readonly sourceType: pulumi.Output<string | undefined>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Create a EventSubscription 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: EventSubscriptionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EventSubscription resources. */ export interface EventSubscriptionState { /** * The Amazon Resource Name of the DocumentDB event notification subscription */ arn?: pulumi.Input<string>; /** * The AWS customer account associated with the DocumentDB event notification subscription */ customerAwsId?: pulumi.Input<string>; /** * A boolean flag to enable/disable the subscription. Defaults to true. */ enabled?: pulumi.Input<boolean>; /** * A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/documentdb/latest/developerguide/API_Event.html or run `aws docdb describe-event-categories`. */ eventCategories?: pulumi.Input<pulumi.Input<string>[]>; /** * The name of the DocumentDB event subscription. By default generated by this provider. */ name?: pulumi.Input<string>; /** * The name of the DocumentDB event subscription. Conflicts with `name`. */ namePrefix?: pulumi.Input<string>; /** * 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>; snsTopicArn?: pulumi.Input<string>; /** * A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a sourceType must also be specified. */ sourceIds?: pulumi.Input<pulumi.Input<string>[]>; /** * The type of source that will be generating the events. Valid options are `db-instance`, `db-cluster`, `db-parameter-group`, `db-security-group`,` db-cluster-snapshot`. If not set, all sources will be subscribed to. */ sourceType?: pulumi.Input<string>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; } /** * The set of arguments for constructing a EventSubscription resource. */ export interface EventSubscriptionArgs { /** * A boolean flag to enable/disable the subscription. Defaults to true. */ enabled?: pulumi.Input<boolean>; /** * A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/documentdb/latest/developerguide/API_Event.html or run `aws docdb describe-event-categories`. */ eventCategories?: pulumi.Input<pulumi.Input<string>[]>; /** * The name of the DocumentDB event subscription. By default generated by this provider. */ name?: pulumi.Input<string>; /** * The name of the DocumentDB event subscription. Conflicts with `name`. */ namePrefix?: pulumi.Input<string>; /** * 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>; snsTopicArn: pulumi.Input<string>; /** * A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a sourceType must also be specified. */ sourceIds?: pulumi.Input<pulumi.Input<string>[]>; /** * The type of source that will be generating the events. Valid options are `db-instance`, `db-cluster`, `db-parameter-group`, `db-security-group`,` db-cluster-snapshot`. If not set, all sources will be subscribed to. */ sourceType?: pulumi.Input<string>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }