Skip to content

AWS::Events::Rule

Resource Type definition for AWS::Events::Rule

Generated by cfn-typegen --out cfn_types AWS::Events::Rule into cfn_types/events.py:

# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::Events resources."""

from collections.abc import Mapping, Sequence
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, Tag, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr


CONSTRAINTS:dict[str,Any]={
'AWS::Events::Rule':{'State':{'e':["DISABLED","ENABLED","ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS"]}},
}


ATTRIBUTES:dict[str,Any]={"AWS::Events::Rule":["Arn","RuleName"]}


RULES:dict[str,Any]={}
Nested types (25)

These are defined above the properties in the generated module.

class RuleHttpParameters(TypedDict, closed=True):
    PathParameterValues: NotRequired[Expr[list[Expr[str]]]]
    HeaderParameters: NotRequired[Expr[Mapping[str, Expr[str]]]]
    QueryStringParameters: NotRequired[Expr[Mapping[str, Expr[str]]]]


class RuleDeadLetterConfig(TypedDict, closed=True):
    Arn: NotRequired[Expr[str]]


class RuleRunCommandTarget(TypedDict, closed=True):
    Values: Expr[list[Expr[str]]]
    Key: Expr[str]


class RuleRunCommandParameters(TypedDict, closed=True):
    RunCommandTargets: Expr[Sequence[Expr[RuleRunCommandTarget]]]


class RuleInputTransformer(TypedDict, closed=True):
    InputPathsMap: NotRequired[Expr[Mapping[str, Expr[str]]]]
    InputTemplate: Expr[str]


class RuleKinesisParameters(TypedDict, closed=True):
    PartitionKeyPath: Expr[str]


class RuleRedshiftDataParameters(TypedDict, closed=True):
    StatementName: NotRequired[Expr[str]]
    Sqls: NotRequired[Expr[list[Expr[str]]]]
    Database: Expr[str]
    SecretManagerArn: NotRequired[Expr[str]]
    DbUser: NotRequired[Expr[str]]
    Sql: NotRequired[Expr[str]]
    WithEvent: NotRequired[Expr[bool]]


class RuleAppSyncParameters(TypedDict, closed=True):
    GraphQLOperation: Expr[str]


class RuleSqsParameters(TypedDict, closed=True):
    MessageGroupId: Expr[str]


class RulePlacementConstraint(TypedDict, closed=True):
    Type: NotRequired[Expr[str]]
    Expression: NotRequired[Expr[str]]


class RulePlacementStrategy(TypedDict, closed=True):
    Field: NotRequired[Expr[str]]
    Type: NotRequired[Expr[str]]


class RuleCapacityProviderStrategyItem(TypedDict, closed=True):
    CapacityProvider: Expr[str]
    Base: NotRequired[Expr[int]]
    Weight: NotRequired[Expr[int]]


class RuleAwsVpcConfiguration(TypedDict, closed=True):
    SecurityGroups: NotRequired[Expr[list[Expr[str]]]]
    Subnets: Expr[list[Expr[str]]]
    AssignPublicIp: NotRequired[Expr[str]]


class RuleNetworkConfiguration(TypedDict, closed=True):
    AwsVpcConfiguration: NotRequired[Expr[RuleAwsVpcConfiguration]]


class RuleEcsParameters(TypedDict, closed=True):
    PlatformVersion: NotRequired[Expr[str]]
    Group: NotRequired[Expr[str]]
    EnableECSManagedTags: NotRequired[Expr[bool]]
    EnableExecuteCommand: NotRequired[Expr[bool]]
    PlacementConstraints: NotRequired[Expr[Sequence[Expr[RulePlacementConstraint]]]]
    PropagateTags: NotRequired[Expr[str]]
    TaskCount: NotRequired[Expr[int]]
    PlacementStrategies: NotRequired[Expr[Sequence[Expr[RulePlacementStrategy]]]]
    CapacityProviderStrategy: NotRequired[Expr[Sequence[Expr[RuleCapacityProviderStrategyItem]]]]
    LaunchType: NotRequired[Expr[str]]
    ReferenceId: NotRequired[Expr[str]]
    TagList: NotRequired[Expr[Sequence[Expr[Tag]]]]
    NetworkConfiguration: NotRequired[Expr[RuleNetworkConfiguration]]
    TaskDefinitionArn: Expr[str]


