@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
228 lines (227 loc) • 9.72 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a DB event subscription resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const _default = new aws.rds.Instance("default", {
* allocatedStorage: 10,
* engine: "mysql",
* engineVersion: "5.6.17",
* instanceClass: aws.rds.InstanceType.T2_Micro,
* dbName: "mydb",
* username: "foo",
* password: "bar",
* dbSubnetGroupName: "my_database_subnet_group",
* parameterGroupName: "default.mysql5.6",
* });
* const defaultTopic = new aws.sns.Topic("default", {name: "rds-events"});
* const defaultEventSubscription = new aws.rds.EventSubscription("default", {
* name: "rds-event-sub",
* snsTopic: defaultTopic.arn,
* sourceType: "db-instance",
* sourceIds: [_default.identifier],
* eventCategories: [
* "availability",
* "deletion",
* "failover",
* "failure",
* "low storage",
* "maintenance",
* "notification",
* "read replica",
* "recovery",
* "restoration",
* ],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import DB Event Subscriptions using the `name`. For example:
*
* ```sh
* $ pulumi import aws:rds/eventSubscription:EventSubscription default rds-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 RDS event notification subscription
*/
readonly arn: pulumi.Output<string>;
/**
* The AWS customer account associated with the RDS 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 http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html or run `aws rds describe-event-categories`.
*/
readonly eventCategories: pulumi.Output<string[] | undefined>;
/**
* The name of the DB event subscription. By default generated by this provider.
*/
readonly name: pulumi.Output<string>;
/**
* The name of the DB 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>;
/**
* The SNS topic to send events to.
*/
readonly snsTopic: 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-security-group`, `db-parameter-group`, `db-snapshot`, `db-cluster`, `db-cluster-snapshot`, or `db-proxy`. 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 RDS event notification subscription
*/
arn?: pulumi.Input<string>;
/**
* The AWS customer account associated with the RDS 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 http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html or run `aws rds describe-event-categories`.
*/
eventCategories?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The name of the DB event subscription. By default generated by this provider.
*/
name?: pulumi.Input<string>;
/**
* The name of the DB 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>;
/**
* The SNS topic to send events to.
*/
snsTopic?: 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-security-group`, `db-parameter-group`, `db-snapshot`, `db-cluster`, `db-cluster-snapshot`, or `db-proxy`. 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 http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html or run `aws rds describe-event-categories`.
*/
eventCategories?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The name of the DB event subscription. By default generated by this provider.
*/
name?: pulumi.Input<string>;
/**
* The name of the DB 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>;
/**
* The SNS topic to send events to.
*/
snsTopic: 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-security-group`, `db-parameter-group`, `db-snapshot`, `db-cluster`, `db-cluster-snapshot`, or `db-proxy`. 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>;
}>;
}