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 command. You must specify this information when using the <code>AWS-IoT</code> namespace.</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 /// - [`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 required by the <code>StartCommandExecution</code> API. These parameters need to be specified only when using the <code>AWS-IoT-FleetWise</code> namespace. You can either specify them here or when running the command using the <code>StartCommandExecution</code> API.</p><br>
12 /// - [`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 required when you use the <code>AWS-IoT</code> namespace.</p><br>
13 /// - [`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>
14 /// - On success, responds with [`CreateCommandOutput`](crate::operation::create_command::CreateCommandOutput) with field(s):
15 /// - [`command_id(Option<String>)`](crate::operation::create_command::CreateCommandOutput::command_id): <p>The unique identifier for the command.</p>
16 /// - [`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>
17 /// - On failure, responds with [`SdkError<CreateCommandError>`](crate::operation::create_command::CreateCommandError)
18 pub fn create_command(&self) -> crate::operation::create_command::builders::CreateCommandFluentBuilder {
19 crate::operation::create_command::builders::CreateCommandFluentBuilder::new(self.handle.clone())
20 }
21}