class RuleBatchArrayProperties(TypedDict, closed=True):
    Size: NotRequired[Expr[int]]


class RuleBatchRetryStrategy(TypedDict, closed=True):
    Attempts: NotRequired[Expr[int]]


class RuleBatchParameters(TypedDict, closed=True):
    ArrayProperties: NotRequired[Expr[RuleBatchArrayProperties]]
    JobName: Expr[str]
    RetryStrategy: NotRequired[Expr[RuleBatchRetryStrategy]]
    JobDefinition: Expr[str]


class RuleSageMakerPipelineParameter(TypedDict, closed=True):
    Value: Expr[str]
    Name: Expr[str]


class RuleSageMakerPipelineParameters(TypedDict, closed=True):
    PipelineParameterList: NotRequired[Expr[Sequence[Expr[RuleSageMakerPipelineParameter]]]]


class RuleRetryPolicy(TypedDict, closed=True):
    MaximumRetryAttempts: NotRequired[Expr[int]]
    MaximumEventAgeInSeconds: NotRequired[Expr[int]]


class RuleTarget(TypedDict, closed=True):
    InputPath: NotRequired[Expr[str]]
    HttpParameters: NotRequired[Expr[RuleHttpParameters]]
    DeadLetterConfig: NotRequired[Expr[RuleDeadLetterConfig]]
    RunCommandParameters: NotRequired[Expr[RuleRunCommandParameters]]
    InputTransformer: NotRequired[Expr[RuleInputTransformer]]
    KinesisParameters: NotRequired[Expr[RuleKinesisParameters]]
    RoleArn: NotRequired[Expr[str]]
    RedshiftDataParameters: NotRequired[Expr[RuleRedshiftDataParameters]]
    AppSyncParameters: NotRequired[Expr[RuleAppSyncParameters]]
    Input: NotRequired[Expr[str]]
    SqsParameters: NotRequired[Expr[RuleSqsParameters]]
    EcsParameters: NotRequired[Expr[RuleEcsParameters]]
    BatchParameters: NotRequired[Expr[RuleBatchParameters]]
    Id: Expr[str]
    Arn: Expr[str]
    SageMakerPipelineParameters: NotRequired[Expr[RuleSageMakerPipelineParameters]]
    RetryPolicy: NotRequired[Expr[RuleRetryPolicy]]


class RuleProps(TypedDict, closed=True):
    'Resource Type definition for AWS::Events::Rule'
    EventBusName: NotRequired[Expr[str]]
    'The name or ARN of the event bus associated with the rule.'
    EventPattern: NotRequired[Expr[str] | Expr[Mapping[str, Any]]]
    'The event pattern of the rule.'
    ScheduleExpression: NotRequired[Expr[str]]
    'The scheduling expression.'
    Description: NotRequired[Expr[str]]
    'The description of the rule.'
    State: NotRequired[Expr[str]]
    'The state of the rule.'
    Targets: NotRequired[Expr[Sequence[Expr[RuleTarget]]]]
    'Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.'
    RoleArn: NotRequired[Expr[str]]
    'The Amazon Resource Name (ARN) of the role that is used for target invocation.'
    Tags: NotRequired[Expr[Sequence[Expr[Tag]]]]
    'Any tags assigned to the event rule.'
    Name: NotRequired[Expr[str]]
    'The name of the rule.'


class Rule(ResourceAttrs):
    'Resource Type definition for AWS::Events::Rule'
    Type: Literal['AWS::Events::Rule']
    Properties: NotRequired[RuleProps]


def rule(
    *,
    depends_on: DependsOn | None = None,
    deletion_policy: DeletionPolicy | None = None,
    update_replace_policy: UpdateReplacePolicy | None = None,
    condition: str | None = None,
    metadata: dict[str, Any] | None = None,
    **props: Unpack[RuleProps],
) -> Rule:
    return build('AWS::Events::Rule', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)

Attributes

Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.

  • Arn
  • RuleName