v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1475719557.8 KB

Associates a resource policy with a knowledge base. A resource policy allows other AWS accounts to access the knowledge base. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-managed-cross-account.html">Cross-account access for knowledge bases</a>.

put/resourcepolicy/{resourceArn}

Path parameters

resourceArnstring required

The Amazon Resource Name (ARN) of the knowledge base to attach the resource policy to.

Request body

policystring required

The JSON-formatted resource policy to associate with the knowledge base.

expectedRevisionIdstring

The expected revision identifier of the resource policy. Use this to prevent conflicts when multiple users update the same policy concurrently. Specify the <code>revisionId</code> from the most recent <code>GetResourcePolicy</code> or <code>PutResourcePolicy</code> response.

Response

Success

resourceArnstring required

The ARN of the knowledge base that the resource policy was attached to.

revisionIdstring required

The revision identifier of the resource policy. Use this value in the <code>expectedRevisionId</code> field of a subsequent <code>PutResourcePolicy</code> or <code>DeleteResourcePolicy</code> request.