aws_sdk_codestarnotifications/client/create_notification_rule.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateNotificationRule`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`name(impl Into<String>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::set_name):<br>required: **true**<br><p>The name for the notification rule. Notification rule names must be unique in your Amazon Web Services account.</p><br>
7 /// - [`event_type_ids(impl Into<String>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::event_type_ids) / [`set_event_type_ids(Option<Vec::<String>>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::set_event_type_ids):<br>required: **true**<br><p>A list of event types associated with this notification rule. For a list of allowed events, see <code>EventTypeSummary</code>.</p><br>
8 /// - [`resource(impl Into<String>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::resource) / [`set_resource(Option<String>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::set_resource):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in CodePipeline, repositories in CodeCommit, and build projects in CodeBuild.</p><br>
9 /// - [`targets(Target)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::targets) / [`set_targets(Option<Vec::<Target>>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::set_targets):<br>required: **true**<br><p>A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and Chatbot clients to associate with the notification rule.</p><br>
10 /// - [`detail_type(DetailType)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::detail_type) / [`set_detail_type(Option<DetailType>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::set_detail_type):<br>required: **true**<br><p>The level of detail to include in the notifications for this resource. <code>BASIC</code> will include only the contents of the event as it would appear in Amazon CloudWatch. <code>FULL</code> will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.</p><br>
11 /// - [`client_request_token(impl Into<String>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::client_request_token) / [`set_client_request_token(Option<String>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::set_client_request_token):<br>required: **false**<br><p>A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request with the same parameters is received and a token is included, the request returns information about the initial request that used that token.</p><note> <p>The Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an idempotency token is created for you.</p> </note><br>
12 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::set_tags):<br>required: **false**<br><p>A list of tags to apply to this notification rule. Key names cannot start with "<code>aws</code>".</p><br>
13 /// - [`status(NotificationRuleStatus)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::status) / [`set_status(Option<NotificationRuleStatus>)`](crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::set_status):<br>required: **false**<br><p>The status of the notification rule. The default value is <code>ENABLED</code>. If the status is set to <code>DISABLED</code>, notifications aren't sent for the notification rule.</p><br>
14 /// - On success, responds with [`CreateNotificationRuleOutput`](crate::operation::create_notification_rule::CreateNotificationRuleOutput) with field(s):
15 /// - [`arn(Option<String>)`](crate::operation::create_notification_rule::CreateNotificationRuleOutput::arn): <p>The Amazon Resource Name (ARN) of the notification rule.</p>
16 /// - On failure, responds with [`SdkError<CreateNotificationRuleError>`](crate::operation::create_notification_rule::CreateNotificationRuleError)
17 pub fn create_notification_rule(&self) -> crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder {
18 crate::operation::create_notification_rule::builders::CreateNotificationRuleFluentBuilder::new(self.handle.clone())
19 }
20}