Command
Describes a command request.
Contents
- AlarmConfiguration
-
The details for the CloudWatch alarm applied to your command.
Type: AlarmConfiguration object
Required: No
- CloudWatchOutputConfig
-
Amazon CloudWatch Logs information where you want AWS Systems Manager to send the command output.
Type: CloudWatchOutputConfig object
Required: No
- CommandId
-
A unique identifier for this command.
Type: String
Length Constraints: Fixed length of 36.
Required: No
- Comment
-
User-specified information about the command, such as a brief description of what the command should do.
Type: String
Length Constraints: Maximum length of 100.
Required: No
- 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, Cancelled, Terminated, or Undeliverable.
Type: Integer
Required: No
- DeliveryTimedOutCount
-
The number of targets for which the status is Delivery Timed Out.
Type: Integer
Required: No
- DocumentName
-
The name of the document requested for execution.
Type: String
Pattern:
^[a-zA-Z0-9_\-.]{3,128}$
Required: No
- DocumentVersion
-
The Systems Manager document (SSM document) version.
Type: String
Pattern:
([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)
Required: No
- ErrorCount
-
The number of targets for which the status is Failed or Execution Timed Out.
Type: Integer
Required: No
- ExpiresAfter
-
If a command expires, it changes status to
DeliveryTimedOut
for all invocations that have the statusInProgress
,Pending
, orDelayed
.ExpiresAfter
is calculated based on the total timeout for the overall command. For more information, see Understanding command timeout values in the AWS Systems Manager User Guide.Type: Timestamp
Required: No
- InstanceIds
-
The managed node IDs against which this command was requested.
Type: Array of strings
Array Members: Minimum number of 0 items. Maximum number of 50 items.
Pattern:
(^i-(\w{8}|\w{17})$)|(^mi-\w{17}$)
Required: No
- MaxConcurrency
-
The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number of managed nodes, such as 10, or a percentage of nodes, such as 10%. The default value is 50. For more information about how to use
MaxConcurrency
, see AWS Systems Manager Run Command in the AWS Systems Manager User Guide.Type: String
Length Constraints: Minimum length of 1. Maximum length of 7.
Pattern:
^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$
Required: No
- 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 useMaxErrors
, see AWS Systems Manager Run Command in the AWS Systems Manager User Guide.Type: String
Length Constraints: Minimum length of 1. Maximum length of 7.
Pattern:
^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$
Required: No
- NotificationConfig
-
Configurations for sending notifications about command status changes.
Type: NotificationConfig object
Required: No
- OutputS3BucketName
-
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
Type: String
Length Constraints: Minimum length of 3. Maximum length of 63.
Required: No
- 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.
Type: String
Length Constraints: Maximum length of 500.
Required: No
- OutputS3Region
-
(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the AWS Region of the S3 bucket.
Type: String
Length Constraints: Minimum length of 3. Maximum length of 20.
Required: No
- Parameters
-
The parameter values to be inserted in the document when running the command.
Type: String to array of strings map
Required: No
- RequestedDateTime
-
The date and time the command was requested.
Type: Timestamp
Required: No
- ServiceRole
-
The AWS Identity and Access Management (IAM) service role that Run Command, a capability of AWS Systems Manager, uses to act on your behalf when sending notifications about command status changes.
Type: String
Required: No
- Status
-
The status of the command.
Type: String
Valid Values:
Pending | InProgress | Success | Cancelled | Failed | TimedOut | Cancelling
Required: No
- StatusDetails
-
A detailed status of the command execution.
StatusDetails
includes more information thanStatus
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 AWS Systems Manager User Guide. StatusDetails can be one of the following values:-
Pending: The command hasn't been sent to any managed nodes.
-
In Progress: The command has been sent to at least one managed node but hasn't reached a final state on all managed nodes.
-
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 managed nodes 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.
-
Cancelled: The command was terminated before it was completed. This is a terminal state.
-
Rate Exceeded: The number of managed nodes targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before running it on any managed node. This is a terminal state.
-
Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 100.
Required: No
-
- TargetCount
-
The number of targets for the command.
Type: Integer
Required: No
- Targets
-
An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is required if you don't provide one or more managed node IDs in the call.
Type: Array of Target objects
Array Members: Minimum number of 0 items. Maximum number of 5 items.
Required: No
- TimeoutSeconds
-
The
TimeoutSeconds
value specified for a command.Type: Integer
Valid Range: Minimum value of 30. Maximum value of 2592000.
Required: No
- TriggeredAlarms
-
The CloudWatch alarm that was invoked by the command.
Type: Array of AlarmStateInformation objects
Array Members: Fixed number of 1 item.
Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: