Skip to main content

targets_by_rules

Creates, updates, deletes, gets or lists a targets_by_rules resource.

Overview

Nametargets_by_rules
TypeResource
Idaws.events.targets_by_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
app_sync_parametersobjectContains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
arnstringThe Amazon Resource Name (ARN) of the target.
batch_parametersobjectIf the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see Jobs in the Batch User Guide.
dead_letter_configobjectConfiguration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ). For more information, see Using dead-letter queues to process undelivered events in the EventBridge User Guide.
ecs_parametersobjectContains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see Task Definitions in the Amazon EC2 Container Service Developer Guide.
http_parametersobjectContains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination. If you specify an API Gateway API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.
idstringThe ID of the target within the specified rule. Use this ID to reference the target when updating the rule. We recommend using a memorable and unique string. (pattern: <code>[.-_A-Za-z0-9]+</code>)
inputstringValid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see The JavaScript Object Notation (JSON) Data Interchange Format.
input_pathstringThe value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You may use JSON dot notation or bracket notation. For more information about JSON paths, see JSONPath.
input_transformerobjectSettings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.
kinesis_parametersobjectThe custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the eventId as the partition key.
redshift_data_parametersobjectContains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster. If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.
retry_policyobjectThe retry policy configuration to use for the dead-letter queue.
role_arnstringThe Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.
run_command_parametersobjectParameters used when you are using the rule to invoke Amazon EC2 Run Command.
sage_maker_pipeline_parametersobjectContains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline. If you specify a SageMaker AI Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.
sqs_parametersobjectContains the message group ID to use when the target is a FIFO queue. If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_targets_by_ruleselectregionLists the targets assigned to the specified rule. The maximum number of results per page for requests is 100.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Lists the targets assigned to the specified rule. The maximum number of results per page for requests is 100.

SELECT
app_sync_parameters,
arn,
batch_parameters,
dead_letter_config,
ecs_parameters,
http_parameters,
id,
input,
input_path,
input_transformer,
kinesis_parameters,
redshift_data_parameters,
retry_policy,
role_arn,
run_command_parameters,
sage_maker_pipeline_parameters,
sqs_parameters
FROM aws.events.targets_by_rules
WHERE region = '{{ region }}' -- required
;