Class CfnProtection
- All Implemented Interfaces:
IInspectable
,ITaggableV2
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
The resource can be an Amazon CloudFront distribution, Amazon RouteĀ 53 hosted zone, AWS 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.
Configure a single AWS::Shield::Protection
Use this protection to protect a single resource at a time.
To configure this Shield Advanced protection through AWS CloudFormation , you must be subscribed to 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 .
Configure Shield Advanced using AWS CloudFormation and AWS Firewall Manager
You might be able to use Firewall Manager with AWS CloudFormation to configure Shield Advanced across multiple accounts and protected resources. To do this, your accounts must be part of an organization in AWS Organizations . You can use Firewall Manager to configure Shield Advanced protections for any resource types except for Amazon RouteĀ 53 or AWS Global Accelerator .
For an example of this, see the one-click configuration guidance published by the AWS technical community at One-click deployment of Shield Advanced .
Configure multiple protections through the Shield Advanced console
You can add protection to multiple resources at once through the Shield Advanced console . For more information see Getting Started with AWS Shield Advanced and Managing resource protections in AWS Shield Advanced .
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.*; Object block; Object count; CfnProtection cfnProtection = CfnProtection.Builder.create(this, "MyCfnProtection") .name("name") .resourceArn("resourceArn") // the properties below are optional .applicationLayerAutomaticResponseConfiguration(ApplicationLayerAutomaticResponseConfigurationProperty.builder() .action(ActionProperty.builder() .block(block) .count(count) .build()) .status("status") .build()) .healthCheckArns(List.of("healthCheckArns")) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Specifies the action setting that Shield Advanced should use in the AWS WAF rules that it creates on behalf of the protected resource in response to DDoS attacks.static interface
The automatic application layer DDoS mitigation settings for aProtection
.static final class
A fluent builder forCfnProtection
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnProtection
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnProtection
(software.amazon.jsii.JsiiObjectRef objRef) CfnProtection
(software.constructs.Construct scope, String id, CfnProtectionProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe automatic application layer DDoS mitigation settings for the protection.The ARN (Amazon Resource Name) of the new protection.The ID of the new protection.Tag Manager which manages the tags for this resource.The ARN (Amazon Resource Name) of the health check to associate with the protection.getName()
The name of the protection.The ARN (Amazon Resource Name) of the AWS resource that is protected.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
The automatic application layer DDoS mitigation settings for the protection.void
setApplicationLayerAutomaticResponseConfiguration
(CfnProtection.ApplicationLayerAutomaticResponseConfigurationProperty value) The automatic application layer DDoS mitigation settings for the protection.void
setHealthCheckArns
(List<String> value) The ARN (Amazon Resource Name) of the health check to associate with the protection.void
The name of the protection.void
setResourceArn
(String value) The ARN (Amazon Resource Name) of the AWS resource that is protected.void
Key:value pairs associated with an AWS resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
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
-
CfnProtection
protected CfnProtection(software.amazon.jsii.JsiiObjectRef objRef) -
CfnProtection
protected CfnProtection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnProtection
@Stability(Stable) public CfnProtection(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnProtectionProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrProtectionArn
The ARN (Amazon Resource Name) of the new protection. -
getAttrProtectionId
The ID of the new protection. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManager
in interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getName
The name of the protection.For example,
My CloudFront distributions
. -
setName
The name of the protection.For example,
My CloudFront distributions
. -
getResourceArn
The ARN (Amazon Resource Name) of the AWS resource that is protected. -
setResourceArn
The ARN (Amazon Resource Name) of the AWS resource that is protected. -
getApplicationLayerAutomaticResponseConfiguration
The automatic application layer DDoS mitigation settings for the protection. -
setApplicationLayerAutomaticResponseConfiguration
@Stability(Stable) public void setApplicationLayerAutomaticResponseConfiguration(@Nullable IResolvable value) The automatic application layer DDoS mitigation settings for the protection. -
setApplicationLayerAutomaticResponseConfiguration
@Stability(Stable) public void setApplicationLayerAutomaticResponseConfiguration(@Nullable CfnProtection.ApplicationLayerAutomaticResponseConfigurationProperty value) The automatic application layer DDoS mitigation settings for the protection. -
getHealthCheckArns
The ARN (Amazon Resource Name) of the health check to associate with the protection. -
setHealthCheckArns
The ARN (Amazon Resource Name) of the health check to associate with the protection. -
getTags
Key:value pairs associated with an AWS resource. -
setTags
Key:value pairs associated with an AWS resource.
-