Skip to content

Rule

Source code in docs_src/capo_eventbridge/types/rule.py
class Rule(TypedDict, closed=True):
    name: NotRequired["capo_eventbridge.types.rule_name.RuleName"]
    """<p>The name of the rule.</p>"""
    arn: NotRequired["capo_eventbridge.types.rule_arn.RuleArn"]
    """<p>The Amazon Resource Name (ARN) of the rule.</p>"""
    event_pattern: NotRequired["capo_eventbridge.types.event_pattern.EventPattern"]
    """<p>The event pattern of the rule. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html">Events and Event Patterns</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>"""
    state: NotRequired["capo_eventbridge.types.rule_state.RuleState"]
    """<p>The state of the rule.</p> <p>Valid values include:</p> <ul> <li> <p> <code>DISABLED</code>: The rule is disabled. EventBridge does not match any events against the rule.</p> </li> <li> <p> <code>ENABLED</code>: The rule is enabled. EventBridge matches events against the rule, <i>except</i> for Amazon Web Services management events delivered through CloudTrail.</p> </li> <li> <p> <code>ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS</code>: The rule is enabled for all events, including Amazon Web Services management events delivered through CloudTrail.</p> <p>Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events">Logging management events</a> in the <i>CloudTrail User Guide</i>, and <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail">Filtering management events from Amazon Web Services services</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p> <p>This value is only valid for rules on the <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses">default</a> event bus or <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html">custom event buses</a>. It does not apply to <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html">partner event buses</a>.</p> </li> </ul>"""
    description: NotRequired["capo_eventbridge.types.rule_description.RuleDescription"]
    """<p>The description of the rule.</p>"""
    schedule_expression: NotRequired[
        "capo_eventbridge.types.schedule_expression.ScheduleExpression"
    ]
    """<p>The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html">Creating an Amazon EventBridge rule that runs on a schedule</a>.</p>"""
    role_arn: NotRequired["capo_eventbridge.types.role_arn.RoleArn"]
    """<p>The Amazon Resource Name (ARN) of the role that is used for target invocation.</p> <p>If you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a <code>RoleArn</code> with proper permissions in the <code>Target</code> structure, instead of here in this parameter.</p>"""
    managed_by: NotRequired["capo_eventbridge.types.managed_by.ManagedBy"]
    """<p>If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the principal name of the service that created the rule.</p>"""
    event_bus_name: NotRequired["capo_eventbridge.types.event_bus_name.EventBusName"]
    """<p>The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.</p>"""

arn instance-attribute

arn: NotRequired[RuleArn]

The Amazon Resource Name (ARN) of the rule.

description instance-attribute

description: NotRequired[RuleDescription]

The description of the rule.

event_bus_name instance-attribute

event_bus_name: NotRequired[EventBusName]

The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

event_pattern instance-attribute

event_pattern: NotRequired[EventPattern]

The event pattern of the rule. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide .

managed_by instance-attribute

managed_by: NotRequired[ManagedBy]

If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the principal name of the service that created the rule.

name instance-attribute

name: NotRequired[RuleName]

The name of the rule.

role_arn instance-attribute

role_arn: NotRequired[RoleArn]

The Amazon Resource Name (ARN) of the role that is used for target invocation.

If you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a RoleArn with proper permissions in the Target structure, instead of here in this parameter.

schedule_expression instance-attribute

schedule_expression: NotRequired[ScheduleExpression]

The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see Creating an Amazon EventBridge rule that runs on a schedule.

state instance-attribute

state: NotRequired[RuleState]

The state of the rule.

Valid values include:

  • DISABLED: The rule is disabled. EventBridge does not match any events against the rule.

  • ENABLED: The rule is enabled. EventBridge matches events against the rule, except for Amazon Web Services management events delivered through CloudTrail.

  • ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS: The rule is enabled for all events, including Amazon Web Services management events delivered through CloudTrail.

    Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .

    This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.