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
sourceimpl CreateProtection
 
impl CreateProtection
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
sourceimpl Clone for CreateProtection
 
impl Clone for CreateProtection
sourcefn clone(&self) -> CreateProtection
 
fn clone(&self) -> CreateProtection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CreateProtection
impl Send for CreateProtection
impl Sync for CreateProtection
impl Unpin for CreateProtection
impl !UnwindSafe for CreateProtection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
 
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
 
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
 
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
 
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more