delete_resource_policy_statement
(**kwargs)¶Deletes a policy statement from a resource policy. If you delete the last statement from a policy, the policy is deleted. If you specify a statement ID that doesn't exist in the policy, or if the bot or bot alias doesn't have a policy attached, Amazon Lex returns an exception.
See also: AWS API Documentation
Request Syntax
response = client.delete_resource_policy_statement(
resourceArn='string',
statementId='string',
expectedRevisionId='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
[REQUIRED]
The name of the statement (SID) to delete from the policy.
The identifier of the revision of the policy to delete the statement from. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.
If you don't specify a revision, Amazon Lex removes the current contents of the statement.
dict
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 statement was removed 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