Class Command
- All Implemented Interfaces:
Serializable
,Cloneable
Describes a command request.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddParametersEntry
(String key, List<String> value) Removes all the entries added into Parameters.clone()
boolean
A unique identifier for this command.User-specified information about the command, such as a brief description of what the command should do.The name of the SSM document requested for execution.If this time is reached and the command has not already started executing, it will not execute.The instance IDs against which this command was requested.The S3 bucket where the responses to the command executions should be stored.The S3 directory path inside the bucket where the responses to the command executions should be stored.The parameter values to be inserted in the SSM document when executing the command.The date and time the command was requested.The status of the command.int
hashCode()
void
setCommandId
(String commandId) A unique identifier for this command.void
setComment
(String comment) User-specified information about the command, such as a brief description of what the command should do.void
setDocumentName
(String documentName) The name of the SSM document requested for execution.void
setExpiresAfter
(Date expiresAfter) If this time is reached and the command has not already started executing, it will not execute.void
setInstanceIds
(Collection<String> instanceIds) The instance IDs against which this command was requested.void
setOutputS3BucketName
(String outputS3BucketName) The S3 bucket where the responses to the command executions should be stored.void
setOutputS3KeyPrefix
(String outputS3KeyPrefix) The S3 directory path inside the bucket where the responses to the command executions should be stored.void
setParameters
(Map<String, List<String>> parameters) The parameter values to be inserted in the SSM document when executing the command.void
setRequestedDateTime
(Date requestedDateTime) The date and time the command was requested.void
setStatus
(CommandStatus status) The status of the command.void
The status of the command.toString()
Returns a string representation of this object; useful for testing and debugging.withCommandId
(String commandId) A unique identifier for this command.withComment
(String comment) User-specified information about the command, such as a brief description of what the command should do.withDocumentName
(String documentName) The name of the SSM document requested for execution.withExpiresAfter
(Date expiresAfter) If this time is reached and the command has not already started executing, it will not execute.withInstanceIds
(String... instanceIds) The instance IDs against which this command was requested.withInstanceIds
(Collection<String> instanceIds) The instance IDs against which this command was requested.withOutputS3BucketName
(String outputS3BucketName) The S3 bucket where the responses to the command executions should be stored.withOutputS3KeyPrefix
(String outputS3KeyPrefix) The S3 directory path inside the bucket where the responses to the command executions should be stored.withParameters
(Map<String, List<String>> parameters) The parameter values to be inserted in the SSM document when executing the command.withRequestedDateTime
(Date requestedDateTime) The date and time the command was requested.withStatus
(CommandStatus status) The status of the command.withStatus
(String status) The status of the command.
-
Constructor Details
-
Command
public Command()
-
-
Method Details
-
setCommandId
A unique identifier for this command.
- Parameters:
commandId
- A unique identifier for this command.
-
getCommandId
A unique identifier for this command.
- Returns:
- A unique identifier for this command.
-
withCommandId
A unique identifier for this command.
- Parameters:
commandId
- A unique identifier for this command.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDocumentName
The name of the SSM document requested for execution.
- Parameters:
documentName
- The name of the SSM document requested for execution.
-
getDocumentName
The name of the SSM document requested for execution.
- Returns:
- The name of the SSM document requested for execution.
-
withDocumentName
The name of the SSM document requested for execution.
- Parameters:
documentName
- The name of the SSM document requested for execution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setComment
User-specified information about the command, such as a brief description of what the command should do.
- Parameters:
comment
- User-specified information about the command, such as a brief description of what the command should do.
-
getComment
User-specified information about the command, such as a brief description of what the command should do.
- Returns:
- User-specified information about the command, such as a brief description of what the command should do.
-
withComment
User-specified information about the command, such as a brief description of what the command should do.
- Parameters:
comment
- User-specified information about the command, such as a brief description of what the command should do.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setExpiresAfter
If this time is reached and the command has not already started executing, it will not execute. Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.
- Parameters:
expiresAfter
- If this time is reached and the command has not already started executing, it will not execute. Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.
-
getExpiresAfter
If this time is reached and the command has not already started executing, it will not execute. Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.
- Returns:
- If this time is reached and the command has not already started executing, it will not execute. Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.
-
withExpiresAfter
If this time is reached and the command has not already started executing, it will not execute. Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.
- Parameters:
expiresAfter
- If this time is reached and the command has not already started executing, it will not execute. Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getParameters
The parameter values to be inserted in the SSM document when executing the command.
- Returns:
- The parameter values to be inserted in the SSM document when executing the command.
-
setParameters
The parameter values to be inserted in the SSM document when executing the command.
- Parameters:
parameters
- The parameter values to be inserted in the SSM document when executing the command.
-
withParameters
The parameter values to be inserted in the SSM document when executing the command.
- Parameters:
parameters
- The parameter values to be inserted in the SSM document when executing the command.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addParametersEntry
-
clearParametersEntries
Removes all the entries added into Parameters. <p> Returns a reference to this object so that method calls can be chained together. -
getInstanceIds
The instance IDs against which this command was requested.
- Returns:
- The instance IDs against which this command was requested.
-
setInstanceIds
The instance IDs against which this command was requested.
- Parameters:
instanceIds
- The instance IDs against which this command was requested.
-
withInstanceIds
The instance IDs against which this command was requested.
NOTE: This method appends the values to the existing list (if any). Use
setInstanceIds(java.util.Collection)
orwithInstanceIds(java.util.Collection)
if you want to override the existing values.- Parameters:
instanceIds
- The instance IDs against which this command was requested.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withInstanceIds
The instance IDs against which this command was requested.
- Parameters:
instanceIds
- The instance IDs against which this command was requested.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRequestedDateTime
The date and time the command was requested.
- Parameters:
requestedDateTime
- The date and time the command was requested.
-
getRequestedDateTime
The date and time the command was requested.
- Returns:
- The date and time the command was requested.
-
withRequestedDateTime
The date and time the command was requested.
- Parameters:
requestedDateTime
- The date and time the command was requested.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatus
The status of the command.
- Parameters:
status
- The status of the command.- See Also:
-
getStatus
The status of the command.
- Returns:
- The status of the command.
- See Also:
-
withStatus
The status of the command.
- Parameters:
status
- The status of the command.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setStatus
The status of the command.
- Parameters:
status
- The status of the command.- See Also:
-
withStatus
The status of the command.
- Parameters:
status
- The status of the command.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setOutputS3BucketName
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
- Parameters:
outputS3BucketName
- The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
-
getOutputS3BucketName
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
- Returns:
- The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
-
withOutputS3BucketName
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
- Parameters:
outputS3BucketName
- The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setOutputS3KeyPrefix
The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
- Parameters:
outputS3KeyPrefix
- The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
-
getOutputS3KeyPrefix
The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
- Returns:
- The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
-
withOutputS3KeyPrefix
The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
- Parameters:
outputS3KeyPrefix
- The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.- 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
-