aws_sdk_shield/client/create_protection.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 [`CreateProtection`](crate::operation::create_protection::builders::CreateProtectionFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`name(impl Into<String>)`](crate::operation::create_protection::builders::CreateProtectionFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_protection::builders::CreateProtectionFluentBuilder::set_name):<br>required: **true**<br><p>Friendly name for the <code>Protection</code> you are creating.</p><br>
7 /// - [`resource_arn(impl Into<String>)`](crate::operation::create_protection::builders::CreateProtectionFluentBuilder::resource_arn) / [`set_resource_arn(Option<String>)`](crate::operation::create_protection::builders::CreateProtectionFluentBuilder::set_resource_arn):<br>required: **true**<br><p>The ARN (Amazon Resource Name) of the resource to be protected.</p> <p>The ARN should be in one of the following formats:</p> <ul> <li> <p>For an Application Load Balancer: <code>arn:aws:elasticloadbalancing:<i>region</i>:<i>account-id</i>:loadbalancer/app/<i>load-balancer-name</i>/<i>load-balancer-id</i> </code></p></li> <li> <p>For an Elastic Load Balancer (Classic Load Balancer): <code>arn:aws:elasticloadbalancing:<i>region</i>:<i>account-id</i>:loadbalancer/<i>load-balancer-name</i> </code></p></li> <li> <p>For an Amazon CloudFront distribution: <code>arn:aws:cloudfront::<i>account-id</i>:distribution/<i>distribution-id</i> </code></p></li> <li> <p>For an Global Accelerator standard accelerator: <code>arn:aws:globalaccelerator::<i>account-id</i>:accelerator/<i>accelerator-id</i> </code></p></li> <li> <p>For Amazon Route 53: <code>arn:aws:route53:::hostedzone/<i>hosted-zone-id</i> </code></p></li> <li> <p>For an Elastic IP address: <code>arn:aws:ec2:<i>region</i>:<i>account-id</i>:eip-allocation/<i>allocation-id</i> </code></p></li> </ul><br>
8 /// - [`tags(Tag)`](crate::operation::create_protection::builders::CreateProtectionFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_protection::builders::CreateProtectionFluentBuilder::set_tags):<br>required: **false**<br><p>One or more tag key-value pairs for the <code>Protection</code> object that is created.</p><br>
9 /// - On success, responds with [`CreateProtectionOutput`](crate::operation::create_protection::CreateProtectionOutput) with field(s):
10 /// - [`protection_id(Option<String>)`](crate::operation::create_protection::CreateProtectionOutput::protection_id): <p>The unique identifier (ID) for the <code>Protection</code> object that is created.</p>
11 /// - On failure, responds with [`SdkError<CreateProtectionError>`](crate::operation::create_protection::CreateProtectionError)
12 pub fn create_protection(&self) -> crate::operation::create_protection::builders::CreateProtectionFluentBuilder {
13 crate::operation::create_protection::builders::CreateProtectionFluentBuilder::new(self.handle.clone())
14 }
15}