UserNotifications / Client / create_event_rule
create_event_rule¶
- UserNotifications.Client.create_event_rule(**kwargs)¶
Creates an EventRule that is associated with a specified
NotificationConfiguration.See also: AWS API Documentation
Request Syntax
response = client.create_event_rule( notificationConfigurationArn='string', source='string', eventType='string', eventPattern='string', regions=[ 'string', ] )
- Parameters:
notificationConfigurationArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the
NotificationConfigurationassociated with thisEventRule.source (string) –
[REQUIRED]
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.eventType (string) –
[REQUIRED]
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.
eventPattern (string) –
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 (list) –
[REQUIRED]
A list of Amazon Web Services Regions that send events to this
EventRule.(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'arn': 'string', 'notificationConfigurationArn': 'string', 'statusSummaryByRegion': { 'string': { 'status': 'ACTIVE'|'INACTIVE'|'CREATING'|'UPDATING'|'DELETING', 'reason': 'string' } } }
Response Structure
(dict) –
arn (string) –
The ARN of the resource.
notificationConfigurationArn (string) –
The ARN of a
NotificationConfiguration.statusSummaryByRegion (dict) –
A list of an
EventRule’s status by Region. Regions are mapped toEventRuleStatusSummary.(string) –
(dict) –
Provides additional information about the current
EventRulestatus.status (string) –
The status of the
EventRule.Values:
ACTIVEThe
EventRulecan process events.
INACTIVEThe
EventRulemay be unable to process events.
CREATINGThe
EventRuleis being created. OnlyGETandLISTcalls can be run.
UPDATINGThe
EventRuleis being updated. OnlyGETandLISTcalls can be run.
DELETINGThe
EventRuleis being deleted. OnlyGETandLISTcalls can be run.
reason (string) –
A human-readable reason for
EventRuleStatus.
Exceptions
UserNotifications.Client.exceptions.ServiceQuotaExceededExceptionUserNotifications.Client.exceptions.AccessDeniedExceptionUserNotifications.Client.exceptions.ValidationExceptionUserNotifications.Client.exceptions.InternalServerExceptionUserNotifications.Client.exceptions.ThrottlingExceptionUserNotifications.Client.exceptions.ConflictExceptionUserNotifications.Client.exceptions.ResourceNotFoundException