@Generated(value="software.amazon.awssdk:codegen") public final class Command extends Object implements StructuredPojo, ToCopyableBuilder<Command.Builder,Command>
Describes a command request.
Modifier and Type | Class and Description |
---|---|
static interface |
Command.Builder |
Modifier and Type | Method and Description |
---|---|
static Command.Builder |
builder() |
String |
commandId()
A unique identifier for this command.
|
String |
comment()
User-specified information about the command, such as a brief description of what the command should do.
|
Integer |
completedCount()
The number of targets for which the command invocation reached a terminal state.
|
String |
documentName()
The name of the document requested for execution.
|
boolean |
equals(Object obj) |
Integer |
errorCount()
The number of targets for which the status is Failed or Execution Timed Out.
|
Instant |
expiresAfter()
If this time is reached and the command has not already started executing, it will not execute.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
List<String> |
instanceIds()
The instance IDs against which this command was requested.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
String |
maxConcurrency()
The maximum number of instances that are allowed to execute the command at the same time.
|
String |
maxErrors()
The maximum number of errors allowed before the system stops sending the command to additional targets.
|
NotificationConfig |
notificationConfig()
Configurations for sending notifications about command status changes.
|
String |
outputS3BucketName()
The S3 bucket where the responses to the command executions should be stored.
|
String |
outputS3KeyPrefix()
The S3 directory path inside the bucket where the responses to the command executions should be stored.
|
String |
outputS3Region()
(Deprecated) You can no longer specify this parameter.
|
Map<String,List<String>> |
parameters()
The parameter values to be inserted in the document when executing the command.
|
Instant |
requestedDateTime()
The date and time the command was requested.
|
static Class<? extends Command.Builder> |
serializableBuilderClass() |
String |
serviceRole()
The IAM service role that Run Command uses to act on your behalf when sending notifications about command status
changes.
|
CommandStatus |
status()
The status of the command.
|
String |
statusAsString()
The status of the command.
|
String |
statusDetails()
A detailed status of the command execution.
|
Integer |
targetCount()
The number of targets for the command.
|
List<Target> |
targets()
An array of search criteria that targets instances using a Key,Value combination that you specify.
|
Command.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
copy
public String commandId()
A unique identifier for this command.
public String documentName()
The name of the document requested for execution.
public String comment()
User-specified information about the command, such as a brief description of what the command should do.
public Instant 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>> parameters()
The parameter values to be inserted in the document when executing the command.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<String> instanceIds()
The instance IDs against which this command was requested.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<Target> targets()
An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public Instant requestedDateTime()
The date and time the command was requested.
public CommandStatus status()
The status of the command.
If the service returns an enum value that is not available in the current SDK version, status
will
return CommandStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
statusAsString()
.
CommandStatus
public String statusAsString()
The status of the command.
If the service returns an enum value that is not available in the current SDK version, status
will
return CommandStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
statusAsString()
.
CommandStatus
public String statusDetails()
A detailed status of the command execution. StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see Run Command Status. StatusDetails can be one of the following values:
Pending: The command has not been sent to any instances.
In Progress: The command has been sent to at least one instance but has not reached a final state on all instances.
Success: The command successfully executed on all invocations. This is a terminal state.
Delivery Timed Out: The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.
Execution Timed Out: The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.
Failed: The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.
Incomplete: The command was attempted on all instances and one or more invocations does not have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.
Canceled: The command was terminated before it was completed. This is a terminal state.
Rate Exceeded: The number of instances targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before executing it on any instance. This is a terminal state.
Pending: The command has not been sent to any instances.
In Progress: The command has been sent to at least one instance but has not reached a final state on all instances.
Success: The command successfully executed on all invocations. This is a terminal state.
Delivery Timed Out: The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.
Execution Timed Out: The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.
Failed: The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.
Incomplete: The command was attempted on all instances and one or more invocations does not have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.
Canceled: The command was terminated before it was completed. This is a terminal state.
Rate Exceeded: The number of instances targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before executing it on any instance. This is a terminal state.
public String outputS3Region()
(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon S3 bucket region.
public String outputS3BucketName()
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
public 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.
public String maxConcurrency()
The maximum number of instances that are allowed to execute the command at the same time. You can specify a number of instances, such as 10, or a percentage of instances, such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Executing a Command Using Systems Manager Run Command.
public String maxErrors()
The maximum number of errors allowed before the system stops sending the command to additional targets. You can specify a number of errors, such as 10, or a percentage or errors, such as 10%. The default value is 50. For more information about how to use MaxErrors, see Executing a Command Using Systems Manager Run Command.
public Integer targetCount()
The number of targets for the command.
public Integer completedCount()
The number of targets for which the command invocation reached a terminal state. Terminal states include the following: Success, Failed, Execution Timed Out, Delivery Timed Out, Canceled, Terminated, or Undeliverable.
public Integer errorCount()
The number of targets for which the status is Failed or Execution Timed Out.
public String serviceRole()
The IAM service role that Run Command uses to act on your behalf when sending notifications about command status changes.
public NotificationConfig notificationConfig()
Configurations for sending notifications about command status changes.
public Command.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<Command.Builder,Command>
public static Command.Builder builder()
public static Class<? extends Command.Builder> serializableBuilderClass()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.