---
title: "POST /policy/{resourceArn}/"
method: POST
path: "/policy/{resourceArn}/"
---

# POST /policy/{resourceArn}/

`POST /policy/{resourceArn}/`

Creates a new resource policy with the specified policy statements.

## Path parameters

- `resourceArn` string, required

## Request body

- object
  - `policy` string, 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 `200`

Success

- CreateResourcePolicyResponse
  - `resourceArn` string — The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy was attached to.
  - `revisionId` string — 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.

## Other responses

- `480` — ResourceNotFoundException
- `481` — ServiceQuotaExceededException
- `482` — PreconditionFailedException
- `483` — ValidationException
- `484` — InternalServerException
- `485` — ThrottlingException

---

[API](https://skmtc.net/aws/apis/lexv2-models.md) · [All operations](https://skmtc.net/aws/apis/lexv2-models/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/lexv2-models/versions/6997ba482d72/schema)
