Class Target
- All Implemented Interfaces:
Serializable
,Cloneable
Targets are the resources that can be invoked when a rule is triggered. For example, AWS Lambda functions, Amazon Kinesis streams, and built-in targets.
Input and InputPath are mutually-exclusive and optional parameters of a target. When a rule is triggered due to a matched event, if for a target:
- Neither Input nor InputPath is specified, then the entire event is passed to the target in JSON form.
- InputPath is specified in the form of JSONPath (e.g. $.detail), then only the part of the event specified in the path is passed to the target (e.g. only the detail part of the event is passed).
- Input is specified in the form of a valid JSON, then the matched event is overridden with this constant.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
getArn()
The Amazon Resource Name (ARN) associated of the target.getId()
The unique target assignment ID.getInput()
Valid JSON text passed to the target.The value of the JSONPath that is used for extracting part of the matched event when passing it to the target.int
hashCode()
void
The Amazon Resource Name (ARN) associated of the target.void
The unique target assignment ID.void
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.toString()
Returns a string representation of this object; useful for testing and debugging.The Amazon Resource Name (ARN) associated of the target.The unique target assignment ID.Valid JSON text passed to the 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.
-
Constructor Details
-
Target
public Target()
-
-
Method Details
-
setId
The unique target assignment ID.
- Parameters:
id
- The unique target assignment ID.
-
getId
The unique target assignment ID.
- Returns:
- The unique target assignment ID.
-
withId
The unique target assignment ID.
- Parameters:
id
- The unique target assignment ID.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setArn
The Amazon Resource Name (ARN) associated of the target.
- Parameters:
arn
- The Amazon Resource Name (ARN) associated of the target.
-
getArn
The Amazon Resource Name (ARN) associated of the target.
- Returns:
- The Amazon Resource Name (ARN) associated of the target.
-
withArn
The Amazon Resource Name (ARN) associated of the target.
- Parameters:
arn
- The Amazon Resource Name (ARN) associated of the target.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInput
Valid JSON text passed to the target. For more information about JSON text, see The JavaScript Object Notation (JSON) Data Interchange Format.
- Parameters:
input
- Valid JSON text passed to the target. For more information about JSON text, see The JavaScript Object Notation (JSON) Data Interchange Format.
-
getInput
Valid JSON text passed to the target. For more information about JSON text, see The JavaScript Object Notation (JSON) Data Interchange Format.
- Returns:
- Valid JSON text passed to the target. For more information about JSON text, see The JavaScript Object Notation (JSON) Data Interchange Format.
-
withInput
Valid JSON text passed to the target. For more information about JSON text, see The JavaScript Object Notation (JSON) Data Interchange Format.
- Parameters:
input
- Valid JSON text passed to the target. For more information about JSON text, see The JavaScript Object Notation (JSON) Data Interchange Format.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInputPath
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. For more information about JSON paths, see JSONPath.
- Parameters:
inputPath
- The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. For more information about JSON paths, see JSONPath.
-
getInputPath
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. For more information about JSON paths, see JSONPath.
- Returns:
- The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. For more information about JSON paths, see JSONPath.
-
withInputPath
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. For more information about JSON paths, see JSONPath.
- Parameters:
inputPath
- The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. For more information about JSON paths, see JSONPath.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-