@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:27:53.336Z") public class CfnWebACLAssociation extends CfnResource implements IInspectable
This is the latest version of AWS WAF , named AWS WAF V2, released in November, 2019. For information, including how to migrate your AWS WAF resources from the prior release, see the AWS WAF Developer Guide .
Use a web ACL association to define an association between a web ACL and a regional application resource, to protect the resource. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AWS AppSync GraphQL API.
For Amazon CloudFront , don't use this resource. Instead, use your CloudFront distribution configuration. To associate a web ACL with a distribution, provide the Amazon Resource Name (ARN) of the WebACL
to your CloudFront distribution configuration. To disassociate a web ACL, provide an empty ARN. For information, see AWS::CloudFront::Distribution .
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.wafv2.*; CfnWebACLAssociation cfnWebACLAssociation = CfnWebACLAssociation.Builder.create(this, "MyCfnWebACLAssociation") .resourceArn("resourceArn") .webAclArn("webAclArn") .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnWebACLAssociation.Builder
A fluent builder for
CfnWebACLAssociation . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnWebACLAssociation(Construct scope,
java.lang.String id,
CfnWebACLAssociationProps props)
Create a new `AWS::WAFv2::WebACLAssociation`.
|
protected |
CfnWebACLAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnWebACLAssociation(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getResourceArn()
The Amazon Resource Name (ARN) of the resource to associate with the web ACL.
|
java.lang.String |
getWebAclArn()
The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setResourceArn(java.lang.String value)
The Amazon Resource Name (ARN) of the resource to associate with the web ACL.
|
void |
setWebAclArn(java.lang.String value)
The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnWebACLAssociation(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnWebACLAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnWebACLAssociation(Construct scope, java.lang.String id, CfnWebACLAssociationProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getResourceArn()
The ARN must be in one of the following formats:
arn:aws:elasticloadbalancing: *region* : *account-id* :loadbalancer/app/ *load-balancer-name* / *load-balancer-id*
arn:aws:apigateway: *region* ::/restapis/ *api-id* /stages/ *stage-name*
arn:aws:appsync: *region* : *account-id* :apis/ *GraphQLApiId*
public void setResourceArn(java.lang.String value)
The ARN must be in one of the following formats:
arn:aws:elasticloadbalancing: *region* : *account-id* :loadbalancer/app/ *load-balancer-name* / *load-balancer-id*
arn:aws:apigateway: *region* ::/restapis/ *api-id* /stages/ *stage-name*
arn:aws:appsync: *region* : *account-id* :apis/ *GraphQLApiId*
public java.lang.String getWebAclArn()
public void setWebAclArn(java.lang.String value)