aws_sdk_ssm/operation/send_command/
_send_command_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct SendCommandInput {
6    /// <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>
7    /// <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>
8    /// <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>
9    pub instance_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <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>
11    /// <p>To send a command to a smaller number of managed nodes, you can use the <code>InstanceIds</code> option instead.</p>
12    /// <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>
13    pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
14    /// <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>
15    /// <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>
16    /// </note>
17    pub document_name: ::std::option::Option<::std::string::String>,
18    /// <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>
19    /// <p>--document-version "\$DEFAULT"</p>
20    /// <p>--document-version "\$LATEST"</p>
21    /// <p>--document-version "3"</p>
22    pub document_version: ::std::option::Option<::std::string::String>,
23    /// <p>The Sha256 or Sha1 hash created by the system when the document was created.</p><note>
24    /// <p>Sha1 hashes have been deprecated.</p>
25    /// </note>
26    pub document_hash: ::std::option::Option<::std::string::String>,
27    /// <p>Sha256 or Sha1.</p><note>
28    /// <p>Sha1 hashes have been deprecated.</p>
29    /// </note>
30    pub document_hash_type: ::std::option::Option<crate::types::DocumentHashType>,
31    /// <p>If this time is reached and the command hasn't already started running, it won't run.</p>
32    pub timeout_seconds: ::std::option::Option<i32>,
33    /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
34    pub comment: ::std::option::Option<::std::string::String>,
35    /// <p>The required and optional parameters specified in the document being run.</p>
36    pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
37    /// <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>
38    pub output_s3_region: ::std::option::Option<::std::string::String>,
39    /// <p>The name of the S3 bucket where command execution responses should be stored.</p>
40    pub output_s3_bucket_name: ::std::option::Option<::std::string::String>,
41    /// <p>The directory structure within the S3 bucket where the responses should be stored.</p>
42    pub output_s3_key_prefix: ::std::option::Option<::std::string::String>,
43    /// <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>
44    pub max_concurrency: ::std::option::Option<::std::string::String>,
45    /// <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>
46    pub max_errors: ::std::option::Option<::std::string::String>,
47    /// <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>
48    /// <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>
49    pub service_role_arn: ::std::option::Option<::std::string::String>,
50    /// <p>Configurations for sending notifications.</p>
51    pub notification_config: ::std::option::Option<crate::types::NotificationConfig>,
52    /// <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>
53    pub cloud_watch_output_config: ::std::option::Option<crate::types::CloudWatchOutputConfig>,
54    /// <p>The CloudWatch alarm you want to apply to your command.</p>
55    pub alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
56}
57impl SendCommandInput {
58    /// <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>
59    /// <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>
60    /// <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>
61    ///
62    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.instance_ids.is_none()`.
63    pub fn instance_ids(&self) -> &[::std::string::String] {
64        self.instance_ids.as_deref().unwrap_or_default()
65    }
66    /// <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>
67    /// <p>To send a command to a smaller number of managed nodes, you can use the <code>InstanceIds</code> option instead.</p>
68    /// <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>
69    ///
70    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.targets.is_none()`.
71    pub fn targets(&self) -> &[crate::types::Target] {
72        self.targets.as_deref().unwrap_or_default()
73    }
74    /// <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>
75    /// <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>
76    /// </note>
77    pub fn document_name(&self) -> ::std::option::Option<&str> {
78        self.document_name.as_deref()
79    }
80    /// <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>
81    /// <p>--document-version "\$DEFAULT"</p>
82    /// <p>--document-version "\$LATEST"</p>
83    /// <p>--document-version "3"</p>
84    pub fn document_version(&self) -> ::std::option::Option<&str> {
85        self.document_version.as_deref()
86    }
87    /// <p>The Sha256 or Sha1 hash created by the system when the document was created.</p><note>
88    /// <p>Sha1 hashes have been deprecated.</p>
89    /// </note>
90    pub fn document_hash(&self) -> ::std::option::Option<&str> {
91        self.document_hash.as_deref()
92    }
93    /// <p>Sha256 or Sha1.</p><note>
94    /// <p>Sha1 hashes have been deprecated.</p>
95    /// </note>
96    pub fn document_hash_type(&self) -> ::std::option::Option<&crate::types::DocumentHashType> {
97        self.document_hash_type.as_ref()
98    }
99    /// <p>If this time is reached and the command hasn't already started running, it won't run.</p>
100    pub fn timeout_seconds(&self) -> ::std::option::Option<i32> {
101        self.timeout_seconds
102    }
103    /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
104    pub fn comment(&self) -> ::std::option::Option<&str> {
105        self.comment.as_deref()
106    }
107    /// <p>The required and optional parameters specified in the document being run.</p>
108    pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
109        self.parameters.as_ref()
110    }
111    /// <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>
112    pub fn output_s3_region(&self) -> ::std::option::Option<&str> {
113        self.output_s3_region.as_deref()
114    }
115    /// <p>The name of the S3 bucket where command execution responses should be stored.</p>
116    pub fn output_s3_bucket_name(&self) -> ::std::option::Option<&str> {
117        self.output_s3_bucket_name.as_deref()
118    }
119    /// <p>The directory structure within the S3 bucket where the responses should be stored.</p>
120    pub fn output_s3_key_prefix(&self) -> ::std::option::Option<&str> {
121        self.output_s3_key_prefix.as_deref()
122    }
123    /// <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>
124    pub fn max_concurrency(&self) -> ::std::option::Option<&str> {
125        self.max_concurrency.as_deref()
126    }
127    /// <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>
128    pub fn max_errors(&self) -> ::std::option::Option<&str> {
129        self.max_errors.as_deref()
130    }
131    /// <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>
132    /// <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>
133    pub fn service_role_arn(&self) -> ::std::option::Option<&str> {
134        self.service_role_arn.as_deref()
135    }
136    /// <p>Configurations for sending notifications.</p>
137    pub fn notification_config(&self) -> ::std::option::Option<&crate::types::NotificationConfig> {
138        self.notification_config.as_ref()
139    }
140    /// <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>
141    pub fn cloud_watch_output_config(&self) -> ::std::option::Option<&crate::types::CloudWatchOutputConfig> {
142        self.cloud_watch_output_config.as_ref()
143    }
144    /// <p>The CloudWatch alarm you want to apply to your command.</p>
145    pub fn alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
146        self.alarm_configuration.as_ref()
147    }
148}
149impl ::std::fmt::Debug for SendCommandInput {
150    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
151        let mut formatter = f.debug_struct("SendCommandInput");
152        formatter.field("instance_ids", &self.instance_ids);
153        formatter.field("targets", &self.targets);
154        formatter.field("document_name", &self.document_name);
155        formatter.field("document_version", &self.document_version);
156        formatter.field("document_hash", &self.document_hash);
157        formatter.field("document_hash_type", &self.document_hash_type);
158        formatter.field("timeout_seconds", &self.timeout_seconds);
159        formatter.field("comment", &self.comment);
160        formatter.field("parameters", &"*** Sensitive Data Redacted ***");
161        formatter.field("output_s3_region", &self.output_s3_region);
162        formatter.field("output_s3_bucket_name", &self.output_s3_bucket_name);
163        formatter.field("output_s3_key_prefix", &self.output_s3_key_prefix);
164        formatter.field("max_concurrency", &self.max_concurrency);
165        formatter.field("max_errors", &self.max_errors);
166        formatter.field("service_role_arn", &self.service_role_arn);
167        formatter.field("notification_config", &self.notification_config);
168        formatter.field("cloud_watch_output_config", &self.cloud_watch_output_config);
169        formatter.field("alarm_configuration", &self.alarm_configuration);
170        formatter.finish()
171    }
172}
173impl SendCommandInput {
174    /// Creates a new builder-style object to manufacture [`SendCommandInput`](crate::operation::send_command::SendCommandInput).
175    pub fn builder() -> crate::operation::send_command::builders::SendCommandInputBuilder {
176        crate::operation::send_command::builders::SendCommandInputBuilder::default()
177    }
178}
179
180/// A builder for [`SendCommandInput`](crate::operation::send_command::SendCommandInput).
181#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
182#[non_exhaustive]
183pub struct SendCommandInputBuilder {
184    pub(crate) instance_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
185    pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
186    pub(crate) document_name: ::std::option::Option<::std::string::String>,
187    pub(crate) document_version: ::std::option::Option<::std::string::String>,
188    pub(crate) document_hash: ::std::option::Option<::std::string::String>,
189    pub(crate) document_hash_type: ::std::option::Option<crate::types::DocumentHashType>,
190    pub(crate) timeout_seconds: ::std::option::Option<i32>,
191    pub(crate) comment: ::std::option::Option<::std::string::String>,
192    pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
193    pub(crate) output_s3_region: ::std::option::Option<::std::string::String>,
194    pub(crate) output_s3_bucket_name: ::std::option::Option<::std::string::String>,
195    pub(crate) output_s3_key_prefix: ::std::option::Option<::std::string::String>,
196    pub(crate) max_concurrency: ::std::option::Option<::std::string::String>,
197    pub(crate) max_errors: ::std::option::Option<::std::string::String>,
198    pub(crate) service_role_arn: ::std::option::Option<::std::string::String>,
199    pub(crate) notification_config: ::std::option::Option<crate::types::NotificationConfig>,
200    pub(crate) cloud_watch_output_config: ::std::option::Option<crate::types::CloudWatchOutputConfig>,
201    pub(crate) alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
202}
203impl SendCommandInputBuilder {
204    /// Appends an item to `instance_ids`.
205    ///
206    /// To override the contents of this collection use [`set_instance_ids`](Self::set_instance_ids).
207    ///
208    /// <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>
209    /// <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>
210    /// <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>
211    pub fn instance_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
212        let mut v = self.instance_ids.unwrap_or_default();
213        v.push(input.into());
214        self.instance_ids = ::std::option::Option::Some(v);
215        self
216    }
217    /// <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>
218    /// <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>
219    /// <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>
220    pub fn set_instance_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
221        self.instance_ids = input;
222        self
223    }
224    /// <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>
225    /// <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>
226    /// <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>
227    pub fn get_instance_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
228        &self.instance_ids
229    }
230    /// Appends an item to `targets`.
231    ///
232    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
233    ///
234    /// <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>
235    /// <p>To send a command to a smaller number of managed nodes, you can use the <code>InstanceIds</code> option instead.</p>
236    /// <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>
237    pub fn targets(mut self, input: crate::types::Target) -> Self {
238        let mut v = self.targets.unwrap_or_default();
239        v.push(input);
240        self.targets = ::std::option::Option::Some(v);
241        self
242    }
243    /// <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>
244    /// <p>To send a command to a smaller number of managed nodes, you can use the <code>InstanceIds</code> option instead.</p>
245    /// <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>
246    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
247        self.targets = input;
248        self
249    }
250    /// <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>
251    /// <p>To send a command to a smaller number of managed nodes, you can use the <code>InstanceIds</code> option instead.</p>
252    /// <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>
253    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
254        &self.targets
255    }
256    /// <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>
257    /// <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>
258    /// </note>
259    /// This field is required.
260    pub fn document_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261        self.document_name = ::std::option::Option::Some(input.into());
262        self
263    }
264    /// <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>
265    /// <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>
266    /// </note>
267    pub fn set_document_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268        self.document_name = input;
269        self
270    }
271    /// <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>
272    /// <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>
273    /// </note>
274    pub fn get_document_name(&self) -> &::std::option::Option<::std::string::String> {
275        &self.document_name
276    }
277    /// <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>
278    /// <p>--document-version "\$DEFAULT"</p>
279    /// <p>--document-version "\$LATEST"</p>
280    /// <p>--document-version "3"</p>
281    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
282        self.document_version = ::std::option::Option::Some(input.into());
283        self
284    }
285    /// <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>
286    /// <p>--document-version "\$DEFAULT"</p>
287    /// <p>--document-version "\$LATEST"</p>
288    /// <p>--document-version "3"</p>
289    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
290        self.document_version = input;
291        self
292    }
293    /// <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>
294    /// <p>--document-version "\$DEFAULT"</p>
295    /// <p>--document-version "\$LATEST"</p>
296    /// <p>--document-version "3"</p>
297    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
298        &self.document_version
299    }
300    /// <p>The Sha256 or Sha1 hash created by the system when the document was created.</p><note>
301    /// <p>Sha1 hashes have been deprecated.</p>
302    /// </note>
303    pub fn document_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
304        self.document_hash = ::std::option::Option::Some(input.into());
305        self
306    }
307    /// <p>The Sha256 or Sha1 hash created by the system when the document was created.</p><note>
308    /// <p>Sha1 hashes have been deprecated.</p>
309    /// </note>
310    pub fn set_document_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
311        self.document_hash = input;
312        self
313    }
314    /// <p>The Sha256 or Sha1 hash created by the system when the document was created.</p><note>
315    /// <p>Sha1 hashes have been deprecated.</p>
316    /// </note>
317    pub fn get_document_hash(&self) -> &::std::option::Option<::std::string::String> {
318        &self.document_hash
319    }
320    /// <p>Sha256 or Sha1.</p><note>
321    /// <p>Sha1 hashes have been deprecated.</p>
322    /// </note>
323    pub fn document_hash_type(mut self, input: crate::types::DocumentHashType) -> Self {
324        self.document_hash_type = ::std::option::Option::Some(input);
325        self
326    }
327    /// <p>Sha256 or Sha1.</p><note>
328    /// <p>Sha1 hashes have been deprecated.</p>
329    /// </note>
330    pub fn set_document_hash_type(mut self, input: ::std::option::Option<crate::types::DocumentHashType>) -> Self {
331        self.document_hash_type = input;
332        self
333    }
334    /// <p>Sha256 or Sha1.</p><note>
335    /// <p>Sha1 hashes have been deprecated.</p>
336    /// </note>
337    pub fn get_document_hash_type(&self) -> &::std::option::Option<crate::types::DocumentHashType> {
338        &self.document_hash_type
339    }
340    /// <p>If this time is reached and the command hasn't already started running, it won't run.</p>
341    pub fn timeout_seconds(mut self, input: i32) -> Self {
342        self.timeout_seconds = ::std::option::Option::Some(input);
343        self
344    }
345    /// <p>If this time is reached and the command hasn't already started running, it won't run.</p>
346    pub fn set_timeout_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
347        self.timeout_seconds = input;
348        self
349    }
350    /// <p>If this time is reached and the command hasn't already started running, it won't run.</p>
351    pub fn get_timeout_seconds(&self) -> &::std::option::Option<i32> {
352        &self.timeout_seconds
353    }
354    /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
355    pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
356        self.comment = ::std::option::Option::Some(input.into());
357        self
358    }
359    /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
360    pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
361        self.comment = input;
362        self
363    }
364    /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
365    pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
366        &self.comment
367    }
368    /// Adds a key-value pair to `parameters`.
369    ///
370    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
371    ///
372    /// <p>The required and optional parameters specified in the document being run.</p>
373    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
374        let mut hash_map = self.parameters.unwrap_or_default();
375        hash_map.insert(k.into(), v);
376        self.parameters = ::std::option::Option::Some(hash_map);
377        self
378    }
379    /// <p>The required and optional parameters specified in the document being run.</p>
380    pub fn set_parameters(
381        mut self,
382        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
383    ) -> Self {
384        self.parameters = input;
385        self
386    }
387    /// <p>The required and optional parameters specified in the document being run.</p>
388    pub fn get_parameters(
389        &self,
390    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
391        &self.parameters
392    }
393    /// <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>
394    pub fn output_s3_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
395        self.output_s3_region = ::std::option::Option::Some(input.into());
396        self
397    }
398    /// <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>
399    pub fn set_output_s3_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
400        self.output_s3_region = input;
401        self
402    }
403    /// <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>
404    pub fn get_output_s3_region(&self) -> &::std::option::Option<::std::string::String> {
405        &self.output_s3_region
406    }
407    /// <p>The name of the S3 bucket where command execution responses should be stored.</p>
408    pub fn output_s3_bucket_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
409        self.output_s3_bucket_name = ::std::option::Option::Some(input.into());
410        self
411    }
412    /// <p>The name of the S3 bucket where command execution responses should be stored.</p>
413    pub fn set_output_s3_bucket_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
414        self.output_s3_bucket_name = input;
415        self
416    }
417    /// <p>The name of the S3 bucket where command execution responses should be stored.</p>
418    pub fn get_output_s3_bucket_name(&self) -> &::std::option::Option<::std::string::String> {
419        &self.output_s3_bucket_name
420    }
421    /// <p>The directory structure within the S3 bucket where the responses should be stored.</p>
422    pub fn output_s3_key_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
423        self.output_s3_key_prefix = ::std::option::Option::Some(input.into());
424        self
425    }
426    /// <p>The directory structure within the S3 bucket where the responses should be stored.</p>
427    pub fn set_output_s3_key_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
428        self.output_s3_key_prefix = input;
429        self
430    }
431    /// <p>The directory structure within the S3 bucket where the responses should be stored.</p>
432    pub fn get_output_s3_key_prefix(&self) -> &::std::option::Option<::std::string::String> {
433        &self.output_s3_key_prefix
434    }
435    /// <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>
436    pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
437        self.max_concurrency = ::std::option::Option::Some(input.into());
438        self
439    }
440    /// <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>
441    pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
442        self.max_concurrency = input;
443        self
444    }
445    /// <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>
446    pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
447        &self.max_concurrency
448    }
449    /// <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>
450    pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
451        self.max_errors = ::std::option::Option::Some(input.into());
452        self
453    }
454    /// <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>
455    pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
456        self.max_errors = input;
457        self
458    }
459    /// <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>
460    pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
461        &self.max_errors
462    }
463    /// <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>
464    /// <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>
465    pub fn service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
466        self.service_role_arn = ::std::option::Option::Some(input.into());
467        self
468    }
469    /// <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>
470    /// <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>
471    pub fn set_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
472        self.service_role_arn = input;
473        self
474    }
475    /// <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>
476    /// <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>
477    pub fn get_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
478        &self.service_role_arn
479    }
480    /// <p>Configurations for sending notifications.</p>
481    pub fn notification_config(mut self, input: crate::types::NotificationConfig) -> Self {
482        self.notification_config = ::std::option::Option::Some(input);
483        self
484    }
485    /// <p>Configurations for sending notifications.</p>
486    pub fn set_notification_config(mut self, input: ::std::option::Option<crate::types::NotificationConfig>) -> Self {
487        self.notification_config = input;
488        self
489    }
490    /// <p>Configurations for sending notifications.</p>
491    pub fn get_notification_config(&self) -> &::std::option::Option<crate::types::NotificationConfig> {
492        &self.notification_config
493    }
494    /// <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>
495    pub fn cloud_watch_output_config(mut self, input: crate::types::CloudWatchOutputConfig) -> Self {
496        self.cloud_watch_output_config = ::std::option::Option::Some(input);
497        self
498    }
499    /// <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>
500    pub fn set_cloud_watch_output_config(mut self, input: ::std::option::Option<crate::types::CloudWatchOutputConfig>) -> Self {
501        self.cloud_watch_output_config = input;
502        self
503    }
504    /// <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>
505    pub fn get_cloud_watch_output_config(&self) -> &::std::option::Option<crate::types::CloudWatchOutputConfig> {
506        &self.cloud_watch_output_config
507    }
508    /// <p>The CloudWatch alarm you want to apply to your command.</p>
509    pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
510        self.alarm_configuration = ::std::option::Option::Some(input);
511        self
512    }
513    /// <p>The CloudWatch alarm you want to apply to your command.</p>
514    pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
515        self.alarm_configuration = input;
516        self
517    }
518    /// <p>The CloudWatch alarm you want to apply to your command.</p>
519    pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
520        &self.alarm_configuration
521    }
522    /// Consumes the builder and constructs a [`SendCommandInput`](crate::operation::send_command::SendCommandInput).
523    pub fn build(self) -> ::std::result::Result<crate::operation::send_command::SendCommandInput, ::aws_smithy_types::error::operation::BuildError> {
524        ::std::result::Result::Ok(crate::operation::send_command::SendCommandInput {
525            instance_ids: self.instance_ids,
526            targets: self.targets,
527            document_name: self.document_name,
528            document_version: self.document_version,
529            document_hash: self.document_hash,
530            document_hash_type: self.document_hash_type,
531            timeout_seconds: self.timeout_seconds,
532            comment: self.comment,
533            parameters: self.parameters,
534            output_s3_region: self.output_s3_region,
535            output_s3_bucket_name: self.output_s3_bucket_name,
536            output_s3_key_prefix: self.output_s3_key_prefix,
537            max_concurrency: self.max_concurrency,
538            max_errors: self.max_errors,
539            service_role_arn: self.service_role_arn,
540            notification_config: self.notification_config,
541            cloud_watch_output_config: self.cloud_watch_output_config,
542            alarm_configuration: self.alarm_configuration,
543        })
544    }
545}
546impl ::std::fmt::Debug for SendCommandInputBuilder {
547    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
548        let mut formatter = f.debug_struct("SendCommandInputBuilder");
549        formatter.field("instance_ids", &self.instance_ids);
550        formatter.field("targets", &self.targets);
551        formatter.field("document_name", &self.document_name);
552        formatter.field("document_version", &self.document_version);
553        formatter.field("document_hash", &self.document_hash);
554        formatter.field("document_hash_type", &self.document_hash_type);
555        formatter.field("timeout_seconds", &self.timeout_seconds);
556        formatter.field("comment", &self.comment);
557        formatter.field("parameters", &"*** Sensitive Data Redacted ***");
558        formatter.field("output_s3_region", &self.output_s3_region);
559        formatter.field("output_s3_bucket_name", &self.output_s3_bucket_name);
560        formatter.field("output_s3_key_prefix", &self.output_s3_key_prefix);
561        formatter.field("max_concurrency", &self.max_concurrency);
562        formatter.field("max_errors", &self.max_errors);
563        formatter.field("service_role_arn", &self.service_role_arn);
564        formatter.field("notification_config", &self.notification_config);
565        formatter.field("cloud_watch_output_config", &self.cloud_watch_output_config);
566        formatter.field("alarm_configuration", &self.alarm_configuration);
567        formatter.finish()
568    }
569}