aws_sdk_rds/client/create_event_subscription.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateEventSubscription`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`subscription_name(impl Into<String>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::subscription_name) / [`set_subscription_name(Option<String>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::set_subscription_name):<br>required: **true**<br><p>The name of the subscription.</p> <p>Constraints: The name must be less than 255 characters.</p><br>
/// - [`sns_topic_arn(impl Into<String>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::sns_topic_arn) / [`set_sns_topic_arn(Option<String>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::set_sns_topic_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the SNS topic created for event notification. SNS automatically creates the ARN when you create a topic and subscribe to it.</p><note> <p>RDS doesn't support FIFO (first in, first out) topics. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html">Message ordering and deduplication (FIFO topics)</a> in the <i>Amazon Simple Notification Service Developer Guide</i>.</p> </note><br>
/// - [`source_type(impl Into<String>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::source_type) / [`set_source_type(Option<String>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::set_source_type):<br>required: **false**<br><p>The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you set this parameter to <code>db-instance</code>. For RDS Proxy events, specify <code>db-proxy</code>. If this value isn't specified, all events are returned.</p> <p>Valid Values:<code> db-instance | db-cluster | db-parameter-group | db-security-group | db-snapshot | db-cluster-snapshot | db-proxy | zero-etl | custom-engine-version | blue-green-deployment </code></p><br>
/// - [`event_categories(impl Into<String>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::event_categories) / [`set_event_categories(Option<Vec::<String>>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::set_event_categories):<br>required: **false**<br><p>A list of event categories for a particular source type (<code>SourceType</code>) that you want to subscribe to. You can see a list of the categories for a given source type in the "Amazon RDS event categories and event messages" section of the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html"> <i>Amazon RDS User Guide</i> </a> or the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Messages.html"> <i>Amazon Aurora User Guide</i> </a>. You can also see this list by using the <code>DescribeEventCategories</code> operation.</p><br>
/// - [`source_ids(impl Into<String>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::source_ids) / [`set_source_ids(Option<Vec::<String>>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::set_source_ids):<br>required: **false**<br><p>The list of identifiers of the event sources for which events are returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens. It can't end with a hyphen or contain two consecutive hyphens.</p> <p>Constraints:</p> <ul> <li> <p>If <code>SourceIds</code> are supplied, <code>SourceType</code> must also be provided.</p></li> <li> <p>If the source type is a DB instance, a <code>DBInstanceIdentifier</code> value must be supplied.</p></li> <li> <p>If the source type is a DB cluster, a <code>DBClusterIdentifier</code> value must be supplied.</p></li> <li> <p>If the source type is a DB parameter group, a <code>DBParameterGroupName</code> value must be supplied.</p></li> <li> <p>If the source type is a DB security group, a <code>DBSecurityGroupName</code> value must be supplied.</p></li> <li> <p>If the source type is a DB snapshot, a <code>DBSnapshotIdentifier</code> value must be supplied.</p></li> <li> <p>If the source type is a DB cluster snapshot, a <code>DBClusterSnapshotIdentifier</code> value must be supplied.</p></li> <li> <p>If the source type is an RDS Proxy, a <code>DBProxyName</code> value must be supplied.</p></li> </ul><br>
/// - [`enabled(bool)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::enabled) / [`set_enabled(Option<bool>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::set_enabled):<br>required: **false**<br><p>Specifies whether to activate the subscription. If the event notification subscription isn't activated, the subscription is created but not active.</p><br>
/// - [`tags(Tag)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::set_tags):<br>required: **false**<br><p>A list of tags.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p><br>
/// - On success, responds with [`CreateEventSubscriptionOutput`](crate::operation::create_event_subscription::CreateEventSubscriptionOutput) with field(s):
/// - [`event_subscription(Option<EventSubscription>)`](crate::operation::create_event_subscription::CreateEventSubscriptionOutput::event_subscription): <p>Contains the results of a successful invocation of the <code>DescribeEventSubscriptions</code> action.</p>
/// - On failure, responds with [`SdkError<CreateEventSubscriptionError>`](crate::operation::create_event_subscription::CreateEventSubscriptionError)
pub fn create_event_subscription(&self) -> crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder {
crate::operation::create_event_subscription::builders::CreateEventSubscriptionFluentBuilder::new(self.handle.clone())
}
}