create_event_rule
async
¶
create_event_rule(
notification_configuration_arn: NotificationConfigurationArn,
source: Source,
event_type: EventType,
regions: Regions,
*,
config_overrides: Optional[AsyncNotificationsClientConfig] = None,
event_pattern: Optional[EventRuleEventPattern] = None,
) -> CreateEventRuleResponse
Creates an EventRule that is associated with a specified NotificationConfiguration.
Parameters:
-
notification_configuration_arn(NotificationConfigurationArn) –The Amazon Resource Name (ARN) of the
NotificationConfigurationassociated with thisEventRule. -
source(Source) –The matched event source.
Must match one of the valid EventBridge sources. Only Amazon Web Services service sourced events are supported. For example,
aws.ec2andaws.cloudwatch. For more information, see Event delivery from Amazon Web Services services in the Amazon EventBridge User Guide. -
event_type(EventType) –The event type to match.
Must match one of the valid Amazon EventBridge event types. For example, EC2 Instance State-change Notification and Amazon CloudWatch Alarm State Change. For more information, see Event delivery from Amazon Web Services services in the Amazon EventBridge User Guide.
-
event_pattern(Optional[EventRuleEventPattern], default:None) –An additional event pattern used to further filter the events this
EventRulereceives.For more information, see Amazon EventBridge event patterns in the Amazon EventBridge User Guide.
-
regions(Regions) –A list of Amazon Web Services Regions that send events to this
EventRule.
Raises:
-
AccessDeniedException–User does not have sufficient access to perform this action.
-
ConflictException–Updating or deleting a resource can cause an inconsistent state.
-
InternalServerException–Unexpected error during processing of request.
-
ResourceNotFoundException–Request references a resource which does not exist.
-
ServiceQuotaExceededException–Request would cause a service quota to be exceeded.
-
ThrottlingException–Request was denied due to request throttling.
-
ValidationException–This exception is thrown when the notification event fails validation.
-
UnknownServiceError–The service returned an error code this client does not model.