Class: AWSCDK::Events::CfnRule::TargetProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Events::CfnRule::TargetProperty
- Defined in:
- events/cfn_rule.rb
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 AWS Accounts in the Amazon EventBridge User Guide .
Instance Attribute Summary collapse
-
#app_sync_parameters ⇒ AWSCDK::IResolvable, ...
readonly
Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.
-
#arn ⇒ String
readonly
The Amazon Resource Name (ARN) of the target.
-
#batch_parameters ⇒ AWSCDK::IResolvable, ...
readonly
If the event target is an AWS Batch job, this contains the job definition, job name, and other parameters.
-
#dead_letter_config ⇒ AWSCDK::IResolvable, ...
readonly
The
DeadLetterConfigthat defines the target queue to send dead-letter queue events to. -
#ecs_parameters ⇒ AWSCDK::IResolvable, ...
readonly
Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task.
-
#http_parameters ⇒ AWSCDK::IResolvable, ...
readonly
Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.
-
#id ⇒ String
readonly
The ID of the target within the specified rule.
-
#input ⇒ String?
readonly
Valid JSON text passed to the target.
-
#input_path ⇒ String?
readonly
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target.
-
#input_transformer ⇒ AWSCDK::IResolvable, ...
readonly
Settings to enable you to provide custom input to a target based on certain event data.
-
#kinesis_parameters ⇒ AWSCDK::IResolvable, ...
readonly
The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream.
-
#redshift_data_parameters ⇒ AWSCDK::IResolvable, ...
readonly
Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.
-
#retry_policy ⇒ AWSCDK::IResolvable, ...
readonly
The retry policy configuration to use for the dead-letter queue.
-
#role_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered.
-
#run_command_parameters ⇒ AWSCDK::IResolvable, ...
readonly
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
-
#sage_maker_pipeline_parameters ⇒ AWSCDK::IResolvable, ...
readonly
Contains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline.
-
#sqs_parameters ⇒ AWSCDK::IResolvable, ...
readonly
Contains the message group ID to use when the target is an Amazon SQS fair or FIFO queue.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(arn:, id:, app_sync_parameters: nil, batch_parameters: nil, dead_letter_config: nil, ecs_parameters: nil, http_parameters: nil, input: nil, input_path: nil, input_transformer: nil, kinesis_parameters: nil, redshift_data_parameters: nil, retry_policy: nil, role_arn: nil, run_command_parameters: nil, sage_maker_pipeline_parameters: nil, sqs_parameters: nil) ⇒ TargetProperty
constructor
A new instance of TargetProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(arn:, id:, app_sync_parameters: nil, batch_parameters: nil, dead_letter_config: nil, ecs_parameters: nil, http_parameters: nil, input: nil, input_path: nil, input_transformer: nil, kinesis_parameters: nil, redshift_data_parameters: nil, retry_policy: nil, role_arn: nil, run_command_parameters: nil, sage_maker_pipeline_parameters: nil, sqs_parameters: nil) ⇒ TargetProperty
Returns a new instance of TargetProperty.
1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 |
# File 'events/cfn_rule.rb', line 1900 def initialize(arn:, id:, app_sync_parameters: nil, batch_parameters: nil, dead_letter_config: nil, ecs_parameters: nil, http_parameters: nil, input: nil, input_path: nil, input_transformer: nil, kinesis_parameters: nil, redshift_data_parameters: nil, retry_policy: nil, role_arn: nil, run_command_parameters: nil, sage_maker_pipeline_parameters: nil, sqs_parameters: nil) @arn = arn Jsii::Type.check_type(@arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arn") @id = id Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") @app_sync_parameters = app_sync_parameters.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::AppSyncParametersProperty.new(**app_sync_parameters.transform_keys(&:to_sym)) : app_sync_parameters Jsii::Type.check_type(@app_sync_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5BcHBTeW5jUGFyYW1ldGVyc1Byb3BlcnR5In1dfX0=")), "appSyncParameters") unless @app_sync_parameters.nil? @batch_parameters = batch_parameters.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::BatchParametersProperty.new(**batch_parameters.transform_keys(&:to_sym)) : batch_parameters Jsii::Type.check_type(@batch_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5CYXRjaFBhcmFtZXRlcnNQcm9wZXJ0eSJ9XX19")), "batchParameters") unless @batch_parameters.nil? @dead_letter_config = dead_letter_config.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::DeadLetterConfigProperty.new(**dead_letter_config.transform_keys(&:to_sym)) : dead_letter_config Jsii::Type.check_type(@dead_letter_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5EZWFkTGV0dGVyQ29uZmlnUHJvcGVydHkifV19fQ==")), "deadLetterConfig") unless @dead_letter_config.nil? @ecs_parameters = ecs_parameters.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::ECSParametersProperty.new(**ecs_parameters.transform_keys(&:to_sym)) : ecs_parameters Jsii::Type.check_type(@ecs_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5FY3NQYXJhbWV0ZXJzUHJvcGVydHkifV19fQ==")), "ecsParameters") unless @ecs_parameters.nil? @http_parameters = http_parameters.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::HttpParametersProperty.new(**http_parameters.transform_keys(&:to_sym)) : http_parameters Jsii::Type.check_type(@http_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5IdHRwUGFyYW1ldGVyc1Byb3BlcnR5In1dfX0=")), "httpParameters") unless @http_parameters.nil? @input = input Jsii::Type.check_type(@input, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "input") unless @input.nil? @input_path = input_path Jsii::Type.check_type(@input_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inputPath") unless @input_path.nil? @input_transformer = input_transformer.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::InputTransformerProperty.new(**input_transformer.transform_keys(&:to_sym)) : input_transformer Jsii::Type.check_type(@input_transformer, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5JbnB1dFRyYW5zZm9ybWVyUHJvcGVydHkifV19fQ==")), "inputTransformer") unless @input_transformer.nil? @kinesis_parameters = kinesis_parameters.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::KinesisParametersProperty.new(**kinesis_parameters.transform_keys(&:to_sym)) : kinesis_parameters Jsii::Type.check_type(@kinesis_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5LaW5lc2lzUGFyYW1ldGVyc1Byb3BlcnR5In1dfX0=")), "kinesisParameters") unless @kinesis_parameters.nil? @redshift_data_parameters = redshift_data_parameters.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::RedshiftDataParametersProperty.new(**redshift_data_parameters.transform_keys(&:to_sym)) : redshift_data_parameters Jsii::Type.check_type(@redshift_data_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5SZWRzaGlmdERhdGFQYXJhbWV0ZXJzUHJvcGVydHkifV19fQ==")), "redshiftDataParameters") unless @redshift_data_parameters.nil? @retry_policy = retry_policy.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::RetryPolicyProperty.new(**retry_policy.transform_keys(&:to_sym)) : retry_policy Jsii::Type.check_type(@retry_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5SZXRyeVBvbGljeVByb3BlcnR5In1dfX0=")), "retryPolicy") unless @retry_policy.nil? @role_arn = role_arn Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") unless @role_arn.nil? @run_command_parameters = run_command_parameters.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::RunCommandParametersProperty.new(**run_command_parameters.transform_keys(&:to_sym)) : run_command_parameters Jsii::Type.check_type(@run_command_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5SdW5Db21tYW5kUGFyYW1ldGVyc1Byb3BlcnR5In1dfX0=")), "runCommandParameters") unless @run_command_parameters.nil? @sage_maker_pipeline_parameters = sage_maker_pipeline_parameters.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::SageMakerPipelineParametersProperty.new(**sage_maker_pipeline_parameters.transform_keys(&:to_sym)) : sage_maker_pipeline_parameters Jsii::Type.check_type(@sage_maker_pipeline_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5TYWdlTWFrZXJQaXBlbGluZVBhcmFtZXRlcnNQcm9wZXJ0eSJ9XX19")), "sageMakerPipelineParameters") unless @sage_maker_pipeline_parameters.nil? @sqs_parameters = sqs_parameters.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::SQSParametersProperty.new(**sqs_parameters.transform_keys(&:to_sym)) : sqs_parameters Jsii::Type.check_type(@sqs_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5TcXNQYXJhbWV0ZXJzUHJvcGVydHkifV19fQ==")), "sqsParameters") unless @sqs_parameters.nil? end |
Instance Attribute Details
#app_sync_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.
1953 1954 1955 |
# File 'events/cfn_rule.rb', line 1953 def app_sync_parameters @app_sync_parameters end |
#arn ⇒ String (readonly)
The Amazon Resource Name (ARN) of the target.
1941 1942 1943 |
# File 'events/cfn_rule.rb', line 1941 def arn @arn end |
#batch_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
If the event target is an AWS Batch job, this contains the job definition, job name, and other parameters.
For more information, see Jobs in the AWS Batch User Guide .
1960 1961 1962 |
# File 'events/cfn_rule.rb', line 1960 def batch_parameters @batch_parameters end |
#dead_letter_config ⇒ AWSCDK::IResolvable, ... (readonly)
The DeadLetterConfig that defines the target queue to send dead-letter queue events to.
1965 1966 1967 |
# File 'events/cfn_rule.rb', line 1965 def dead_letter_config @dead_letter_config end |
#ecs_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
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 .
1972 1973 1974 |
# File 'events/cfn_rule.rb', line 1972 def ecs_parameters @ecs_parameters end |
#http_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
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.
1979 1980 1981 |
# File 'events/cfn_rule.rb', line 1979 def http_parameters @http_parameters end |
#id ⇒ String (readonly)
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.
1948 1949 1950 |
# File 'events/cfn_rule.rb', line 1948 def id @id end |
#input ⇒ String? (readonly)
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 .
1986 1987 1988 |
# File 'events/cfn_rule.rb', line 1986 def input @input end |
#input_path ⇒ String? (readonly)
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 .
1993 1994 1995 |
# File 'events/cfn_rule.rb', line 1993 def input_path @input_path end |
#input_transformer ⇒ AWSCDK::IResolvable, ... (readonly)
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.
2000 2001 2002 |
# File 'events/cfn_rule.rb', line 2000 def input_transformer @input_transformer end |
#kinesis_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
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 event_id as the partition key.
2007 2008 2009 |
# File 'events/cfn_rule.rb', line 2007 def kinesis_parameters @kinesis_parameters end |
#redshift_data_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
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.
2014 2015 2016 |
# File 'events/cfn_rule.rb', line 2014 def redshift_data_parameters @redshift_data_parameters end |
#retry_policy ⇒ AWSCDK::IResolvable, ... (readonly)
The retry policy configuration to use for the dead-letter queue.
2019 2020 2021 |
# File 'events/cfn_rule.rb', line 2019 def retry_policy @retry_policy end |
#role_arn ⇒ String? (readonly)
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.
2026 2027 2028 |
# File 'events/cfn_rule.rb', line 2026 def role_arn @role_arn end |
#run_command_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
2031 2032 2033 |
# File 'events/cfn_rule.rb', line 2031 def run_command_parameters @run_command_parameters end |
#sage_maker_pipeline_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
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.
2038 2039 2040 |
# File 'events/cfn_rule.rb', line 2038 def sage_maker_pipeline_parameters @sage_maker_pipeline_parameters end |
#sqs_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
Contains the message group ID to use when the target is an Amazon SQS fair or FIFO queue.
If you specify a fair or FIFO queue as a target, the queue must have content-based deduplication enabled.
2045 2046 2047 |
# File 'events/cfn_rule.rb', line 2045 def sqs_parameters @sqs_parameters end |
Class Method Details
.jsii_properties ⇒ Object
2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 |
# File 'events/cfn_rule.rb', line 2047 def self.jsii_properties { :arn => "arn", :id => "id", :app_sync_parameters => "appSyncParameters", :batch_parameters => "batchParameters", :dead_letter_config => "deadLetterConfig", :ecs_parameters => "ecsParameters", :http_parameters => "httpParameters", :input => "input", :input_path => "inputPath", :input_transformer => "inputTransformer", :kinesis_parameters => "kinesisParameters", :redshift_data_parameters => "redshiftDataParameters", :retry_policy => "retryPolicy", :role_arn => "roleArn", :run_command_parameters => "runCommandParameters", :sage_maker_pipeline_parameters => "sageMakerPipelineParameters", :sqs_parameters => "sqsParameters", } end |
Instance Method Details
#to_jsii ⇒ Object
2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 |
# File 'events/cfn_rule.rb', line 2069 def to_jsii result = {} result.merge!({ "arn" => @arn, "id" => @id, "appSyncParameters" => @app_sync_parameters, "batchParameters" => @batch_parameters, "deadLetterConfig" => @dead_letter_config, "ecsParameters" => @ecs_parameters, "httpParameters" => @http_parameters, "input" => @input, "inputPath" => @input_path, "inputTransformer" => @input_transformer, "kinesisParameters" => @kinesis_parameters, "redshiftDataParameters" => @redshift_data_parameters, "retryPolicy" => @retry_policy, "roleArn" => @role_arn, "runCommandParameters" => @run_command_parameters, "sageMakerPipelineParameters" => @sage_maker_pipeline_parameters, "sqsParameters" => @sqs_parameters, }) result.compact end |