aws::event-bus-rule

Create a event bus rule.

Example

 aws::event-bus-rule event-bus-rule
    event-bus: $(aws::event-bus event-bus-example)
    name: "EventBusRuleExample"
    description: "Event Bus rule example"
    event-pattern : "rule-policy.json"

    target
        arn: $(aws::sns-topic sns-topic-example).arn
        id: "target-example"
        input-path: "$.detail"

        retry-policy
            maximum-event-age-in-seconds: 6900
            maximum-retry-attempts: 100
        end
    end

    rule-state: ENABLED

    tags: {
        Name: "EventBusRuleExample"
    }
end

Attributes

Attribute Description
tags map Tags for the resource.
event-bus The event bus this rule will belong to.
name The name of the rule. (Required)
description The description of the rule.
event-pattern The event pattern for the rule. Cannot be set if scheduled-expression is set.
role The iam role to be associated with the rule.
scheduled-expression The scheduled expression for the rule. Cannot be set if event-pattern is set.
target set subresource

The list of targets for the rule. Minimum required items are 1.

arn
The source arn for the target. (Required)
id
A unique id for the target. (Required)
input
Valid JSON text passed to the target.
input-path
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target.
batch-parameters subresource

Batch parameter config for the target.

retry-strategy subresource

The batch retry strategy config for the batch parameter.

attempts
The number of times to attempt retry. (Required)
array-properties subresource

The batch array property config for the batch parameter.

size
The size of the array. (Required)
job-definition
The job definition for the batch parameter. (Required)
job-name
The job name for the batch parameter. (Required)
sqs-parameters subresource

Sqs parameter config for the target.

message-group-id
The message group id of the queue. (Required)
dead-letter-config subresource

Dead letter config for the target.

arn
The arn of SQS queue to be used as the dead letter config. (Required)
input-transformer subresource

Input transformer for the target.

input-paths-map map
Map of JSON paths to be extracted from the event. (Required)
input-template
Input template where you specify placeholders that will be filled with the values of the keys from input-paths-map to customize the data sent to the target. (Required)
kinesis-parameters subresource

Kinesis parameter config for the target.

partition-key-path
The JSON path to be extracted from the event and used as the partition key. (Required)
redshift-data-parameters subresource

Redshift data parameter config for the target.

database
The database name. (Required)
db-user
The user name for the database. (Required)
secret-manager-arn
The name or ARN of the secret that enables access to the database.
sql
The SQL statement test to run.
statement-name
The name of the sql statement.
with-event
When set to true, an event is sent back to EventBridge after the SQL statement runs.
retry-policy subresource

The retry policy for the target.

maximum-event-age-in-seconds
The max age in seconds. (Required)
maximum-retry-attempts
The max retry attempts. (Required)
run-command-parameters subresource

Run command parameter config for the target.

run-command-targets list subresource

The run command target configs. (Required)

key
Tag-key or InstanceIds. (Required)
values list
If key is InstanceIds, then this is a list of Amazon EC2 instance IDs. (Required)
sage-maker-pipeline-parameters subresource

Sagemaker pipeline parameter config for the target.

pipeline-parameters list subresource

A list of pipeline parameter configs. (Required)

name
Name of parameter to start execution of a SageMaker Model Building Pipeline. (Required)
value
Value of parameter to start execution of a SageMaker Model Building Pipeline. (Required)
http-parameters subresource

Http parameter config for the target.

header-parameters map
The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.
query-string-parameters map
The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.
path-parameter-values list
The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path wildcards (“*”).
ecs-parameters subresource

Ecs parameter config for the target.

capacity-provider-strategy list subresource

A list of capacity provider strategy item configs.

capacity-provider
The source capacity provider. (Required)
base
The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.
weight
The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied.
enable-ecs-managed-tags
When set to true, Amazon ECS managed tags are enabled for the task. Defaults to false.
enable-execute-command
When set to true, the execute command functionality for the containers in this task is enabled. Defaults to ``false.
launch-type
The launch type on which the task is running. Valid values are EC2, FARGATE or EXTERNAL.
network-configuration subresource

The network configuration for the ECS task.

vpc-configuration subresource

The vpc configuration. (Required)

assign-public-ip
Specifies whether the task’s elastic network interface receives a public IP address. (Required)
security-groups list
Specifies the security groups associated with the task. Maximum allowed items are 5.
subnets list
Specifies the subnets associated with the task. Maximum allowed items are 16.
group
The ECS task group for the task.
placement-constraint list subresource

The list of placement group configs.

type
The type of constraint. (Required)
expression
A cluster query language expression to apply to the constraint. (Required)
placement-strategy list subresource

The list of placement strategy configs.

field
The field to apply the placement strategy against. (Required)
type
The type of placement strategy. Valid values are random, spread or binpack. (Required)
platform-version
The platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0.
propagate-tags
Specifies whether to propagate the tags from the task definition to the task. Currently the only supported value is TASK_DEFINITION.
tags map
The metadata that you apply to the task to help you categorize and organize them.
task-count
The number of tasks to create based on task-definition.
task-definition
The task definition to use if the event target is an Amazon ECS task.
reference-id
The reference ID to use for the task.
rule-state Enable/Disable the rule. Defaults to ENABLED. Valid values are ENABLED or DISABLED.

Outputs

Attribute Description
arn The arn of the rule.