v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-14107861793.8 KB

Creates a new resource policy with the specified policy statements.

post/policy/{resourceArn}/

Path parameters

resourceArnstring required

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

Request body

policystring required
<p>A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html"> IAM JSON policy reference </a>. </p> <p>If the policy isn't valid, Amazon Lex returns a validation exception.</p>

Response

Success

resourceArnstring

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy was attached to.

revisionIdstring

The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.