aws.wafv2.WebAclAssociation
Explore with Pulumi AI
Creates a WAFv2 Web ACL Association.
NOTE on associating a WAFv2 Web ACL with a Cloudfront distribution: Do not use this resource to associate a WAFv2 Web ACL with a Cloudfront Distribution. The AWS API call backing this resource notes that you should use the
web_acl_id
property on thecloudfront_distribution
instead.
Create WebAclAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WebAclAssociation(name: string, args: WebAclAssociationArgs, opts?: CustomResourceOptions);
@overload
def WebAclAssociation(resource_name: str,
args: WebAclAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WebAclAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_arn: Optional[str] = None,
web_acl_arn: Optional[str] = None)
func NewWebAclAssociation(ctx *Context, name string, args WebAclAssociationArgs, opts ...ResourceOption) (*WebAclAssociation, error)
public WebAclAssociation(string name, WebAclAssociationArgs args, CustomResourceOptions? opts = null)
public WebAclAssociation(String name, WebAclAssociationArgs args)
public WebAclAssociation(String name, WebAclAssociationArgs args, CustomResourceOptions options)
type: aws:wafv2:WebAclAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WebAclAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WebAclAssociationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WebAclAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebAclAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WebAclAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsWebAclAssociationResource = new Aws.WafV2.WebAclAssociation("awsWebAclAssociationResource", new()
{
ResourceArn = "string",
WebAclArn = "string",
});
example, err := wafv2.NewWebAclAssociation(ctx, "awsWebAclAssociationResource", &wafv2.WebAclAssociationArgs{
ResourceArn: pulumi.String("string"),
WebAclArn: pulumi.String("string"),
})
var awsWebAclAssociationResource = new WebAclAssociation("awsWebAclAssociationResource", WebAclAssociationArgs.builder()
.resourceArn("string")
.webAclArn("string")
.build());
aws_web_acl_association_resource = aws.wafv2.WebAclAssociation("awsWebAclAssociationResource",
resource_arn="string",
web_acl_arn="string")
const awsWebAclAssociationResource = new aws.wafv2.WebAclAssociation("awsWebAclAssociationResource", {
resourceArn: "string",
webAclArn: "string",
});
type: aws:wafv2:WebAclAssociation
properties:
resourceArn: string
webAclArn: string
WebAclAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The WebAclAssociation resource accepts the following input properties:
- Resource
Arn string - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- Web
Acl stringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- Resource
Arn string - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- Web
Acl stringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- resource
Arn String - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- web
Acl StringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- resource
Arn string - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- web
Acl stringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- resource_
arn str - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- web_
acl_ strarn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- resource
Arn String - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- web
Acl StringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the WebAclAssociation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing WebAclAssociation Resource
Get an existing WebAclAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WebAclAssociationState, opts?: CustomResourceOptions): WebAclAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
resource_arn: Optional[str] = None,
web_acl_arn: Optional[str] = None) -> WebAclAssociation
func GetWebAclAssociation(ctx *Context, name string, id IDInput, state *WebAclAssociationState, opts ...ResourceOption) (*WebAclAssociation, error)
public static WebAclAssociation Get(string name, Input<string> id, WebAclAssociationState? state, CustomResourceOptions? opts = null)
public static WebAclAssociation get(String name, Output<String> id, WebAclAssociationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Resource
Arn string - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- Web
Acl stringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- Resource
Arn string - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- Web
Acl stringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- resource
Arn String - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- web
Acl StringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- resource
Arn string - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- web
Acl stringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- resource_
arn str - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- web_
acl_ strarn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
- resource
Arn String - The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage (REST only, HTTP is unsupported), an Amazon Cognito User Pool, an Amazon AppSync GraphQL API, an Amazon App Runner service, or an Amazon Verified Access instance.
- web
Acl StringArn - The Amazon Resource Name (ARN) of the Web ACL that you want to associate with the resource.
Import
Using pulumi import
, import WAFv2 Web ACL Association using WEB_ACL_ARN,RESOURCE_ARN
. For example:
$ pulumi import aws:wafv2/webAclAssociation:WebAclAssociation example arn:aws:wafv2:...7ce849ea,arn:aws:apigateway:...ages/name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.