DeleteResourcePolicy - Amazon Lex

DeleteResourcePolicy

Removes an existing policy from a bot or bot alias. If the resource doesn't have a policy attached, Amazon Lex returns an exception.

Request Syntax

DELETE /policy/resourceArn/?expectedRevisionId=expectedRevisionId HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

expectedRevisionId

The identifier of the revision to edit. If this ID doesn't match the current revision number, Amazon Lex returns an exception

If you don't specify a revision ID, Amazon Lex will delete the current policy.

Length Constraints: Minimum length of 1. Maximum length of 5.

Pattern: ^[0-9]+$

resourceArn

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

Length Constraints: Minimum length of 1. Maximum length of 1011.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 204 Content-type: application/json { "resourceArn": "string", "revisionId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 204 response.

The following data is returned in JSON format by the service.

resourceArn

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

revisionId

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.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 5.

Pattern: ^[0-9]+$

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

HTTP Status Code: 500

PreconditionFailedException

HTTP Status Code: 412

ResourceNotFoundException

HTTP Status Code: 404

ThrottlingException

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: