// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>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 <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html">PutTargets</a>.</p>
/// <p>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 <code>RoleArn</code> with proper permissions in the <code>Target</code> structure. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html">Sending and Receiving Events Between Amazon Web Services Accounts</a> in the <i>Amazon EventBridge User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Target {
/// <p>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.</p>
pub id: ::std::string::String,
/// <p>The Amazon Resource Name (ARN) of the target.</p>
pub arn: ::std::string::String,
/// <p>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.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
/// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
pub input: ::std::option::Option<::std::string::String>,
/// <p>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 <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
pub input_path: ::std::option::Option<::std::string::String>,
/// <p>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.</p>
pub input_transformer: ::std::option::Option<crate::types::InputTransformer>,
/// <p>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 <code>eventId</code> as the partition key.</p>
pub kinesis_parameters: ::std::option::Option<crate::types::KinesisParameters>,
/// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
pub run_command_parameters: ::std::option::Option<crate::types::RunCommandParameters>,
/// <p>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 <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
pub ecs_parameters: ::std::option::Option<crate::types::EcsParameters>,
/// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
pub batch_parameters: ::std::option::Option<crate::types::BatchParameters>,
/// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
/// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
pub sqs_parameters: ::std::option::Option<crate::types::SqsParameters>,
/// <p>Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.</p>
/// <p>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.</p>
pub http_parameters: ::std::option::Option<crate::types::HttpParameters>,
/// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
/// <p>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.</p>
pub redshift_data_parameters: ::std::option::Option<crate::types::RedshiftDataParameters>,
/// <p>Contains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline.</p>
/// <p>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.</p>
pub sage_maker_pipeline_parameters: ::std::option::Option<crate::types::SageMakerPipelineParameters>,
/// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
pub dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
/// <p>The retry policy configuration to use for the dead-letter queue.</p>
pub retry_policy: ::std::option::Option<crate::types::RetryPolicy>,
/// <p>Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.</p>
pub app_sync_parameters: ::std::option::Option<crate::types::AppSyncParameters>,
}
impl Target {
/// <p>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.</p>
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
/// <p>The Amazon Resource Name (ARN) of the target.</p>
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
/// <p>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.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
pub fn input(&self) -> ::std::option::Option<&str> {
self.input.as_deref()
}
/// <p>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 <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
pub fn input_path(&self) -> ::std::option::Option<&str> {
self.input_path.as_deref()
}
/// <p>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.</p>
pub fn input_transformer(&self) -> ::std::option::Option<&crate::types::InputTransformer> {
self.input_transformer.as_ref()
}
/// <p>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 <code>eventId</code> as the partition key.</p>
pub fn kinesis_parameters(&self) -> ::std::option::Option<&crate::types::KinesisParameters> {
self.kinesis_parameters.as_ref()
}
/// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
pub fn run_command_parameters(&self) -> ::std::option::Option<&crate::types::RunCommandParameters> {
self.run_command_parameters.as_ref()
}
/// <p>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 <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
pub fn ecs_parameters(&self) -> ::std::option::Option<&crate::types::EcsParameters> {
self.ecs_parameters.as_ref()
}
/// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
pub fn batch_parameters(&self) -> ::std::option::Option<&crate::types::BatchParameters> {
self.batch_parameters.as_ref()
}
/// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
/// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
pub fn sqs_parameters(&self) -> ::std::option::Option<&crate::types::SqsParameters> {
self.sqs_parameters.as_ref()
}
/// <p>Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.</p>
/// <p>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.</p>
pub fn http_parameters(&self) -> ::std::option::Option<&crate::types::HttpParameters> {
self.http_parameters.as_ref()
}
/// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
/// <p>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.</p>
pub fn redshift_data_parameters(&self) -> ::std::option::Option<&crate::types::RedshiftDataParameters> {
self.redshift_data_parameters.as_ref()
}
/// <p>Contains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline.</p>
/// <p>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.</p>
pub fn sage_maker_pipeline_parameters(&self) -> ::std::option::Option<&crate::types::SageMakerPipelineParameters> {
self.sage_maker_pipeline_parameters.as_ref()
}
/// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
pub fn dead_letter_config(&self) -> ::std::option::Option<&crate::types::DeadLetterConfig> {
self.dead_letter_config.as_ref()
}
/// <p>The retry policy configuration to use for the dead-letter queue.</p>
pub fn retry_policy(&self) -> ::std::option::Option<&crate::types::RetryPolicy> {
self.retry_policy.as_ref()
}
/// <p>Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.</p>
pub fn app_sync_parameters(&self) -> ::std::option::Option<&crate::types::AppSyncParameters> {
self.app_sync_parameters.as_ref()
}
}
impl Target {
/// Creates a new builder-style object to manufacture [`Target`](crate::types::Target).
pub fn builder() -> crate::types::builders::TargetBuilder {
crate::types::builders::TargetBuilder::default()
}
}
/// A builder for [`Target`](crate::types::Target).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TargetBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) input: ::std::option::Option<::std::string::String>,
pub(crate) input_path: ::std::option::Option<::std::string::String>,
pub(crate) input_transformer: ::std::option::Option<crate::types::InputTransformer>,
pub(crate) kinesis_parameters: ::std::option::Option<crate::types::KinesisParameters>,
pub(crate) run_command_parameters: ::std::option::Option<crate::types::RunCommandParameters>,
pub(crate) ecs_parameters: ::std::option::Option<crate::types::EcsParameters>,
pub(crate) batch_parameters: ::std::option::Option<crate::types::BatchParameters>,
pub(crate) sqs_parameters: ::std::option::Option<crate::types::SqsParameters>,
pub(crate) http_parameters: ::std::option::Option<crate::types::HttpParameters>,
pub(crate) redshift_data_parameters: ::std::option::Option<crate::types::RedshiftDataParameters>,
pub(crate) sage_maker_pipeline_parameters: ::std::option::Option<crate::types::SageMakerPipelineParameters>,
pub(crate) dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
pub(crate) retry_policy: ::std::option::Option<crate::types::RetryPolicy>,
pub(crate) app_sync_parameters: ::std::option::Option<crate::types::AppSyncParameters>,
}
impl TargetBuilder {
/// <p>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.</p>
/// This field is required.
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
/// <p>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.</p>
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
/// <p>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.</p>
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
/// <p>The Amazon Resource Name (ARN) of the target.</p>
/// This field is required.
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the target.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the target.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>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.</p>
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>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.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>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.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
pub fn input(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.input = ::std::option::Option::Some(input.into());
self
}
/// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
pub fn set_input(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.input = input;
self
}
/// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
pub fn get_input(&self) -> &::std::option::Option<::std::string::String> {
&self.input
}
/// <p>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 <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
pub fn input_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.input_path = ::std::option::Option::Some(input.into());
self
}
/// <p>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 <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
pub fn set_input_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.input_path = input;
self
}
/// <p>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 <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
pub fn get_input_path(&self) -> &::std::option::Option<::std::string::String> {
&self.input_path
}
/// <p>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.</p>
pub fn input_transformer(mut self, input: crate::types::InputTransformer) -> Self {
self.input_transformer = ::std::option::Option::Some(input);
self
}
/// <p>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.</p>
pub fn set_input_transformer(mut self, input: ::std::option::Option<crate::types::InputTransformer>) -> Self {
self.input_transformer = input;
self
}
/// <p>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.</p>
pub fn get_input_transformer(&self) -> &::std::option::Option<crate::types::InputTransformer> {
&self.input_transformer
}
/// <p>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 <code>eventId</code> as the partition key.</p>
pub fn kinesis_parameters(mut self, input: crate::types::KinesisParameters) -> Self {
self.kinesis_parameters = ::std::option::Option::Some(input);
self
}
/// <p>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 <code>eventId</code> as the partition key.</p>
pub fn set_kinesis_parameters(mut self, input: ::std::option::Option<crate::types::KinesisParameters>) -> Self {
self.kinesis_parameters = input;
self
}
/// <p>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 <code>eventId</code> as the partition key.</p>
pub fn get_kinesis_parameters(&self) -> &::std::option::Option<crate::types::KinesisParameters> {
&self.kinesis_parameters
}
/// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
pub fn run_command_parameters(mut self, input: crate::types::RunCommandParameters) -> Self {
self.run_command_parameters = ::std::option::Option::Some(input);
self
}
/// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
pub fn set_run_command_parameters(mut self, input: ::std::option::Option<crate::types::RunCommandParameters>) -> Self {
self.run_command_parameters = input;
self
}
/// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
pub fn get_run_command_parameters(&self) -> &::std::option::Option<crate::types::RunCommandParameters> {
&self.run_command_parameters
}
/// <p>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 <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
pub fn ecs_parameters(mut self, input: crate::types::EcsParameters) -> Self {
self.ecs_parameters = ::std::option::Option::Some(input);
self
}
/// <p>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 <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
pub fn set_ecs_parameters(mut self, input: ::std::option::Option<crate::types::EcsParameters>) -> Self {
self.ecs_parameters = input;
self
}
/// <p>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 <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
pub fn get_ecs_parameters(&self) -> &::std::option::Option<crate::types::EcsParameters> {
&self.ecs_parameters
}
/// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
pub fn batch_parameters(mut self, input: crate::types::BatchParameters) -> Self {
self.batch_parameters = ::std::option::Option::Some(input);
self
}
/// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
pub fn set_batch_parameters(mut self, input: ::std::option::Option<crate::types::BatchParameters>) -> Self {
self.batch_parameters = input;
self
}
/// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
pub fn get_batch_parameters(&self) -> &::std::option::Option<crate::types::BatchParameters> {
&self.batch_parameters
}
/// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
/// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
pub fn sqs_parameters(mut self, input: crate::types::SqsParameters) -> Self {
self.sqs_parameters = ::std::option::Option::Some(input);
self
}
/// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
/// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
pub fn set_sqs_parameters(mut self, input: ::std::option::Option<crate::types::SqsParameters>) -> Self {
self.sqs_parameters = input;
self
}
/// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
/// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
pub fn get_sqs_parameters(&self) -> &::std::option::Option<crate::types::SqsParameters> {
&self.sqs_parameters
}
/// <p>Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.</p>
/// <p>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.</p>
pub fn http_parameters(mut self, input: crate::types::HttpParameters) -> Self {
self.http_parameters = ::std::option::Option::Some(input);
self
}
/// <p>Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.</p>
/// <p>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.</p>
pub fn set_http_parameters(mut self, input: ::std::option::Option<crate::types::HttpParameters>) -> Self {
self.http_parameters = input;
self
}
/// <p>Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.</p>
/// <p>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.</p>
pub fn get_http_parameters(&self) -> &::std::option::Option<crate::types::HttpParameters> {
&self.http_parameters
}
/// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
/// <p>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.</p>
pub fn redshift_data_parameters(mut self, input: crate::types::RedshiftDataParameters) -> Self {
self.redshift_data_parameters = ::std::option::Option::Some(input);
self
}
/// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
/// <p>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.</p>
pub fn set_redshift_data_parameters(mut self, input: ::std::option::Option<crate::types::RedshiftDataParameters>) -> Self {
self.redshift_data_parameters = input;
self
}
/// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
/// <p>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.</p>
pub fn get_redshift_data_parameters(&self) -> &::std::option::Option<crate::types::RedshiftDataParameters> {
&self.redshift_data_parameters
}
/// <p>Contains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline.</p>
/// <p>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.</p>
pub fn sage_maker_pipeline_parameters(mut self, input: crate::types::SageMakerPipelineParameters) -> Self {
self.sage_maker_pipeline_parameters = ::std::option::Option::Some(input);
self
}
/// <p>Contains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline.</p>
/// <p>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.</p>
pub fn set_sage_maker_pipeline_parameters(mut self, input: ::std::option::Option<crate::types::SageMakerPipelineParameters>) -> Self {
self.sage_maker_pipeline_parameters = input;
self
}
/// <p>Contains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline.</p>
/// <p>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.</p>
pub fn get_sage_maker_pipeline_parameters(&self) -> &::std::option::Option<crate::types::SageMakerPipelineParameters> {
&self.sage_maker_pipeline_parameters
}
/// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
pub fn dead_letter_config(mut self, input: crate::types::DeadLetterConfig) -> Self {
self.dead_letter_config = ::std::option::Option::Some(input);
self
}
/// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
pub fn set_dead_letter_config(mut self, input: ::std::option::Option<crate::types::DeadLetterConfig>) -> Self {
self.dead_letter_config = input;
self
}
/// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
pub fn get_dead_letter_config(&self) -> &::std::option::Option<crate::types::DeadLetterConfig> {
&self.dead_letter_config
}
/// <p>The retry policy configuration to use for the dead-letter queue.</p>
pub fn retry_policy(mut self, input: crate::types::RetryPolicy) -> Self {
self.retry_policy = ::std::option::Option::Some(input);
self
}
/// <p>The retry policy configuration to use for the dead-letter queue.</p>
pub fn set_retry_policy(mut self, input: ::std::option::Option<crate::types::RetryPolicy>) -> Self {
self.retry_policy = input;
self
}
/// <p>The retry policy configuration to use for the dead-letter queue.</p>
pub fn get_retry_policy(&self) -> &::std::option::Option<crate::types::RetryPolicy> {
&self.retry_policy
}
/// <p>Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.</p>
pub fn app_sync_parameters(mut self, input: crate::types::AppSyncParameters) -> Self {
self.app_sync_parameters = ::std::option::Option::Some(input);
self
}
/// <p>Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.</p>
pub fn set_app_sync_parameters(mut self, input: ::std::option::Option<crate::types::AppSyncParameters>) -> Self {
self.app_sync_parameters = input;
self
}
/// <p>Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.</p>
pub fn get_app_sync_parameters(&self) -> &::std::option::Option<crate::types::AppSyncParameters> {
&self.app_sync_parameters
}
/// Consumes the builder and constructs a [`Target`](crate::types::Target).
/// This method will fail if any of the following fields are not set:
/// - [`id`](crate::types::builders::TargetBuilder::id)
/// - [`arn`](crate::types::builders::TargetBuilder::arn)
pub fn build(self) -> ::std::result::Result<crate::types::Target, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Target {
id: self.id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field("id", "id was not specified but it is required when building Target")
})?,
arn: self.arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"arn",
"arn was not specified but it is required when building Target",
)
})?,
role_arn: self.role_arn,
input: self.input,
input_path: self.input_path,
input_transformer: self.input_transformer,
kinesis_parameters: self.kinesis_parameters,
run_command_parameters: self.run_command_parameters,
ecs_parameters: self.ecs_parameters,
batch_parameters: self.batch_parameters,
sqs_parameters: self.sqs_parameters,
http_parameters: self.http_parameters,
redshift_data_parameters: self.redshift_data_parameters,
sage_maker_pipeline_parameters: self.sage_maker_pipeline_parameters,
dead_letter_config: self.dead_letter_config,
retry_policy: self.retry_policy,
app_sync_parameters: self.app_sync_parameters,
})
}
}