@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Target extends Object implements Serializable, Cloneable, StructuredPojo
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.
Constructor and Description |
---|
Target() |
Modifier and Type | Method and Description |
---|---|
Target |
clone() |
boolean |
equals(Object obj) |
AppSyncParameters |
getAppSyncParameters()
Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
|
String |
getArn()
The Amazon Resource Name (ARN) of the target.
|
BatchParameters |
getBatchParameters()
If the event target is an Batch job, this contains the job definition, job name, and other parameters.
|
DeadLetterConfig |
getDeadLetterConfig()
The
DeadLetterConfig that defines the target queue to send dead-letter queue events to. |
EcsParameters |
getEcsParameters()
Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task.
|
HttpParameters |
getHttpParameters()
Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.
|
String |
getId()
The ID of the target within the specified rule.
|
String |
getInput()
Valid JSON text passed to the target.
|
String |
getInputPath()
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target.
|
InputTransformer |
getInputTransformer()
Settings to enable you to provide custom input to a target based on certain event data.
|
KinesisParameters |
getKinesisParameters()
The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream.
|
RedshiftDataParameters |
getRedshiftDataParameters()
Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.
|
RetryPolicy |
getRetryPolicy()
The
RetryPolicy object that contains the retry policy configuration to use for the dead-letter
queue. |
String |
getRoleArn()
The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered.
|
RunCommandParameters |
getRunCommandParameters()
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
|
SageMakerPipelineParameters |
getSageMakerPipelineParameters()
Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building
Pipeline.
|
SqsParameters |
getSqsParameters()
Contains the message group ID to use when the target is a FIFO queue.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAppSyncParameters(AppSyncParameters appSyncParameters)
Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
|
void |
setArn(String arn)
The Amazon Resource Name (ARN) of the target.
|
void |
setBatchParameters(BatchParameters batchParameters)
If the event target is an Batch job, this contains the job definition, job name, and other parameters.
|
void |
setDeadLetterConfig(DeadLetterConfig deadLetterConfig)
The
DeadLetterConfig that defines the target queue to send dead-letter queue events to. |
void |
setEcsParameters(EcsParameters ecsParameters)
Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task.
|
void |
setHttpParameters(HttpParameters httpParameters)
Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.
|
void |
setId(String id)
The ID of the target within the specified rule.
|
void |
setInput(String input)
Valid JSON text passed to the target.
|
void |
setInputPath(String inputPath)
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target.
|
void |
setInputTransformer(InputTransformer inputTransformer)
Settings to enable you to provide custom input to a target based on certain event data.
|
void |
setKinesisParameters(KinesisParameters kinesisParameters)
The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream.
|
void |
setRedshiftDataParameters(RedshiftDataParameters redshiftDataParameters)
Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.
|
void |
setRetryPolicy(RetryPolicy retryPolicy)
The
RetryPolicy object that contains the retry policy configuration to use for the dead-letter
queue. |
void |
setRoleArn(String roleArn)
The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered.
|
void |
setRunCommandParameters(RunCommandParameters runCommandParameters)
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
|
void |
setSageMakerPipelineParameters(SageMakerPipelineParameters sageMakerPipelineParameters)
Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building
Pipeline.
|
void |
setSqsParameters(SqsParameters sqsParameters)
Contains the message group ID to use when the target is a FIFO queue.
|
String |
toString()
Returns a string representation of this object.
|
Target |
withAppSyncParameters(AppSyncParameters appSyncParameters)
Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
|
Target |
withArn(String arn)
The Amazon Resource Name (ARN) of the target.
|
Target |
withBatchParameters(BatchParameters batchParameters)
If the event target is an Batch job, this contains the job definition, job name, and other parameters.
|
Target |
withDeadLetterConfig(DeadLetterConfig deadLetterConfig)
The
DeadLetterConfig that defines the target queue to send dead-letter queue events to. |
Target |
withEcsParameters(EcsParameters ecsParameters)
Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task.
|
Target |
withHttpParameters(HttpParameters httpParameters)
Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.
|
Target |
withId(String id)
The ID of the target within the specified rule.
|
Target |
withInput(String input)
Valid JSON text passed to the target.
|
Target |
withInputPath(String inputPath)
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target.
|
Target |
withInputTransformer(InputTransformer inputTransformer)
Settings to enable you to provide custom input to a target based on certain event data.
|
Target |
withKinesisParameters(KinesisParameters kinesisParameters)
The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream.
|
Target |
withRedshiftDataParameters(RedshiftDataParameters redshiftDataParameters)
Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.
|
Target |
withRetryPolicy(RetryPolicy retryPolicy)
The
RetryPolicy object that contains the retry policy configuration to use for the dead-letter
queue. |
Target |
withRoleArn(String roleArn)
The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered.
|
Target |
withRunCommandParameters(RunCommandParameters runCommandParameters)
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
|
Target |
withSageMakerPipelineParameters(SageMakerPipelineParameters sageMakerPipelineParameters)
Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building
Pipeline.
|
Target |
withSqsParameters(SqsParameters sqsParameters)
Contains the message group ID to use when the target is a FIFO queue.
|
public void setId(String id)
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.
id
- 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.public String getId()
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.
public Target withId(String id)
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.
id
- 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.public void setArn(String arn)
The Amazon Resource Name (ARN) of the target.
arn
- The Amazon Resource Name (ARN) of the target.public String getArn()
The Amazon Resource Name (ARN) of the target.
public Target withArn(String arn)
The Amazon Resource Name (ARN) of the target.
arn
- The Amazon Resource Name (ARN) of the target.public void setRoleArn(String roleArn)
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.
roleArn
- 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.public String getRoleArn()
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.
public Target withRoleArn(String roleArn)
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.
roleArn
- 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.public void setInput(String input)
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.
input
- 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.public String getInput()
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.
public Target withInput(String input)
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.
input
- 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.public void setInputPath(String inputPath)
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.
inputPath
- 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.public String getInputPath()
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.
public Target withInputPath(String inputPath)
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.
inputPath
- 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.public void setInputTransformer(InputTransformer inputTransformer)
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.
inputTransformer
- 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.public InputTransformer getInputTransformer()
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.
public Target withInputTransformer(InputTransformer inputTransformer)
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.
inputTransformer
- 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.public void setKinesisParameters(KinesisParameters kinesisParameters)
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.
kinesisParameters
- 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.public KinesisParameters getKinesisParameters()
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.
eventId
as the
partition key.public Target withKinesisParameters(KinesisParameters kinesisParameters)
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.
kinesisParameters
- 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.public void setRunCommandParameters(RunCommandParameters runCommandParameters)
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
runCommandParameters
- Parameters used when you are using the rule to invoke Amazon EC2 Run Command.public RunCommandParameters getRunCommandParameters()
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
public Target withRunCommandParameters(RunCommandParameters runCommandParameters)
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
runCommandParameters
- Parameters used when you are using the rule to invoke Amazon EC2 Run Command.public void setEcsParameters(EcsParameters ecsParameters)
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.
ecsParameters
- 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.public EcsParameters getEcsParameters()
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.
public Target withEcsParameters(EcsParameters ecsParameters)
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.
ecsParameters
- 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.public void setBatchParameters(BatchParameters batchParameters)
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.
batchParameters
- 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.public BatchParameters getBatchParameters()
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.
public Target withBatchParameters(BatchParameters batchParameters)
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.
batchParameters
- 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.public void setSqsParameters(SqsParameters sqsParameters)
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.
sqsParameters
- 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.
public SqsParameters getSqsParameters()
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.
If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.
public Target withSqsParameters(SqsParameters sqsParameters)
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.
sqsParameters
- 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.
public void setHttpParameters(HttpParameters httpParameters)
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.
httpParameters
- 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.
public HttpParameters getHttpParameters()
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.
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.
public Target withHttpParameters(HttpParameters httpParameters)
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.
httpParameters
- 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.
public void setRedshiftDataParameters(RedshiftDataParameters redshiftDataParameters)
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.
redshiftDataParameters
- 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.
public RedshiftDataParameters getRedshiftDataParameters()
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.
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.
public Target withRedshiftDataParameters(RedshiftDataParameters redshiftDataParameters)
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.
redshiftDataParameters
- 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.
public void setSageMakerPipelineParameters(SageMakerPipelineParameters sageMakerPipelineParameters)
Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.
If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.
sageMakerPipelineParameters
- Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building
Pipeline.
If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.
public SageMakerPipelineParameters getSageMakerPipelineParameters()
Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.
If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.
If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.
public Target withSageMakerPipelineParameters(SageMakerPipelineParameters sageMakerPipelineParameters)
Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.
If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.
sageMakerPipelineParameters
- Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building
Pipeline.
If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.
public void setDeadLetterConfig(DeadLetterConfig deadLetterConfig)
The DeadLetterConfig
that defines the target queue to send dead-letter queue events to.
deadLetterConfig
- The DeadLetterConfig
that defines the target queue to send dead-letter queue events to.public DeadLetterConfig getDeadLetterConfig()
The DeadLetterConfig
that defines the target queue to send dead-letter queue events to.
DeadLetterConfig
that defines the target queue to send dead-letter queue events to.public Target withDeadLetterConfig(DeadLetterConfig deadLetterConfig)
The DeadLetterConfig
that defines the target queue to send dead-letter queue events to.
deadLetterConfig
- The DeadLetterConfig
that defines the target queue to send dead-letter queue events to.public void setRetryPolicy(RetryPolicy retryPolicy)
The RetryPolicy
object that contains the retry policy configuration to use for the dead-letter
queue.
retryPolicy
- The RetryPolicy
object that contains the retry policy configuration to use for the
dead-letter queue.public RetryPolicy getRetryPolicy()
The RetryPolicy
object that contains the retry policy configuration to use for the dead-letter
queue.
RetryPolicy
object that contains the retry policy configuration to use for the
dead-letter queue.public Target withRetryPolicy(RetryPolicy retryPolicy)
The RetryPolicy
object that contains the retry policy configuration to use for the dead-letter
queue.
retryPolicy
- The RetryPolicy
object that contains the retry policy configuration to use for the
dead-letter queue.public void setAppSyncParameters(AppSyncParameters appSyncParameters)
Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
appSyncParameters
- Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.public AppSyncParameters getAppSyncParameters()
Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
public Target withAppSyncParameters(AppSyncParameters appSyncParameters)
Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
appSyncParameters
- Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.