/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Shield { namespace Model { /** */ class CreateProtectionRequest : public ShieldRequest { public: AWS_SHIELD_API CreateProtectionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateProtection"; } AWS_SHIELD_API Aws::String SerializePayload() const override; AWS_SHIELD_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Friendly name for the Protection you are creating.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

Friendly name for the Protection you are creating.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

Friendly name for the Protection you are creating.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

Friendly name for the Protection you are creating.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

Friendly name for the Protection you are creating.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

Friendly name for the Protection you are creating.

*/ inline CreateProtectionRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

Friendly name for the Protection you are creating.

*/ inline CreateProtectionRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

Friendly name for the Protection you are creating.

*/ inline CreateProtectionRequest& WithName(const char* value) { SetName(value); return *this;} /** *

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 *

*/ inline const Aws::String& GetResourceArn() const{ return m_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 *

*/ inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } /** *

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 *

*/ inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } /** *

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 *

*/ inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } /** *

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 *

*/ inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } /** *

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 *

*/ inline CreateProtectionRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;} /** *

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 *

*/ inline CreateProtectionRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;} /** *

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 *

*/ inline CreateProtectionRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} /** *

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

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

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

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

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

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

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

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

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

*/ inline CreateProtectionRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

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

*/ inline CreateProtectionRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

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

*/ inline CreateProtectionRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

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

*/ inline CreateProtectionRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_resourceArn; bool m_resourceArnHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Shield } // namespace Aws