GetPermissionPolicyCommand

This is AWS WAF Classic documentation. For more information, see AWS WAF Classic  in the developer guide.

For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide . With the latest version, AWS WAF has a single set of endpoints for regional and global use.

Returns the IAM policy attached to the RuleGroup.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { WAFClient, GetPermissionPolicyCommand } from "@aws-sdk/client-waf"; // ES Modules import
// const { WAFClient, GetPermissionPolicyCommand } = require("@aws-sdk/client-waf"); // CommonJS import
const client = new WAFClient(config);
const input = { // GetPermissionPolicyRequest
  ResourceArn: "STRING_VALUE", // required
};
const command = new GetPermissionPolicyCommand(input);
const response = await client.send(command);
// { // GetPermissionPolicyResponse
//   Policy: "STRING_VALUE",
// };

GetPermissionPolicyCommand Input

See GetPermissionPolicyCommandInput for more details

Parameter
Type
Description
ResourceArn
Required
string | undefined

The Amazon Resource Name (ARN) of the RuleGroup for which you want to get the policy.

GetPermissionPolicyCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Policy
string | undefined

The IAM policy attached to the specified RuleGroup.

Throws

Name
Fault
Details
WAFInternalErrorException
server

The operation failed because of a system problem, even though the request was valid. Retry your request.

WAFNonexistentItemException
client

The operation failed because the referenced object doesn't exist.

WAFServiceException
Base exception class for all service exceptions from WAF service.