aws_sdk_ssm/client/send_command.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`SendCommand`](crate::operation::send_command::builders::SendCommandFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`instance_ids(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::instance_ids) / [`set_instance_ids(Option<Vec::<String>>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_instance_ids):<br>required: **false**<br><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><br>
7 /// - [`targets(Target)`](crate::operation::send_command::builders::SendCommandFluentBuilder::targets) / [`set_targets(Option<Vec::<Target>>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_targets):<br>required: **false**<br><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><br>
8 /// - [`document_name(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::document_name) / [`set_document_name(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_document_name):<br>required: **true**<br><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><br>
9 /// - [`document_version(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::document_version) / [`set_document_version(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_document_version):<br>required: **false**<br><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><br>
10 /// - [`document_hash(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::document_hash) / [`set_document_hash(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_document_hash):<br>required: **false**<br><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><br>
11 /// - [`document_hash_type(DocumentHashType)`](crate::operation::send_command::builders::SendCommandFluentBuilder::document_hash_type) / [`set_document_hash_type(Option<DocumentHashType>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_document_hash_type):<br>required: **false**<br><p>Sha256 or Sha1.</p><note> <p>Sha1 hashes have been deprecated.</p> </note><br>
12 /// - [`timeout_seconds(i32)`](crate::operation::send_command::builders::SendCommandFluentBuilder::timeout_seconds) / [`set_timeout_seconds(Option<i32>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_timeout_seconds):<br>required: **false**<br><p>If this time is reached and the command hasn't already started running, it won't run.</p><br>
13 /// - [`comment(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::comment) / [`set_comment(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_comment):<br>required: **false**<br><p>User-specified information about the command, such as a brief description of what the command should do.</p><br>
14 /// - [`parameters(impl Into<String>, Vec::<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::parameters) / [`set_parameters(Option<HashMap::<String, Vec::<String>>>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_parameters):<br>required: **false**<br><p>The required and optional parameters specified in the document being run.</p><br>
15 /// - [`output_s3_region(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::output_s3_region) / [`set_output_s3_region(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_output_s3_region):<br>required: **false**<br><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><br>
16 /// - [`output_s3_bucket_name(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::output_s3_bucket_name) / [`set_output_s3_bucket_name(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_output_s3_bucket_name):<br>required: **false**<br><p>The name of the S3 bucket where command execution responses should be stored.</p><br>
17 /// - [`output_s3_key_prefix(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::output_s3_key_prefix) / [`set_output_s3_key_prefix(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_output_s3_key_prefix):<br>required: **false**<br><p>The directory structure within the S3 bucket where the responses should be stored.</p><br>
18 /// - [`max_concurrency(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::max_concurrency) / [`set_max_concurrency(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_max_concurrency):<br>required: **false**<br><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><br>
19 /// - [`max_errors(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::max_errors) / [`set_max_errors(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_max_errors):<br>required: **false**<br><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><br>
20 /// - [`service_role_arn(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::service_role_arn) / [`set_service_role_arn(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_service_role_arn):<br>required: **false**<br><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><br>
21 /// - [`notification_config(NotificationConfig)`](crate::operation::send_command::builders::SendCommandFluentBuilder::notification_config) / [`set_notification_config(Option<NotificationConfig>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_notification_config):<br>required: **false**<br><p>Configurations for sending notifications.</p><br>
22 /// - [`cloud_watch_output_config(CloudWatchOutputConfig)`](crate::operation::send_command::builders::SendCommandFluentBuilder::cloud_watch_output_config) / [`set_cloud_watch_output_config(Option<CloudWatchOutputConfig>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_cloud_watch_output_config):<br>required: **false**<br><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><br>
23 /// - [`alarm_configuration(AlarmConfiguration)`](crate::operation::send_command::builders::SendCommandFluentBuilder::alarm_configuration) / [`set_alarm_configuration(Option<AlarmConfiguration>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_alarm_configuration):<br>required: **false**<br><p>The CloudWatch alarm you want to apply to your command.</p><br>
24 /// - On success, responds with [`SendCommandOutput`](crate::operation::send_command::SendCommandOutput) with field(s):
25 /// - [`command(Option<Command>)`](crate::operation::send_command::SendCommandOutput::command): <p>The request as it was received by Systems Manager. Also provides the command ID which can be used future references to this request.</p>
26 /// - On failure, responds with [`SdkError<SendCommandError>`](crate::operation::send_command::SendCommandError)
27 pub fn send_command(&self) -> crate::operation::send_command::builders::SendCommandFluentBuilder {
28 crate::operation::send_command::builders::SendCommandFluentBuilder::new(self.handle.clone())
29 }
30}