Class Command
- java.lang.Object
-
- com.amazonaws.services.simplesystemsmanagement.model.Command
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Command extends Object implements Serializable, Cloneable
Describes a command request.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Command()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Command
addParametersEntry(String key, List<String> value)
Command
clearParametersEntries()
Removes all the entries added into Parameters.Command
clone()
boolean
equals(Object obj)
String
getCommandId()
A unique identifier for this command.String
getComment()
User-specified information about the command, such as a brief description of what the command should do.String
getDocumentName()
The name of the SSM document requested for execution.Date
getExpiresAfter()
If this time is reached and the command has not already started executing, it will not execute.List<String>
getInstanceIds()
The instance IDs against which this command was requested.String
getOutputS3BucketName()
The S3 bucket where the responses to the command executions should be stored.String
getOutputS3KeyPrefix()
The S3 directory path inside the bucket where the responses to the command executions should be stored.Map<String,List<String>>
getParameters()
The parameter values to be inserted in the SSM document when executing the command.Date
getRequestedDateTime()
The date and time the command was requested.String
getStatus()
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
setStatus(String status)
The status of the command.String
toString()
Returns a string representation of this object; useful for testing and debugging.Command
withCommandId(String commandId)
A unique identifier for this command.Command
withComment(String comment)
User-specified information about the command, such as a brief description of what the command should do.Command
withDocumentName(String documentName)
The name of the SSM document requested for execution.Command
withExpiresAfter(Date expiresAfter)
If this time is reached and the command has not already started executing, it will not execute.Command
withInstanceIds(String... instanceIds)
The instance IDs against which this command was requested.Command
withInstanceIds(Collection<String> instanceIds)
The instance IDs against which this command was requested.Command
withOutputS3BucketName(String outputS3BucketName)
The S3 bucket where the responses to the command executions should be stored.Command
withOutputS3KeyPrefix(String outputS3KeyPrefix)
The S3 directory path inside the bucket where the responses to the command executions should be stored.Command
withParameters(Map<String,List<String>> parameters)
The parameter values to be inserted in the SSM document when executing the command.Command
withRequestedDateTime(Date requestedDateTime)
The date and time the command was requested.Command
withStatus(CommandStatus status)
The status of the command.Command
withStatus(String status)
The status of the command.
-
-
-
Method Detail
-
setCommandId
public void setCommandId(String commandId)
A unique identifier for this command.
- Parameters:
commandId
- A unique identifier for this command.
-
getCommandId
public String getCommandId()
A unique identifier for this command.
- Returns:
- A unique identifier for this command.
-
withCommandId
public Command withCommandId(String commandId)
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
public void setDocumentName(String documentName)
The name of the SSM document requested for execution.
- Parameters:
documentName
- The name of the SSM document requested for execution.
-
getDocumentName
public String getDocumentName()
The name of the SSM document requested for execution.
- Returns:
- The name of the SSM document requested for execution.
-
withDocumentName
public Command withDocumentName(String documentName)
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
public void setComment(String comment)
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
public String 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
public Command withComment(String comment)
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
public void setExpiresAfter(Date 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.
- 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
public Date 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
public Command withExpiresAfter(Date 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.
- 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
public Map<String,List<String>> 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
public void setParameters(Map<String,List<String>> parameters)
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
public Command withParameters(Map<String,List<String>> parameters)
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.
-
clearParametersEntries
public Command clearParametersEntries()
Removes all the entries added into Parameters. <p> Returns a reference to this object so that method calls can be chained together.
-
getInstanceIds
public List<String> getInstanceIds()
The instance IDs against which this command was requested.
- Returns:
- The instance IDs against which this command was requested.
-
setInstanceIds
public void setInstanceIds(Collection<String> instanceIds)
The instance IDs against which this command was requested.
- Parameters:
instanceIds
- The instance IDs against which this command was requested.
-
withInstanceIds
public Command withInstanceIds(String... instanceIds)
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
public Command withInstanceIds(Collection<String> instanceIds)
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
public void setRequestedDateTime(Date requestedDateTime)
The date and time the command was requested.
- Parameters:
requestedDateTime
- The date and time the command was requested.
-
getRequestedDateTime
public Date getRequestedDateTime()
The date and time the command was requested.
- Returns:
- The date and time the command was requested.
-
withRequestedDateTime
public Command withRequestedDateTime(Date requestedDateTime)
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
public void setStatus(String status)
The status of the command.
- Parameters:
status
- The status of the command.- See Also:
CommandStatus
-
getStatus
public String getStatus()
The status of the command.
- Returns:
- The status of the command.
- See Also:
CommandStatus
-
withStatus
public Command withStatus(String status)
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:
CommandStatus
-
setStatus
public void setStatus(CommandStatus status)
The status of the command.
- Parameters:
status
- The status of the command.- See Also:
CommandStatus
-
withStatus
public Command withStatus(CommandStatus status)
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:
CommandStatus
-
setOutputS3BucketName
public void setOutputS3BucketName(String outputS3BucketName)
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
public String 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
public Command withOutputS3BucketName(String outputS3BucketName)
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
public void setOutputS3KeyPrefix(String 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.
- 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
public String 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
public Command withOutputS3KeyPrefix(String 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.
- 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
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-