/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Shield { namespace Model { /** *

A grouping of protected resources that you and Shield Advanced can monitor as * a collective. This resource grouping improves the accuracy of detection and * reduces false positives.

See Also:

AWS * API Reference

*/ class ProtectionGroup { public: AWS_SHIELD_API ProtectionGroup(); AWS_SHIELD_API ProtectionGroup(Aws::Utils::Json::JsonView jsonValue); AWS_SHIELD_API ProtectionGroup& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SHIELD_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the protection group. You use this to identify the protection * group in lists and to manage the protection group, for example to update, * delete, or describe it.

*/ inline const Aws::String& GetProtectionGroupId() const{ return m_protectionGroupId; } /** *

The name of the protection group. You use this to identify the protection * group in lists and to manage the protection group, for example to update, * delete, or describe it.

*/ inline bool ProtectionGroupIdHasBeenSet() const { return m_protectionGroupIdHasBeenSet; } /** *

The name of the protection group. You use this to identify the protection * group in lists and to manage the protection group, for example to update, * delete, or describe it.

*/ inline void SetProtectionGroupId(const Aws::String& value) { m_protectionGroupIdHasBeenSet = true; m_protectionGroupId = value; } /** *

The name of the protection group. You use this to identify the protection * group in lists and to manage the protection group, for example to update, * delete, or describe it.

*/ inline void SetProtectionGroupId(Aws::String&& value) { m_protectionGroupIdHasBeenSet = true; m_protectionGroupId = std::move(value); } /** *

The name of the protection group. You use this to identify the protection * group in lists and to manage the protection group, for example to update, * delete, or describe it.

*/ inline void SetProtectionGroupId(const char* value) { m_protectionGroupIdHasBeenSet = true; m_protectionGroupId.assign(value); } /** *

The name of the protection group. You use this to identify the protection * group in lists and to manage the protection group, for example to update, * delete, or describe it.

*/ inline ProtectionGroup& WithProtectionGroupId(const Aws::String& value) { SetProtectionGroupId(value); return *this;} /** *

The name of the protection group. You use this to identify the protection * group in lists and to manage the protection group, for example to update, * delete, or describe it.

*/ inline ProtectionGroup& WithProtectionGroupId(Aws::String&& value) { SetProtectionGroupId(std::move(value)); return *this;} /** *

The name of the protection group. You use this to identify the protection * group in lists and to manage the protection group, for example to update, * delete, or describe it.

*/ inline ProtectionGroup& WithProtectionGroupId(const char* value) { SetProtectionGroupId(value); return *this;} /** *

Defines how Shield combines resource data for the group in order to detect, * mitigate, and report events.

  • Sum - Use the total traffic across * the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically.

  • *

    Mean - Use the average of the traffic across the group. This is a good choice * for resources that share traffic uniformly. Examples include accelerators and * load balancers.

  • Max - Use the highest traffic from each * resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon * CloudFront distributions and origin resources for CloudFront distributions.

    *
*/ inline const ProtectionGroupAggregation& GetAggregation() const{ return m_aggregation; } /** *

Defines how Shield combines resource data for the group in order to detect, * mitigate, and report events.

  • Sum - Use the total traffic across * the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically.

  • *

    Mean - Use the average of the traffic across the group. This is a good choice * for resources that share traffic uniformly. Examples include accelerators and * load balancers.

  • Max - Use the highest traffic from each * resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon * CloudFront distributions and origin resources for CloudFront distributions.

    *
*/ inline bool AggregationHasBeenSet() const { return m_aggregationHasBeenSet; } /** *

Defines how Shield combines resource data for the group in order to detect, * mitigate, and report events.

  • Sum - Use the total traffic across * the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically.

  • *

    Mean - Use the average of the traffic across the group. This is a good choice * for resources that share traffic uniformly. Examples include accelerators and * load balancers.

  • Max - Use the highest traffic from each * resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon * CloudFront distributions and origin resources for CloudFront distributions.

    *
*/ inline void SetAggregation(const ProtectionGroupAggregation& value) { m_aggregationHasBeenSet = true; m_aggregation = value; } /** *

Defines how Shield combines resource data for the group in order to detect, * mitigate, and report events.

  • Sum - Use the total traffic across * the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically.

  • *

    Mean - Use the average of the traffic across the group. This is a good choice * for resources that share traffic uniformly. Examples include accelerators and * load balancers.

  • Max - Use the highest traffic from each * resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon * CloudFront distributions and origin resources for CloudFront distributions.

    *
*/ inline void SetAggregation(ProtectionGroupAggregation&& value) { m_aggregationHasBeenSet = true; m_aggregation = std::move(value); } /** *

Defines how Shield combines resource data for the group in order to detect, * mitigate, and report events.

  • Sum - Use the total traffic across * the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically.

  • *

    Mean - Use the average of the traffic across the group. This is a good choice * for resources that share traffic uniformly. Examples include accelerators and * load balancers.

  • Max - Use the highest traffic from each * resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon * CloudFront distributions and origin resources for CloudFront distributions.

    *
*/ inline ProtectionGroup& WithAggregation(const ProtectionGroupAggregation& value) { SetAggregation(value); return *this;} /** *

Defines how Shield combines resource data for the group in order to detect, * mitigate, and report events.

  • Sum - Use the total traffic across * the group. This is a good choice for most cases. Examples include Elastic IP * addresses for EC2 instances that scale manually or automatically.

  • *

    Mean - Use the average of the traffic across the group. This is a good choice * for resources that share traffic uniformly. Examples include accelerators and * load balancers.

  • Max - Use the highest traffic from each * resource. This is useful for resources that don't share traffic and for * resources that share that traffic in a non-uniform way. Examples include Amazon * CloudFront distributions and origin resources for CloudFront distributions.

    *
*/ inline ProtectionGroup& WithAggregation(ProtectionGroupAggregation&& value) { SetAggregation(std::move(value)); return *this;} /** *

The criteria to use to choose the protected resources for inclusion in the * group. You can include all resources that have protections, provide a list of * resource ARNs (Amazon Resource Names), or include all resources of a specified * resource type.

*/ inline const ProtectionGroupPattern& GetPattern() const{ return m_pattern; } /** *

The criteria to use to choose the protected resources for inclusion in the * group. You can include all resources that have protections, provide a list of * resource ARNs (Amazon Resource Names), or include all resources of a specified * resource type.

*/ inline bool PatternHasBeenSet() const { return m_patternHasBeenSet; } /** *

The criteria to use to choose the protected resources for inclusion in the * group. You can include all resources that have protections, provide a list of * resource ARNs (Amazon Resource Names), or include all resources of a specified * resource type.

*/ inline void SetPattern(const ProtectionGroupPattern& value) { m_patternHasBeenSet = true; m_pattern = value; } /** *

The criteria to use to choose the protected resources for inclusion in the * group. You can include all resources that have protections, provide a list of * resource ARNs (Amazon Resource Names), or include all resources of a specified * resource type.

*/ inline void SetPattern(ProtectionGroupPattern&& value) { m_patternHasBeenSet = true; m_pattern = std::move(value); } /** *

The criteria to use to choose the protected resources for inclusion in the * group. You can include all resources that have protections, provide a list of * resource ARNs (Amazon Resource Names), or include all resources of a specified * resource type.

*/ inline ProtectionGroup& WithPattern(const ProtectionGroupPattern& value) { SetPattern(value); return *this;} /** *

The criteria to use to choose the protected resources for inclusion in the * group. You can include all resources that have protections, provide a list of * resource ARNs (Amazon Resource Names), or include all resources of a specified * resource type.

*/ inline ProtectionGroup& WithPattern(ProtectionGroupPattern&& value) { SetPattern(std::move(value)); return *this;} /** *

The resource type to include in the protection group. All protected resources * of this type are included in the protection group. You must set this when you * set Pattern to BY_RESOURCE_TYPE and you must not set * it for any other Pattern setting.

*/ inline const ProtectedResourceType& GetResourceType() const{ return m_resourceType; } /** *

The resource type to include in the protection group. All protected resources * of this type are included in the protection group. You must set this when you * set Pattern to BY_RESOURCE_TYPE and you must not set * it for any other Pattern setting.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The resource type to include in the protection group. All protected resources * of this type are included in the protection group. You must set this when you * set Pattern to BY_RESOURCE_TYPE and you must not set * it for any other Pattern setting.

*/ inline void SetResourceType(const ProtectedResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The resource type to include in the protection group. All protected resources * of this type are included in the protection group. You must set this when you * set Pattern to BY_RESOURCE_TYPE and you must not set * it for any other Pattern setting.

*/ inline void SetResourceType(ProtectedResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The resource type to include in the protection group. All protected resources * of this type are included in the protection group. You must set this when you * set Pattern to BY_RESOURCE_TYPE and you must not set * it for any other Pattern setting.

*/ inline ProtectionGroup& WithResourceType(const ProtectedResourceType& value) { SetResourceType(value); return *this;} /** *

The resource type to include in the protection group. All protected resources * of this type are included in the protection group. You must set this when you * set Pattern to BY_RESOURCE_TYPE and you must not set * it for any other Pattern setting.

*/ inline ProtectionGroup& WithResourceType(ProtectedResourceType&& value) { SetResourceType(std::move(value)); return *this;} /** *

The ARNs (Amazon Resource Names) of the resources to include in the * protection group. You must set this when you set Pattern to * ARBITRARY and you must not set it for any other * Pattern setting.

*/ inline const Aws::Vector& GetMembers() const{ return m_members; } /** *

The ARNs (Amazon Resource Names) of the resources to include in the * protection group. You must set this when you set Pattern to * ARBITRARY and you must not set it for any other * Pattern setting.

*/ inline bool MembersHasBeenSet() const { return m_membersHasBeenSet; } /** *

The ARNs (Amazon Resource Names) of the resources to include in the * protection group. You must set this when you set Pattern to * ARBITRARY and you must not set it for any other * Pattern setting.

*/ inline void SetMembers(const Aws::Vector& value) { m_membersHasBeenSet = true; m_members = value; } /** *

The ARNs (Amazon Resource Names) of the resources to include in the * protection group. You must set this when you set Pattern to * ARBITRARY and you must not set it for any other * Pattern setting.

*/ inline void SetMembers(Aws::Vector&& value) { m_membersHasBeenSet = true; m_members = std::move(value); } /** *

The ARNs (Amazon Resource Names) of the resources to include in the * protection group. You must set this when you set Pattern to * ARBITRARY and you must not set it for any other * Pattern setting.

*/ inline ProtectionGroup& WithMembers(const Aws::Vector& value) { SetMembers(value); return *this;} /** *

The ARNs (Amazon Resource Names) of the resources to include in the * protection group. You must set this when you set Pattern to * ARBITRARY and you must not set it for any other * Pattern setting.

*/ inline ProtectionGroup& WithMembers(Aws::Vector&& value) { SetMembers(std::move(value)); return *this;} /** *

The ARNs (Amazon Resource Names) of the resources to include in the * protection group. You must set this when you set Pattern to * ARBITRARY and you must not set it for any other * Pattern setting.

*/ inline ProtectionGroup& AddMembers(const Aws::String& value) { m_membersHasBeenSet = true; m_members.push_back(value); return *this; } /** *

The ARNs (Amazon Resource Names) of the resources to include in the * protection group. You must set this when you set Pattern to * ARBITRARY and you must not set it for any other * Pattern setting.

*/ inline ProtectionGroup& AddMembers(Aws::String&& value) { m_membersHasBeenSet = true; m_members.push_back(std::move(value)); return *this; } /** *

The ARNs (Amazon Resource Names) of the resources to include in the * protection group. You must set this when you set Pattern to * ARBITRARY and you must not set it for any other * Pattern setting.

*/ inline ProtectionGroup& AddMembers(const char* value) { m_membersHasBeenSet = true; m_members.push_back(value); return *this; } /** *

The ARN (Amazon Resource Name) of the protection group.

*/ inline const Aws::String& GetProtectionGroupArn() const{ return m_protectionGroupArn; } /** *

The ARN (Amazon Resource Name) of the protection group.

*/ inline bool ProtectionGroupArnHasBeenSet() const { return m_protectionGroupArnHasBeenSet; } /** *

The ARN (Amazon Resource Name) of the protection group.

*/ inline void SetProtectionGroupArn(const Aws::String& value) { m_protectionGroupArnHasBeenSet = true; m_protectionGroupArn = value; } /** *

The ARN (Amazon Resource Name) of the protection group.

*/ inline void SetProtectionGroupArn(Aws::String&& value) { m_protectionGroupArnHasBeenSet = true; m_protectionGroupArn = std::move(value); } /** *

The ARN (Amazon Resource Name) of the protection group.

*/ inline void SetProtectionGroupArn(const char* value) { m_protectionGroupArnHasBeenSet = true; m_protectionGroupArn.assign(value); } /** *

The ARN (Amazon Resource Name) of the protection group.

*/ inline ProtectionGroup& WithProtectionGroupArn(const Aws::String& value) { SetProtectionGroupArn(value); return *this;} /** *

The ARN (Amazon Resource Name) of the protection group.

*/ inline ProtectionGroup& WithProtectionGroupArn(Aws::String&& value) { SetProtectionGroupArn(std::move(value)); return *this;} /** *

The ARN (Amazon Resource Name) of the protection group.

*/ inline ProtectionGroup& WithProtectionGroupArn(const char* value) { SetProtectionGroupArn(value); return *this;} private: Aws::String m_protectionGroupId; bool m_protectionGroupIdHasBeenSet = false; ProtectionGroupAggregation m_aggregation; bool m_aggregationHasBeenSet = false; ProtectionGroupPattern m_pattern; bool m_patternHasBeenSet = false; ProtectedResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::Vector m_members; bool m_membersHasBeenSet = false; Aws::String m_protectionGroupArn; bool m_protectionGroupArnHasBeenSet = false; }; } // namespace Model } // namespace Shield } // namespace Aws