LexModelsV2 / Client / delete_resource_policy

delete_resource_policy#

LexModelsV2.Client.delete_resource_policy(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.delete_resource_policy(
    resourceArn='string',
    expectedRevisionId='string'
)
Parameters:
  • resourceArn (string) –

    [REQUIRED]

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

  • expectedRevisionId (string) –

    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.

Return type:

dict

Returns:

Response Syntax

{
    'resourceArn': 'string',
    'revisionId': 'string'
}

Response Structure

  • (dict) –

    • resourceArn (string) –

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

    • 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.

Exceptions

  • LexModelsV2.Client.exceptions.ResourceNotFoundException

  • LexModelsV2.Client.exceptions.PreconditionFailedException

  • LexModelsV2.Client.exceptions.InternalServerException

  • LexModelsV2.Client.exceptions.ThrottlingException