AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Describes a command request.

Inheritance Hierarchy

System.Object
  Amazon.SimpleSystemsManagement.Model.Command

Namespace: Amazon.SimpleSystemsManagement.Model
Assembly: AWSSDK.SimpleSystemsManagement.dll
Version: 3.x.y.z

Syntax

C#
public class Command

The Command type exposes the following members

Constructors

NameDescription
Public Method Command()

Properties

NameTypeDescription
Public Property AlarmConfiguration Amazon.SimpleSystemsManagement.Model.AlarmConfiguration

Gets and sets the property AlarmConfiguration.

The details for the CloudWatch alarm applied to your command.

Public Property CloudWatchOutputConfig Amazon.SimpleSystemsManagement.Model.CloudWatchOutputConfig

Gets and sets the property CloudWatchOutputConfig.

Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.

Public Property CommandId System.String

Gets and sets the property CommandId.

A unique identifier for this command.

Public Property Comment System.String

Gets and sets the property Comment.

User-specified information about the command, such as a brief description of what the command should do.

Public Property CompletedCount System.Int32

Gets and sets the property 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.

Public Property DeliveryTimedOutCount System.Int32

Gets and sets the property DeliveryTimedOutCount.

The number of targets for which the status is Delivery Timed Out.

Public Property DocumentName System.String

Gets and sets the property DocumentName.

The name of the document requested for execution.

Public Property DocumentVersion System.String

Gets and sets the property DocumentVersion.

The Systems Manager document (SSM document) version.

Public Property ErrorCount System.Int32

Gets and sets the property ErrorCount.

The number of targets for which the status is Failed or Execution Timed Out.

Public Property ExpiresAfter System.DateTime

Gets and sets the property ExpiresAfter.

If a command expires, it changes status to DeliveryTimedOut for all invocations that have the status InProgress, Pending, or Delayed. ExpiresAfter is calculated based on the total timeout for the overall command. For more information, see Understanding command timeout values in the Amazon Web Services Systems Manager User Guide.

Public Property InstanceIds System.Collections.Generic.List<System.String>

Gets and sets the property InstanceIds.

The managed node IDs against which this command was requested.

Public Property MaxConcurrency System.String

Gets and sets the property 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 Amazon Web Services Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.

Public Property MaxErrors System.String

Gets and sets the property 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 Amazon Web Services Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.

Public Property NotificationConfig Amazon.SimpleSystemsManagement.Model.NotificationConfig

Gets and sets the property NotificationConfig.

Configurations for sending notifications about command status changes.

Public Property OutputS3BucketName System.String

Gets and sets the property OutputS3BucketName.

The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.

Public Property OutputS3KeyPrefix System.String

Gets and sets the property 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 Property OutputS3Region System.String

Gets and sets the property 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 Property Parameters System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<System.String>>

Gets and sets the property Parameters.

The parameter values to be inserted in the document when running the command.

Public Property RequestedDateTime System.DateTime

Gets and sets the property RequestedDateTime.

The date and time the command was requested.

Public Property ServiceRole System.String

Gets and sets the property ServiceRole.

The Identity and Access Management (IAM) service role that Run Command, a tool in Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes.

Public Property Status Amazon.SimpleSystemsManagement.CommandStatus

Gets and sets the property Status.

The status of the command.

Public Property StatusDetails System.String

Gets and sets the property 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 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.

Public Property TargetCount System.Int32

Gets and sets the property TargetCount.

The number of targets for the command.

Public Property Targets System.Collections.Generic.List<Amazon.SimpleSystemsManagement.Model.Target>

Gets and sets the property 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.

Public Property TimeoutSeconds System.Int32

Gets and sets the property TimeoutSeconds.

The TimeoutSeconds value specified for a command.

Public Property TriggeredAlarms System.Collections.Generic.List<Amazon.SimpleSystemsManagement.Model.AlarmStateInformation>

Gets and sets the property TriggeredAlarms.

The CloudWatch alarm that was invoked by the command.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5