@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're 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, 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.
Constructor and Description |
---|
Target() |
Modifier and Type | Method and Description |
---|---|
Target |
clone() |
boolean |
equals(Object obj) |
String |
getArn()
The Amazon Resource Name (ARN) of the target.
|
BatchParameters |
getBatchParameters()
If the event target is an AWS Batch job, this contains the job definition, job name, and other parameters.
|
EcsParameters |
getEcsParameters()
Contains the Amazon ECS task definition and task count to be used if the event target is an Amazon ECS task.
|
String |
getId()
The ID of the target.
|
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 that you can use to control the shard assignment when the target is a Kinesis data stream.
|
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.
|
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 |
setArn(String arn)
The Amazon Resource Name (ARN) of the target.
|
void |
setBatchParameters(BatchParameters batchParameters)
If the event target is an AWS Batch job, this contains the job definition, job name, and other parameters.
|
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 |
setId(String id)
The ID of the target.
|
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 that you can use to control the shard assignment when the target is a Kinesis data stream.
|
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 |
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 |
withArn(String arn)
The Amazon Resource Name (ARN) of the target.
|
Target |
withBatchParameters(BatchParameters batchParameters)
If the event target is an AWS Batch job, this contains the job definition, job name, and other parameters.
|
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 |
withId(String id)
The ID of the target.
|
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 that you can use to control the shard assignment when the target is a Kinesis data stream.
|
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 |
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.
id
- The ID of the target.public String getId()
The ID of the target.
public Target withId(String id)
The ID of the target.
id
- The ID of the target.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 must use JSON dot notation, not 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 must use JSON dot notation, not 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 must use JSON dot notation, not 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 must use JSON dot notation, not 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 must use JSON dot notation, not 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 that you can use to control the shard assignment when the target is a Kinesis data stream.
If you don't include this parameter, the default is to use the eventId
as the partition key.
kinesisParameters
- The custom parameter that you can use to control the shard assignment when the target is a Kinesis data
stream. If you don't include this parameter, the default is to use the eventId
as the
partition key.public KinesisParameters getKinesisParameters()
The custom parameter that you can use to control the shard assignment when the target is a Kinesis data stream.
If you don't 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 that you can use to control the shard assignment when the target is a Kinesis data stream.
If you don't include this parameter, the default is to use the eventId
as the partition key.
kinesisParameters
- The custom parameter that you can use to control the shard assignment when the target is a Kinesis data
stream. If you don't 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 AWS Batch job, this contains the job definition, job name, and other parameters. For more information, see Jobs in the AWS Batch User Guide.
batchParameters
- 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.public BatchParameters getBatchParameters()
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.
public Target withBatchParameters(BatchParameters batchParameters)
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.
batchParameters
- 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.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 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.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.