public class Command extends Object implements Serializable, Cloneable
Describes a command request.
Constructor and Description |
---|
Command() |
Modifier and Type | Method and 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.
|
NotificationConfig |
getNotificationConfig()
Configurations for sending notifications about command status changes.
|
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 |
getServiceRole()
The IAM service role that SSM uses to act on your behalf when sending
notifications about command status changes.
|
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 |
setNotificationConfig(NotificationConfig notificationConfig)
Configurations for sending notifications about command status changes.
|
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 |
setServiceRole(String serviceRole)
The IAM service role that SSM uses to act on your behalf when sending
notifications about command status changes.
|
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(Collection<String> instanceIds)
The instance IDs against which this command was requested.
|
Command |
withInstanceIds(String... instanceIds)
The instance IDs against which this command was requested.
|
Command |
withNotificationConfig(NotificationConfig notificationConfig)
Configurations for sending notifications about command status changes.
|
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 |
withServiceRole(String serviceRole)
The IAM service role that SSM uses to act on your behalf when sending
notifications about command status changes.
|
Command |
withStatus(CommandStatus status)
The status of the command.
|
Command |
withStatus(String status)
The status of the command.
|
public void setCommandId(String commandId)
A unique identifier for this command.
commandId
- A unique identifier for this command.public String getCommandId()
A unique identifier for this command.
public Command withCommandId(String commandId)
A unique identifier for this command.
commandId
- A unique identifier for this command.public void setDocumentName(String documentName)
The name of the SSM document requested for execution.
documentName
- The name of the SSM document requested for execution.public String getDocumentName()
The name of the SSM document requested for execution.
public Command withDocumentName(String documentName)
The name of the SSM document requested for execution.
documentName
- The name of the SSM document requested for execution.public void setComment(String comment)
User-specified information about the command, such as a brief description of what the command should do.
comment
- User-specified information about the command, such as a brief
description of what the command should do.public String getComment()
User-specified information about the command, such as a brief description of what the command should do.
public Command withComment(String comment)
User-specified information about the command, such as a brief description of what the command should do.
comment
- User-specified information about the command, such as a brief
description of what the command should do.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.
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.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.
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.
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.public Map<String,List<String>> getParameters()
The parameter values to be inserted in the SSM document when executing the command.
public void setParameters(Map<String,List<String>> parameters)
The parameter values to be inserted in the SSM document when executing the command.
parameters
- The parameter values to be inserted in the SSM document when
executing the command.public Command withParameters(Map<String,List<String>> parameters)
The parameter values to be inserted in the SSM document when executing the command.
parameters
- The parameter values to be inserted in the SSM document when
executing the command.public Command clearParametersEntries()
public List<String> getInstanceIds()
The instance IDs against which this command was requested.
public void setInstanceIds(Collection<String> instanceIds)
The instance IDs against which this command was requested.
instanceIds
- The instance IDs against which this command was requested.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)
or
withInstanceIds(java.util.Collection)
if you want to override
the existing values.
instanceIds
- The instance IDs against which this command was requested.public Command withInstanceIds(Collection<String> instanceIds)
The instance IDs against which this command was requested.
instanceIds
- The instance IDs against which this command was requested.public void setRequestedDateTime(Date requestedDateTime)
The date and time the command was requested.
requestedDateTime
- The date and time the command was requested.public Date getRequestedDateTime()
The date and time the command was requested.
public Command withRequestedDateTime(Date requestedDateTime)
The date and time the command was requested.
requestedDateTime
- The date and time the command was requested.public void setStatus(String status)
The status of the command.
status
- The status of the command.CommandStatus
public String getStatus()
The status of the command.
CommandStatus
public Command withStatus(String status)
The status of the command.
status
- The status of the command.CommandStatus
public void setStatus(CommandStatus status)
The status of the command.
status
- The status of the command.CommandStatus
public Command withStatus(CommandStatus status)
The status of the command.
status
- The status of the command.CommandStatus
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.
outputS3BucketName
- The S3 bucket where the responses to the command executions should
be stored. This was requested when issuing the command.public String getOutputS3BucketName()
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
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.
outputS3BucketName
- The S3 bucket where the responses to the command executions should
be stored. This was requested when issuing the command.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.
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.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.
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.
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.public void setServiceRole(String serviceRole)
The IAM service role that SSM uses to act on your behalf when sending notifications about command status changes.
serviceRole
- The IAM service role that SSM uses to act on your behalf when
sending notifications about command status changes.public String getServiceRole()
The IAM service role that SSM uses to act on your behalf when sending notifications about command status changes.
public Command withServiceRole(String serviceRole)
The IAM service role that SSM uses to act on your behalf when sending notifications about command status changes.
serviceRole
- The IAM service role that SSM uses to act on your behalf when
sending notifications about command status changes.public void setNotificationConfig(NotificationConfig notificationConfig)
Configurations for sending notifications about command status changes.
notificationConfig
- Configurations for sending notifications about command status
changes.public NotificationConfig getNotificationConfig()
Configurations for sending notifications about command status changes.
public Command withNotificationConfig(NotificationConfig notificationConfig)
Configurations for sending notifications about command status changes.
notificationConfig
- Configurations for sending notifications about command status
changes.public String toString()
toString
in class Object
Object.toString()
Copyright © 2016. All rights reserved.