Skip to content

Command

Source code in docs_src/capo_ssm/types/command.py
class Command(TypedDict, closed=True):
    command_id: NotRequired["capo_ssm.types.command_id.CommandId"]
    """<p>A unique identifier for this command.</p>"""
    document_name: NotRequired["capo_ssm.types.document_name.DocumentName"]
    """<p>The name of the document requested for execution.</p>"""
    document_version: NotRequired["capo_ssm.types.document_version.DocumentVersion"]
    """<p>The Systems Manager document (SSM document) version.</p>"""
    comment: NotRequired["capo_ssm.types.comment.Comment"]
    """<p>User-specified information about the command, such as a brief description of what the command should do.</p>"""
    expires_after: NotRequired["capo_ssm.types.date_time.DateTime"]
    """<p>If a command expires, it changes status to <code>DeliveryTimedOut</code> for all invocations that have the status <code>InProgress</code>, <code>Pending</code>, or <code>Delayed</code>. <code>ExpiresAfter</code> is calculated based on the total timeout for the overall command. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html?icmpid=docs_ec2_console#monitor-about-status-timeouts">Understanding command timeout values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>"""
    parameters: NotRequired["capo_ssm.types.parameters.Parameters"]
    """<p>The parameter values to be inserted in the document when running the command.</p>"""
    instance_ids: NotRequired["capo_ssm.types.instance_id_list.InstanceIdList"]
    """<p>The managed node IDs against which this command was requested.</p>"""
    targets: NotRequired["capo_ssm.types.targets.Targets"]
    """<p>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.</p>"""
    requested_date_time: NotRequired["capo_ssm.types.date_time.DateTime"]
    """<p>The date and time the command was requested.</p>"""
    status: NotRequired["capo_ssm.types.command_status.CommandStatus"]
    """<p>The status of the command.</p>"""
    status_details: NotRequired["capo_ssm.types.status_details.StatusDetails"]
    """<p>A detailed status of the command execution. <code>StatusDetails</code> includes more information than <code>Status</code> because it includes states resulting from error and concurrency control parameters. <code>StatusDetails</code> can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p> <ul> <li> <p>Pending: The command hasn't been sent to any managed nodes.</p> </li> <li> <p>In Progress: The command has been sent to at least one managed node but hasn't reached a final state on all managed nodes.</p> </li> <li> <p>Success: The command successfully ran on all invocations. This is a terminal state.</p> </li> <li> <p>Delivery Timed Out: The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.</p> </li> <li> <p>Execution Timed Out: The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.</p> </li> <li> <p>Failed: The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.</p> </li> <li> <p>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.</p> </li> <li> <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p> </li> <li> <p>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.</p> </li> <li> <p>Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.</p> </li> </ul>"""
    output_s3_region: NotRequired["capo_ssm.types.s3_region.S3Region"]
    """<p>(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.</p>"""
    output_s3_bucket_name: NotRequired["capo_ssm.types.s3_bucket_name.S3BucketName"]
    """<p>The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.</p>"""
    output_s3_key_prefix: NotRequired["capo_ssm.types.s3_key_prefix.S3KeyPrefix"]
    """<p>The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.</p>"""
    max_concurrency: NotRequired["capo_ssm.types.max_concurrency.MaxConcurrency"]
    """<p>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 <code>MaxConcurrency</code>, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html">Amazon Web Services Systems Manager Run Command</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>"""
    max_errors: NotRequired["capo_ssm.types.max_errors.MaxErrors"]
    """<p>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 <code>0</code>. For more information about how to use <code>MaxErrors</code>, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html">Amazon Web Services Systems Manager Run Command</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>"""
    target_count: "capo_ssm.types.target_count.TargetCount"
    """<p>The number of targets for the command.</p>"""
    completed_count: "capo_ssm.types.completed_count.CompletedCount"
    """<p>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.</p>"""
    error_count: "capo_ssm.types.error_count.ErrorCount"
    """<p>The number of targets for which the status is Failed or Execution Timed Out.</p>"""
    delivery_timed_out_count: (
        "capo_ssm.types.delivery_timed_out_count.DeliveryTimedOutCount"
    )
    """<p>The number of targets for which the status is Delivery Timed Out.</p>"""
    service_role: NotRequired["capo_ssm.types.service_role.ServiceRole"]
    """<p>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. </p>"""
    notification_config: NotRequired[
        "capo_ssm.types.notification_config.NotificationConfig"
    ]
    """<p>Configurations for sending notifications about command status changes. </p>"""
    cloud_watch_output_config: NotRequired[
        "capo_ssm.types.cloud_watch_output_config.CloudWatchOutputConfig"
    ]
    """<p>Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.</p>"""
    timeout_seconds: NotRequired["capo_ssm.types.timeout_seconds.TimeoutSeconds"]
    """<p>The <code>TimeoutSeconds</code> value specified for a command.</p>"""
    alarm_configuration: NotRequired[
        "capo_ssm.types.alarm_configuration.AlarmConfiguration"
    ]
    """<p>The details for the CloudWatch alarm applied to your command.</p>"""
    triggered_alarms: NotRequired[
        "capo_ssm.types.alarm_state_information_list.AlarmStateInformationList"
    ]
    """<p>The CloudWatch alarm that was invoked by the command.</p>"""

alarm_configuration instance-attribute

alarm_configuration: NotRequired[AlarmConfiguration]

The details for the CloudWatch alarm applied to your command.

cloud_watch_output_config instance-attribute

cloud_watch_output_config: NotRequired[CloudWatchOutputConfig]

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

command_id instance-attribute

command_id: NotRequired[CommandId]

A unique identifier for this command.

comment instance-attribute

comment: NotRequired[Comment]

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

completed_count instance-attribute

completed_count: 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.

delivery_timed_out_count instance-attribute

delivery_timed_out_count: DeliveryTimedOutCount

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

document_name instance-attribute

document_name: NotRequired[DocumentName]

The name of the document requested for execution.

document_version instance-attribute

document_version: NotRequired[DocumentVersion]

The Systems Manager document (SSM document) version.

error_count instance-attribute

error_count: ErrorCount

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

expires_after instance-attribute

expires_after: NotRequired[DateTime]

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.

instance_ids instance-attribute

instance_ids: NotRequired[InstanceIdList]

The managed node IDs against which this command was requested.

max_concurrency instance-attribute

max_concurrency: NotRequired[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.

max_errors instance-attribute

max_errors: NotRequired[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.

notification_config instance-attribute

notification_config: NotRequired[NotificationConfig]

Configurations for sending notifications about command status changes.

output_s3_bucket_name instance-attribute

output_s3_bucket_name: NotRequired[S3BucketName]

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

output_s3_key_prefix instance-attribute

output_s3_key_prefix: NotRequired[S3KeyPrefix]

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

output_s3_region instance-attribute

output_s3_region: NotRequired[S3Region]

(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.

parameters instance-attribute

parameters: NotRequired[Parameters]

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

requested_date_time instance-attribute

requested_date_time: NotRequired[DateTime]

The date and time the command was requested.

service_role instance-attribute

service_role: NotRequired[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.

status instance-attribute

status: NotRequired[CommandStatus]

The status of the command.

status_details instance-attribute

status_details: NotRequired[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.

target_count instance-attribute

target_count: TargetCount

The number of targets for the command.

targets instance-attribute

targets: NotRequired[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.

timeout_seconds instance-attribute

timeout_seconds: NotRequired[TimeoutSeconds]

The TimeoutSeconds value specified for a command.

triggered_alarms instance-attribute

triggered_alarms: NotRequired[AlarmStateInformationList]

The CloudWatch alarm that was invoked by the command.