Skip to content

SendCommandRequest

Source code in docs_src/capo_ssm/types/send_command_request.py
class SendCommandRequest(TypedDict, closed=True):
    instance_ids: NotRequired["capo_ssm.types.instance_id_list.InstanceIdList"]
    """<p>The IDs of the managed nodes where the command should run. Specifying managed node IDs is most useful when you are targeting a limited number of managed nodes, though you can specify up to 50 IDs.</p> <p>To target a larger number of managed nodes, or if you prefer not to list individual node IDs, we recommend using the <code>Targets</code> option instead. Using <code>Targets</code>, which accepts tag key-value pairs to identify the managed nodes to send commands to, you can a send command to tens, hundreds, or thousands of nodes at once.</p> <p>For more information about how to use targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html">Run commands at scale</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>"""
    targets: NotRequired["capo_ssm.types.targets.Targets"]
    """<p>An array of search criteria that targets managed nodes using a <code>Key,Value</code> combination that you specify. Specifying targets is most useful when you want to send a command to a large number of managed nodes at once. Using <code>Targets</code>, which accepts tag key-value pairs to identify managed nodes, you can send a command to tens, hundreds, or thousands of nodes at once.</p> <p>To send a command to a smaller number of managed nodes, you can use the <code>InstanceIds</code> option instead.</p> <p>For more information about how to use targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html">Run commands at scale</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>"""
    document_name: "capo_ssm.types.document_arn.DocumentARN"
    """<p>The name of the Amazon Web Services Systems Manager document (SSM document) to run. This can be a public document or a custom document. To run a shared document belonging to another account, specify the document Amazon Resource Name (ARN). For more information about how to use shared documents, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-using-shared.html">Sharing SSM documents</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p> <note> <p>If you specify a document name or ARN that hasn't been shared with your account, you receive an <code>InvalidDocument</code> error. </p> </note>"""
    document_version: NotRequired["capo_ssm.types.document_version.DocumentVersion"]
    r"""<p>The SSM document version to use in the request. You can specify $DEFAULT, $LATEST, or a specific version number. If you run commands by using the Command Line Interface (Amazon Web Services CLI), then you must escape the first two options by using a backslash. If you specify a version number, then you don't need to use the backslash. For example:</p> <p>--document-version "\$DEFAULT"</p> <p>--document-version "\$LATEST"</p> <p>--document-version "3"</p>"""
    document_hash: NotRequired["capo_ssm.types.document_hash.DocumentHash"]
    """<p>The Sha256 or Sha1 hash created by the system when the document was created. </p> <note> <p>Sha1 hashes have been deprecated.</p> </note>"""
    document_hash_type: NotRequired[
        "capo_ssm.types.document_hash_type.DocumentHashType"
    ]
    """<p>Sha256 or Sha1.</p> <note> <p>Sha1 hashes have been deprecated.</p> </note>"""
    timeout_seconds: NotRequired["capo_ssm.types.timeout_seconds.TimeoutSeconds"]
    """<p>If this time is reached and the command hasn't already started running, it won't run.</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>"""
    parameters: NotRequired["capo_ssm.types.parameters.Parameters"]
    """<p>The required and optional parameters specified in the document being run.</p>"""
    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 name of the S3 bucket where command execution responses should be stored.</p>"""
    output_s3_key_prefix: NotRequired["capo_ssm.types.s3_key_prefix.S3KeyPrefix"]
    """<p>The directory structure within the S3 bucket where the responses should be stored.</p>"""
    max_concurrency: NotRequired["capo_ssm.types.max_concurrency.MaxConcurrency"]
    """<p>(Optional) The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number such as 10 or a percentage such as 10%. The default value is <code>50</code>. For more information about how to use <code>MaxConcurrency</code>, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity">Using concurrency controls</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 without the command failing. When the command fails one more time beyond the value of <code>MaxErrors</code>, the systems stops sending the command to additional targets. You can specify a number like 10 or a percentage like 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/send-commands-multiple.html#send-commands-maxerrors">Using error controls</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>"""
    service_role_arn: NotRequired["capo_ssm.types.service_role.ServiceRole"]
    """<p>The ARN of the Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for Run Command commands.</p> <p>This role must provide the <code>sns:Publish</code> permission for your notification topic. For information about creating and using this service role, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html">Monitoring Systems Manager status changes using Amazon SNS notifications</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>"""
    notification_config: NotRequired[
        "capo_ssm.types.notification_config.NotificationConfig"
    ]
    """<p>Configurations for sending notifications.</p>"""
    cloud_watch_output_config: NotRequired[
        "capo_ssm.types.cloud_watch_output_config.CloudWatchOutputConfig"
    ]
    """<p>Enables Amazon Web Services Systems Manager to send Run Command output to Amazon CloudWatch Logs. Run Command is a tool in Amazon Web Services Systems Manager.</p>"""
    alarm_configuration: NotRequired[
        "capo_ssm.types.alarm_configuration.AlarmConfiguration"
    ]
    """<p>The CloudWatch alarm you want to apply to your command.</p>"""

