AWS WAFV2

2025/03/26 - AWS WAFV2 - 2 updated api methods

Changes  This release adds the ability to associate an AWS WAF v2 web ACL with an AWS Amplify App.

GetWebACL (updated) Link ¶
Changes (request)
{'ARN': 'string'}

Retrieves the specified WebACL.

See also: AWS API Documentation

Request Syntax

client.get_web_acl(
    Name='string',
    Scope='CLOUDFRONT'|'REGIONAL',
    Id='string',
    ARN='string'
)
type Name:

string

param Name:

The name of the web ACL. You cannot change the name of a web ACL after you create it.

type Scope:

string

param Scope:

Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use CLOUDFRONT.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.

  • API and SDKs - For all calls, use the Region endpoint us-east-1.

type Id:

string

param Id:

The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.

type ARN:

string

param ARN:

The Amazon Resource Name (ARN) of the web ACL that you want to retrieve.

rtype:

dict

returns:

Response Syntax

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

Response Structure

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

ListResourcesForWebACL (updated) Link ¶
Changes (request)
{'ResourceType': {'AMPLIFY'}}

Retrieves an array of the Amazon Resource Names (ARNs) for the resources that are associated with the specified web ACL.

For Amazon CloudFront, don't use this call. Instead, use the CloudFront call ListDistributionsByWebACLId. For information, see ListDistributionsByWebACLId in the Amazon CloudFront API Reference.

Required permissions for customer-managed IAM policies

This call requires permissions that are specific to the protected resource type. For details, see Permissions for ListResourcesForWebACL in the WAF Developer Guide.

See also: AWS API Documentation

Request Syntax

client.list_resources_for_web_acl(
    WebACLArn='string',
    ResourceType='APPLICATION_LOAD_BALANCER'|'API_GATEWAY'|'APPSYNC'|'COGNITO_USER_POOL'|'APP_RUNNER_SERVICE'|'VERIFIED_ACCESS_INSTANCE'|'AMPLIFY'
)
type WebACLArn:

string

param WebACLArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the web ACL.

type ResourceType:

string

param ResourceType:

Retrieves the web ACLs that are used by the specified resource type.

For Amazon CloudFront, don't use this call. Instead, use the CloudFront call ListDistributionsByWebACLId. For information, see ListDistributionsByWebACLId in the Amazon CloudFront API Reference.

Default: APPLICATION_LOAD_BALANCER

rtype:

dict

returns:

Response Syntax

{
    'ResourceArns': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • ResourceArns (list) --

      The array of Amazon Resource Names (ARNs) of the associated resources.

      • (string) --