amazonka-shield-2.0: Amazon Shield SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Shield.CreateProtection

Description

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.

Synopsis

Creating a Request

data CreateProtection Source #

See: newCreateProtection smart constructor.

Constructors

CreateProtection' 

Fields

  • tags :: Maybe [Tag]

    One or more tag key-value pairs for the Protection object that is created.

  • name :: Text

    Friendly name for the Protection you are creating.

  • resourceArn :: Text

    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

Instances

Instances details
ToJSON CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

ToHeaders CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

ToPath CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

ToQuery CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

AWSRequest CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

Associated Types

type AWSResponse CreateProtection #

Generic CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

Associated Types

type Rep CreateProtection :: Type -> Type #

Read CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

Show CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

NFData CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

Methods

rnf :: CreateProtection -> () #

Eq CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

Hashable CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

type AWSResponse CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

type Rep CreateProtection Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

type Rep CreateProtection = D1 ('MetaData "CreateProtection" "Amazonka.Shield.CreateProtection" "amazonka-shield-2.0-Cz9Fa9OSQ93AE4UCXBDcFo" 'False) (C1 ('MetaCons "CreateProtection'" 'PrefixI 'True) (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "resourceArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newCreateProtection Source #

Create a value of CreateProtection with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:tags:CreateProtection', createProtection_tags - One or more tag key-value pairs for the Protection object that is created.

CreateProtection, createProtection_name - Friendly name for the Protection you are creating.

CreateProtection, createProtection_resourceArn - 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

Request Lenses

createProtection_tags :: Lens' CreateProtection (Maybe [Tag]) Source #

One or more tag key-value pairs for the Protection object that is created.

createProtection_name :: Lens' CreateProtection Text Source #

Friendly name for the Protection you are creating.

createProtection_resourceArn :: Lens' CreateProtection Text Source #

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

Destructuring the Response

data CreateProtectionResponse Source #

See: newCreateProtectionResponse smart constructor.

Constructors

CreateProtectionResponse' 

Fields

Instances

Instances details
Generic CreateProtectionResponse Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

Associated Types

type Rep CreateProtectionResponse :: Type -> Type #

Read CreateProtectionResponse Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

Show CreateProtectionResponse Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

NFData CreateProtectionResponse Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

Eq CreateProtectionResponse Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

type Rep CreateProtectionResponse Source # 
Instance details

Defined in Amazonka.Shield.CreateProtection

type Rep CreateProtectionResponse = D1 ('MetaData "CreateProtectionResponse" "Amazonka.Shield.CreateProtection" "amazonka-shield-2.0-Cz9Fa9OSQ93AE4UCXBDcFo" 'False) (C1 ('MetaCons "CreateProtectionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "protectionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateProtectionResponse Source #

Create a value of CreateProtectionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:protectionId:CreateProtectionResponse', createProtectionResponse_protectionId - The unique identifier (ID) for the Protection object that is created.

$sel:httpStatus:CreateProtectionResponse', createProtectionResponse_httpStatus - The response's http status code.

Response Lenses

createProtectionResponse_protectionId :: Lens' CreateProtectionResponse (Maybe Text) Source #

The unique identifier (ID) for the Protection object that is created.