list_web_acls
Retrieve Web ACLs for AWS WAF to monitor and manage security rules across CloudFront or regional applications.
Instructions
Lists Web ACLs (Global/CloudFront or Regional).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | The scope of the Web ACLs (default: REGIONAL). |
Implementation Reference
- src/index.ts:2009-2019 (handler)Handler function for 'list_web_acls' tool. Executes ListWebACLsCommand using WAFV2Client based on scope (REGIONAL or CLOUDFRONT), maps and returns Web ACL details.if (name === "list_web_acls") { const scope = (args as any)?.scope || "REGIONAL"; const command = new ListWebACLsCommand({ Scope: scope }); const response = await wafv2Client.send(command); const acls = response.WebACLs?.map(acl => ({ Name: acl.Name, Id: acl.Id, ARN: acl.ARN, Description: acl.Description })) || []; return { content: [{ type: "text", text: JSON.stringify(acls, null, 2) }] };
- src/index.ts:607-619 (registration)Registration of 'list_web_acls' tool in ListToolsResponse, including name, description, and input schema for scope.name: "list_web_acls", description: "Lists Web ACLs (Global/CloudFront or Regional).", inputSchema: { type: "object", properties: { scope: { type: "string", enum: ["CLOUDFRONT", "REGIONAL"], description: "The scope of the Web ACLs (default: REGIONAL)." } } } },
- src/index.ts:609-618 (schema)Input schema for 'list_web_acls' tool defining optional 'scope' parameter.inputSchema: { type: "object", properties: { scope: { type: "string", enum: ["CLOUDFRONT", "REGIONAL"], description: "The scope of the Web ACLs (default: REGIONAL)." } } }
- src/index.ts:68-68 (helper)Initialization of WAFV2Client used by the list_web_acls handler.const wafv2Client = new WAFV2Client({});
- src/index.ts:34-34 (helper)Import of WAFV2Client and ListWebACLsCommand required for the tool.import { WAFV2Client, ListWebACLsCommand, GetSampledRequestsCommand, ListIPSetsCommand, GetIPSetCommand } from "@aws-sdk/client-wafv2";