@Generated(value="software.amazon.awssdk:codegen") public final class Command extends Object implements SdkPojo, Serializable, 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() |
CloudWatchOutputConfig |
cloudWatchOutputConfig()
Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.
|
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.
|
Integer |
deliveryTimedOutCount()
The number of targets for which the status is Delivery Timed Out.
|
String |
documentName()
The name of the document requested for execution.
|
String |
documentVersion()
The Systems Manager document (SSM document) version.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(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 hasn't already started running, it won't run.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasInstanceIds()
Returns true if the InstanceIds property was specified by the sender (it may be empty), or false if the sender
did not specify the value (it will be empty).
|
boolean |
hasParameters()
Returns true if the Parameters property was specified by the sender (it may be empty), or false if the sender did
not specify the value (it will be empty).
|
boolean |
hasTargets()
Returns true if the Targets property was specified by the sender (it may be empty), or false if the sender did
not specify the value (it will be empty).
|
List<String> |
instanceIds()
The instance IDs against which this command was requested.
|
String |
maxConcurrency()
The maximum number of instances that are allowed to run 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 running the command.
|
Instant |
requestedDateTime()
The date and time the command was requested.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends Command.Builder> |
serializableBuilderClass() |
String |
serviceRole()
The Identity and Access Management (IAM) service role that Run Command, a capability of Amazon Web Services
Systems Manager, 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.
|
Integer |
timeoutSeconds()
The
TimeoutSeconds value specified for a command. |
Command.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String commandId()
A unique identifier for this command.
public final String documentName()
The name of the document requested for execution.
public final String documentVersion()
The Systems Manager document (SSM document) version.
public final String comment()
User-specified information about the command, such as a brief description of what the command should do.
public final Instant expiresAfter()
If this time is reached and the command hasn't already started running, it won't run. Calculated based on the
ExpiresAfter user input provided as part of the SendCommand API operation.
ExpiresAfter user input provided as part of the SendCommand API operation.public final boolean hasParameters()
public final Map<String,List<String>> parameters()
The parameter values to be inserted in the document when running the command.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasParameters() to see if a value was sent in this field.
public final boolean hasInstanceIds()
public final 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.
You can use hasInstanceIds() to see if a value was sent in this field.
public final boolean hasTargets()
public final 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.
You can use hasTargets() to see if a value was sent in this field.
public final Instant requestedDateTime()
The date and time the command was requested.
public final 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().
CommandStatuspublic final 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().
CommandStatuspublic final 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
Understanding
command statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of
the following values:
Pending: The command hasn't been sent to any instances.
In Progress: The command has been sent to at least one instance but hasn't reached a final state on all instances.
Success: The command successfully ran 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 doesn't 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 running it on any instance. This is a terminal state.
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 Understanding
command statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be
one of the following values:
Pending: The command hasn't been sent to any instances.
In Progress: The command has been sent to at least one instance but hasn't reached a final state on all instances.
Success: The command successfully ran 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 doesn't 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 running it on any instance. This is a terminal state.
public final String outputS3Region()
(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Region of the S3 bucket.
public final String outputS3BucketName()
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
public final 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 final String maxConcurrency()
The maximum number of instances that are allowed to run 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 Running commands using
Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
MaxConcurrency, see Running commands
using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.public final 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
0. For more information about how to use MaxErrors, see Running commands using
Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
0. For more information about how to use MaxErrors, see Running commands
using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.public final Integer targetCount()
The number of targets for the command.
public final 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 final Integer errorCount()
The number of targets for which the status is Failed or Execution Timed Out.
public final Integer deliveryTimedOutCount()
The number of targets for which the status is Delivery Timed Out.
public final String serviceRole()
The Identity and Access Management (IAM) service role that Run Command, a capability of Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes.
public final NotificationConfig notificationConfig()
Configurations for sending notifications about command status changes.
public final CloudWatchOutputConfig cloudWatchOutputConfig()
Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.
public final Integer timeoutSeconds()
The TimeoutSeconds value specified for a command.
TimeoutSeconds value specified for a command.public Command.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<Command.Builder,Command>public static Command.Builder builder()
public static Class<? extends Command.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2021. All rights reserved.