EventBridgeV2 / Client / exceptions / PublicPolicyException
PublicPolicyException¶
- class EventBridgeV2.Client.exceptions.PublicPolicyException¶
The policy was rejected because it would grant public access to the event bus. A statement grants public access when its principal is a wildcard and no condition limits the callers to specific AWS accounts or principals. To fix it, replace the wildcard principal with specific principals, or add a condition that limits the callers to specific AWS accounts. Conditions on event content (events:source, events:detail-type, events:Metadata/*) do not identify the caller and do not make a wildcard principal non-public. Returned only for the “default” policy; the “AWS_RAM” policy is composed by AWS Resource Access Manager and never grants public access.
Example
try: ... except client.exceptions.PublicPolicyException as e: print(e.response)
- response¶
The parsed error response. All exceptions have a top level
Errorkey that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.Syntax
{ 'Message': 'string', 'Error': { 'Code': 'string', 'Message': 'string' } }
Structure
(dict) –
The policy was rejected because it would grant public access to the event bus. A statement grants public access when its principal is a wildcard and no condition limits the callers to specific AWS accounts or principals. To fix it, replace the wildcard principal with specific principals, or add a condition that limits the callers to specific AWS accounts. Conditions on event content (events:source, events:detail-type, events:Metadata/*) do not identify the caller and do not make a wildcard principal non-public. Returned only for the “default” policy; the “AWS_RAM” policy is composed by AWS Resource Access Manager and never grants public access.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.