Struct aws_sdk_shield::client::fluent_builders::CreateProtection
source · pub struct CreateProtection { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateProtection
.
Enables Shield Advanced for a specific Amazon Web Services resource. The resource can be an Amazon CloudFront distribution, Amazon Route 53 hosted zone, Global Accelerator standard accelerator, Elastic IP Address, Application Load Balancer, or a Classic Load Balancer. You can protect Amazon EC2 instances and Network Load Balancers by association with protected Amazon EC2 Elastic IP addresses.
You can add protection to only a single resource with each CreateProtection
request. You can add protection to multiple resources at once through the Shield Advanced console at https://console.aws.amazon.com/wafv2/shieldv2#/. For more information see Getting Started with Shield Advanced and Adding Shield Advanced protection to Amazon Web Services resources.
Implementations§
source§impl CreateProtection
impl CreateProtection
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CreateProtection, AwsResponseRetryClassifier>, SdkError<CreateProtectionError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<CreateProtection, AwsResponseRetryClassifier>, SdkError<CreateProtectionError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<CreateProtectionOutput, SdkError<CreateProtectionError>>
pub async fn send(
self
) -> Result<CreateProtectionOutput, SdkError<CreateProtectionError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
Friendly name for the Protection
you are creating.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
Friendly name for the Protection
you are creating.
sourcepub fn resource_arn(self, input: impl Into<String>) -> Self
pub fn resource_arn(self, input: impl Into<String>) -> Self
The ARN (Amazon Resource Name) of the resource to be protected.
The ARN should be in one of the following formats:
-
For an Application Load Balancer:
arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
-
For an Elastic Load Balancer (Classic Load Balancer):
arn:aws:elasticloadbalancing:region:account-id:loadbalancer/load-balancer-name
-
For an Amazon CloudFront distribution:
arn:aws:cloudfront::account-id:distribution/distribution-id
-
For an Global Accelerator standard accelerator:
arn:aws:globalaccelerator::account-id:accelerator/accelerator-id
-
For Amazon Route 53:
arn:aws:route53:::hostedzone/hosted-zone-id
-
For an Elastic IP address:
arn:aws:ec2:region:account-id:eip-allocation/allocation-id
sourcepub fn set_resource_arn(self, input: Option<String>) -> Self
pub fn set_resource_arn(self, input: Option<String>) -> Self
The ARN (Amazon Resource Name) of the resource to be protected.
The ARN should be in one of the following formats:
-
For an Application Load Balancer:
arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
-
For an Elastic Load Balancer (Classic Load Balancer):
arn:aws:elasticloadbalancing:region:account-id:loadbalancer/load-balancer-name
-
For an Amazon CloudFront distribution:
arn:aws:cloudfront::account-id:distribution/distribution-id
-
For an Global Accelerator standard accelerator:
arn:aws:globalaccelerator::account-id:accelerator/accelerator-id
-
For Amazon Route 53:
arn:aws:route53:::hostedzone/hosted-zone-id
-
For an Elastic IP address:
arn:aws:ec2:region:account-id:eip-allocation/allocation-id
Appends an item to Tags
.
To override the contents of this collection use set_tags
.
One or more tag key-value pairs for the Protection
object that is created.
One or more tag key-value pairs for the Protection
object that is created.
Trait Implementations§
source§impl Clone for CreateProtection
impl Clone for CreateProtection
source§fn clone(&self) -> CreateProtection
fn clone(&self) -> CreateProtection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more