alarm_configuration instance-attribute

alarm_configuration: NotRequired[AlarmConfiguration]

The CloudWatch alarm you want to apply to your command.

cloud_watch_output_config instance-attribute

cloud_watch_output_config: NotRequired[CloudWatchOutputConfig]

Enables Amazon Web Services Systems Manager to send Run Command output to Amazon CloudWatch Logs. Run Command is a tool in Amazon Web Services Systems Manager.

comment instance-attribute

comment: NotRequired[Comment]

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

document_hash instance-attribute

document_hash: NotRequired[DocumentHash]

The Sha256 or Sha1 hash created by the system when the document was created.

Sha1 hashes have been deprecated.

document_hash_type instance-attribute

document_hash_type: NotRequired[DocumentHashType]

Sha256 or Sha1.

Sha1 hashes have been deprecated.

document_name instance-attribute

document_name: DocumentARN

The name of the Amazon Web Services Systems Manager document (SSM document) to run. This can be a public document or a custom document. To run a shared document belonging to another account, specify the document Amazon Resource Name (ARN). For more information about how to use shared documents, see Sharing SSM documents in the Amazon Web Services Systems Manager User Guide.

If you specify a document name or ARN that hasn't been shared with your account, you receive an InvalidDocument error.

document_version instance-attribute

document_version: NotRequired[DocumentVersion]

The SSM document version to use in the request. You can specify $DEFAULT, $LATEST, or a specific version number. If you run commands by using the Command Line Interface (Amazon Web Services CLI), then you must escape the first two options by using a backslash. If you specify a version number, then you don't need to use the backslash. For example:

--document-version "\$DEFAULT"

--document-version "\$LATEST"

--document-version "3"

instance_ids instance-attribute

instance_ids: NotRequired[InstanceIdList]

The IDs of the managed nodes where the command should run. Specifying managed node IDs is most useful when you are targeting a limited number of managed nodes, though you can specify up to 50 IDs.

To target a larger number of managed nodes, or if you prefer not to list individual node IDs, we recommend using the Targets option instead. Using Targets, which accepts tag key-value pairs to identify the managed nodes to send commands to, you can a send command to tens, hundreds, or thousands of nodes at once.

For more information about how to use targets, see Run commands at scale in the Amazon Web Services Systems Manager User Guide.

max_concurrency instance-attribute

max_concurrency: NotRequired[MaxConcurrency]

(Optional) The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number such as 10 or a percentage such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Using concurrency controls in the Amazon Web Services Systems Manager User Guide.

max_errors instance-attribute

max_errors: NotRequired[MaxErrors]

The maximum number of errors allowed without the command failing. When the command fails one more time beyond the value of MaxErrors, the systems stops sending the command to additional targets. You can specify a number like 10 or a percentage like 10%. The default value is 0. For more information about how to use MaxErrors, see Using error controls in the Amazon Web Services Systems Manager User Guide.

notification_config instance-attribute

notification_config: NotRequired[NotificationConfig]

Configurations for sending notifications.

output_s3_bucket_name instance-attribute

output_s3_bucket_name: NotRequired[S3BucketName]

The name of the S3 bucket where command execution responses should be stored.

output_s3_key_prefix instance-attribute

output_s3_key_prefix: NotRequired[S3KeyPrefix]

The directory structure within the S3 bucket where the responses should be stored.

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 required and optional parameters specified in the document being run.

service_role_arn instance-attribute

service_role_arn: NotRequired[ServiceRole]

The ARN of the Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for Run Command commands.

This role must provide the sns:Publish permission for your notification topic. For information about creating and using this service role, see Monitoring Systems Manager status changes using Amazon SNS notifications in the Amazon Web Services Systems Manager User Guide.

targets instance-attribute

targets: NotRequired[Targets]

An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Specifying targets is most useful when you want to send a command to a large number of managed nodes at once. Using Targets, which accepts tag key-value pairs to identify managed nodes, you can send a command to tens, hundreds, or thousands of nodes at once.

To send a command to a smaller number of managed nodes, you can use the InstanceIds option instead.

For more information about how to use targets, see Run commands at scale in the Amazon Web Services Systems Manager User Guide.

timeout_seconds instance-attribute

timeout_seconds: NotRequired[TimeoutSeconds]

If this time is reached and the command hasn't already started running, it won't run.