@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()
For responses, this returns true if the service returned a value for the InstanceIds property.
|
boolean |
hasParameters()
For responses, this returns true if the service returned a value for the Parameters property.
|
boolean |
hasTargets()
For responses, this returns true if the service returned a value for the Targets property.
|
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()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.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.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasParameters() method.
public final boolean hasInstanceIds()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.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.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasInstanceIds() method.
public final boolean hasTargets()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.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.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasTargets() method.
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 Amazon Web Services 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.