Class CfnProtection
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IProtectionRef,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 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 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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSpecifies 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 interfaceThe automatic application layer DDoS mitigation settings for aProtection.static final classA fluent builder forCfnProtection.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.shield.IProtectionRef
IProtectionRef.Jsii$Default, IProtectionRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnProtection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnProtection(software.amazon.jsii.JsiiObjectRef objRef) CfnProtection(software.constructs.Construct scope, String id, CfnProtectionProps props) Create a newAWS::Shield::Protection. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForProtection(IProtectionRef resource) The 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.A reference to a Protection resource.The ARN (Amazon Resource Name) of the AWS resource that is protected.getTags()Key:value pairs associated with an AWS resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnProtection.renderProperties(Map<String, Object> props) voidThe automatic application layer DDoS mitigation settings for the protection.voidsetApplicationLayerAutomaticResponseConfiguration(CfnProtection.ApplicationLayerAutomaticResponseConfigurationProperty value) The automatic application layer DDoS mitigation settings for the protection.voidsetHealthCheckArns(List<String> value) The ARN (Amazon Resource Name) of the health check to associate with the protection.voidThe name of the protection.voidsetResourceArn(String value) The ARN (Amazon Resource Name) of the AWS resource that is protected.voidKey: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, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods 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) Create a newAWS::Shield::Protection.- 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
-
arnForProtection
- Parameters:
resource- This parameter is required.
-
isCfnProtection
Checks whether the given object is a CfnProtection.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin 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:
renderPropertiesin 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:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getProtectionRef
A reference to a Protection resource.- Specified by:
getProtectionRefin interfaceIProtectionRef
-
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.Returns union: either
IResolvableorCfnProtection.ApplicationLayerAutomaticResponseConfigurationProperty -
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.
-