Lambda / Client / delete_resource_policy

delete_resource_policy#

Lambda.Client.delete_resource_policy(**kwargs)#

Note

The option to create and modify full JSON resource-based policies, and to use the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won’t be available in all Amazon Web Services Regions until September 30, 2024.

Deletes a resource-based policy from a function.

See also: AWS API Documentation

Request Syntax

response = client.delete_resource_policy(
    ResourceArn='string',
    RevisionId='string'
)
Parameters:
  • ResourceArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the function you want to delete the policy from. You can use either a qualified or an unqualified ARN, but the value you specify must be a complete ARN and wildcard characters are not accepted.

  • RevisionId (string) – Delete the existing policy only if its revision ID matches the string you specify. To find the revision ID of the policy currently attached to your function, use the GetResourcePolicy action.

Returns:

None

Exceptions

  • Lambda.Client.exceptions.ServiceException

  • Lambda.Client.exceptions.ResourceNotFoundException

  • Lambda.Client.exceptions.ResourceConflictException

  • Lambda.Client.exceptions.InvalidParameterValueException

  • Lambda.Client.exceptions.TooManyRequestsException

  • Lambda.Client.exceptions.PreconditionFailedException