EventBridgeV2 / Client / delete_resource_policy

delete_resource_policy

EventBridgeV2.Client.delete_resource_policy(**kwargs)

Deletes the named resource policy attached to an event bus.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • PolicyName (string) – Which named policy to delete. Defaults to “default” when omitted (a delete AWS Resource Access Manager makes on the owner’s behalf resolves to “AWS_RAM” instead). The two writers are exclusive in both directions — only Resource Access Manager can delete “AWS_RAM”, and only the bus owner can delete “default” — so naming the other party’s policy fails with AccessDeniedException. A well-formed name that is neither of the two fails with InvalidInputException.

  • ExpectedRevisionId (string) – The delete succeeds only if the named policy’s current revision ID matches this value; if it differs or the policy does not exist, the operation fails with ConflictException. The “NO_POLICY” sentinel is not valid here. When omitted, deleting an absent policy is an idempotent success. Supplying this value makes the delete non-idempotent: once it succeeds the expected revision no longer exists, so retrying an unanswered request fails with ConflictException even though the policy was deleted. To establish the outcome, read the policy back: ResourceNotFoundException means the delete took effect.

Return type:

dict

Returns:

Response Syntax

{
    'RevisionId': 'string'
}

Response Structure

  • (dict) –

    • RevisionId (string) –

      Revision ID of the policy that was deleted. Absent when no policy was deleted.

Exceptions

  • EventBridgeV2.Client.exceptions.AccessDeniedException

  • EventBridgeV2.Client.exceptions.ResourceNotFoundException

  • EventBridgeV2.Client.exceptions.ThrottlingException

  • EventBridgeV2.Client.exceptions.ConflictException

  • EventBridgeV2.Client.exceptions.InvalidInputException

  • EventBridgeV2.Client.exceptions.InternalException

  • EventBridgeV2.Client.exceptions.ConcurrentModificationException