aws_sdk_iot/client/create_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 [`CreateCommand`](crate::operation::create_command::builders::CreateCommandFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`command_id(impl Into<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::command_id) / [`set_command_id(Option<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_command_id):<br>required: **true**<br><p>A unique identifier for the command. We recommend using UUID. Alpha-numeric characters, hyphens, and underscores are valid for use here.</p><br>
7 /// - [`namespace(CommandNamespace)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::namespace) / [`set_namespace(Option<CommandNamespace>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_namespace):<br>required: **false**<br><p>The namespace of the command. The MQTT reserved topics and validations will be used for command executions according to the namespace setting.</p><br>
8 /// - [`display_name(impl Into<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::display_name) / [`set_display_name(Option<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_display_name):<br>required: **false**<br><p>The user-friendly name in the console for the command. This name doesn't have to be unique. You can update the user-friendly name after you define it.</p><br>
9 /// - [`description(impl Into<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_description):<br>required: **false**<br><p>A short text decription of the command.</p><br>
10 /// - [`payload(CommandPayload)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::payload) / [`set_payload(Option<CommandPayload>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_payload):<br>required: **false**<br><p>The payload object for the static command.</p> <p>You can upload a static payload file from your local storage that contains the instructions for the device to process. The payload file can use any format. To make sure that the device correctly interprets the payload, we recommend you to specify the payload content type.</p><br>
11 /// - [`payload_template(impl Into<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::payload_template) / [`set_payload_template(Option<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_payload_template):<br>required: **false**<br><p>The payload template for the dynamic command.</p><note> <p>This parameter is required for dynamic commands where the command execution placeholders are supplied either from <code>mandatoryParameters</code> or when <code>StartCommandExecution</code> is invoked.</p> </note><br>
12 /// - [`preprocessor(CommandPreprocessor)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::preprocessor) / [`set_preprocessor(Option<CommandPreprocessor>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_preprocessor):<br>required: **false**<br><p>Configuration that determines how <code>payloadTemplate</code> is processed to generate command execution payload.</p><note> <p>This parameter is required for dynamic commands, along with <code>payloadTemplate</code>, and <code>mandatoryParameters</code>.</p> </note><br>
13 /// - [`mandatory_parameters(CommandParameter)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::mandatory_parameters) / [`set_mandatory_parameters(Option<Vec::<CommandParameter>>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_mandatory_parameters):<br>required: **false**<br><p>A list of parameters that are used by <code>StartCommandExecution</code> API for execution payload generation.</p><br>
14 /// - [`role_arn(impl Into<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::role_arn) / [`set_role_arn(Option<String>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_role_arn):<br>required: **false**<br><p>The IAM role that you must provide when using the <code>AWS-IoT-FleetWise</code> namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not supported when you use the <code>AWS-IoT</code> namespace.</p><br>
15 /// - [`tags(Tag)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_command::builders::CreateCommandFluentBuilder::set_tags):<br>required: **false**<br><p>Name-value pairs that are used as metadata to manage a command.</p><br>
16 /// - On success, responds with [`CreateCommandOutput`](crate::operation::create_command::CreateCommandOutput) with field(s):
17 /// - [`command_id(Option<String>)`](crate::operation::create_command::CreateCommandOutput::command_id): <p>The unique identifier for the command.</p>
18 /// - [`command_arn(Option<String>)`](crate::operation::create_command::CreateCommandOutput::command_arn): <p>The Amazon Resource Number (ARN) of the command. For example, <code>arn:aws:iot:<region> : <accountid> :command/ <commandid></commandid> </accountid> </region></code></p>
19 /// - On failure, responds with [`SdkError<CreateCommandError>`](crate::operation::create_command::CreateCommandError)
20 pub fn create_command(&self) -> crate::operation::create_command::builders::CreateCommandFluentBuilder {
21 crate::operation::create_command::builders::CreateCommandFluentBuilder::new(self.handle.clone())
22 }
23}