class Amazonite::EventBridge::Target

Overview

Targets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can be set as a target, see PutTargets.

If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a RoleArn with proper permissions in the Target structure. For more information, see Sending and Receiving Events Between Amazon Web Services Accounts in the Amazon EventBridge User Guide.

Included Modules

Defined in:

eventbridge/target.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(id : String, arn : String, role_arn : String | Nil = nil, input : String | Nil = nil, input_path : String | Nil = nil, input_transformer : InputTransformer | Nil = nil, kinesis_parameters : KinesisParameters | Nil = nil, run_command_parameters : RunCommandParameters | Nil = nil, ecs_parameters : EcsParameters | Nil = nil, batch_parameters : BatchParameters | Nil = nil, sqs_parameters : SqsParameters | Nil = nil, http_parameters : HttpParameters | Nil = nil, redshift_data_parameters : RedshiftDataParameters | Nil = nil, sage_maker_pipeline_parameters : SageMakerPipelineParameters | Nil = nil, dead_letter_config : DeadLetterConfig | Nil = nil, retry_policy : RetryPolicy | Nil = nil, app_sync_parameters : AppSyncParameters | Nil = nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def app_sync_parameters : AppSyncParameters | Nil #

Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.


[View source]
def app_sync_parameters=(app_sync_parameters : AppSyncParameters | Nil) #

Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.


[View source]
def arn : String #

The Amazon Resource Name (ARN) of the target.


[View source]
def arn=(arn : String) #

The Amazon Resource Name (ARN) of the target.


[View source]
def batch_parameters : BatchParameters | Nil #

If 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.


[View source]
def batch_parameters=(batch_parameters : BatchParameters | Nil) #

If 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.


[View source]
def dead_letter_config : DeadLetterConfig | Nil #

The DeadLetterConfig that defines the target queue to send dead-letter queue events to.


[View source]
def dead_letter_config=(dead_letter_config : DeadLetterConfig | Nil) #

The DeadLetterConfig that defines the target queue to send dead-letter queue events to.


[View source]
def ecs_parameters : EcsParameters | Nil #

Contains 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.


[View source]
def ecs_parameters=(ecs_parameters : EcsParameters | Nil) #

Contains 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.


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def http_parameters : HttpParameters | Nil #

Contains 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.


[View source]
def http_parameters=(http_parameters : HttpParameters | Nil) #

Contains 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.


[View source]
def id : String #

The 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.


[View source]
def id=(id : String) #

The 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.


[View source]
def input : String | Nil #

Valid 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.


[View source]
def input=(input : String | Nil) #

Valid 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.


[View source]
def input_path : String | Nil #

The 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.


[View source]
def input_path=(input_path : String | Nil) #

The 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.


[View source]
def input_transformer : InputTransformer | Nil #

Settings 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.


[View source]
def input_transformer=(input_transformer : InputTransformer | Nil) #

Settings 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.


[View source]
def kinesis_parameters : KinesisParameters | Nil #

The 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.


[View source]
def kinesis_parameters=(kinesis_parameters : KinesisParameters | Nil) #

The 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.


[View source]
def redshift_data_parameters : RedshiftDataParameters | Nil #

Contains 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.


[View source]
def redshift_data_parameters=(redshift_data_parameters : RedshiftDataParameters | Nil) #

Contains 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.


[View source]
def retry_policy : RetryPolicy | Nil #

The retry policy configuration to use for the dead-letter queue.


[View source]
def retry_policy=(retry_policy : RetryPolicy | Nil) #

The retry policy configuration to use for the dead-letter queue.


[View source]
def role_arn : String | Nil #

The 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.


[View source]
def role_arn=(role_arn : String | Nil) #

The 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.


[View source]
def run_command_parameters : RunCommandParameters | Nil #

Parameters used when you are using the rule to invoke Amazon EC2 Run Command.


[View source]
def run_command_parameters=(run_command_parameters : RunCommandParameters | Nil) #

Parameters used when you are using the rule to invoke Amazon EC2 Run Command.


[View source]
def sage_maker_pipeline_parameters : SageMakerPipelineParameters | Nil #

Contains 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.


[View source]
def sage_maker_pipeline_parameters=(sage_maker_pipeline_parameters : SageMakerPipelineParameters | Nil) #

Contains 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.


[View source]
def sqs_parameters : SqsParameters | Nil #

Contains 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.


[View source]
def sqs_parameters=(sqs_parameters : SqsParameters | Nil) #

Contains 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.


[View source]
def validate! : Nil #

[View source]