Class CfnProtectionGroup
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::Shield::ProtectionGroup
.
Creates a grouping of protected resources so they can be handled as a collective. This resource grouping improves the accuracy of detection and reduces false positives.
To configure this resource through AWS CloudFormation , you must be subscribed to AWS Shield Advanced . You can subscribe through the Shield Advanced console and through the APIs. For more information, see Subscribe to AWS Shield Advanced .
See example templates for Shield Advanced in AWS CloudFormation at aws-samples/aws-shield-advanced-examples .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.shield.*; CfnProtectionGroup cfnProtectionGroup = CfnProtectionGroup.Builder.create(this, "MyCfnProtectionGroup") .aggregation("aggregation") .pattern("pattern") .protectionGroupId("protectionGroupId") // the properties below are optional .members(List.of("members")) .resourceType("resourceType") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnProtectionGroup
(Construct scope, String id, CfnProtectionGroupProps props) Create a newAWS::Shield::ProtectionGroup
.protected
CfnProtectionGroup
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnProtectionGroup
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionDefines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.The ARN (Amazon Resource Name) of the new protection group.The ARNs (Amazon Resource Names) of the resources to include in the protection group.The criteria to use to choose the protected resources for inclusion in the group.The name of the protection group.The resource type to include in the protection group.getTags()
Key:value pairs associated with an AWS resource.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAggregation
(String value) Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.void
setMembers
(List<String> value) The ARNs (Amazon Resource Names) of the resources to include in the protection group.void
setPattern
(String value) The criteria to use to choose the protected resources for inclusion in the group.void
setProtectionGroupId
(String value) The name of the protection group.void
setResourceType
(String value) The resource type to include in the protection group.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnProtectionGroup
protected CfnProtectionGroup(software.amazon.jsii.JsiiObjectRef objRef) -
CfnProtectionGroup
protected CfnProtectionGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnProtectionGroup
@Stability(Stable) public CfnProtectionGroup(@NotNull Construct scope, @NotNull String id, @NotNull CfnProtectionGroupProps props) Create a newAWS::Shield::ProtectionGroup
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrProtectionGroupArn
The ARN (Amazon Resource Name) of the new protection group. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Key:value pairs associated with an AWS resource.The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
To modify tags on existing resources, use the AWS Shield Advanced APIs or command line interface. With AWS CloudFormation , you can only add tags to resources during resource creation.
-
getAggregation
Defines how AWS 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.
-
setAggregation
Defines how AWS 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.
-
getPattern
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.
-
setPattern
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.
-
getProtectionGroupId
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.
-
setProtectionGroupId
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.
-
getMembers
The ARNs (Amazon Resource Names) of the resources to include in the protection group.You must set this when you set
Pattern
toARBITRARY
and you must not set it for any otherPattern
setting. -
setMembers
The ARNs (Amazon Resource Names) of the resources to include in the protection group.You must set this when you set
Pattern
toARBITRARY
and you must not set it for any otherPattern
setting. -
getResourceType
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
toBY_RESOURCE_TYPE
and you must not set it for any otherPattern
setting. -
setResourceType
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
toBY_RESOURCE_TYPE
and you must not set it for any otherPattern
setting.
-