aws_sdk_iot/client/
create_thing.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 [`CreateThing`](crate::operation::create_thing::builders::CreateThingFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`thing_name(impl Into<String>)`](crate::operation::create_thing::builders::CreateThingFluentBuilder::thing_name) / [`set_thing_name(Option<String>)`](crate::operation::create_thing::builders::CreateThingFluentBuilder::set_thing_name):<br>required: **true**<br><p>The name of the thing to create.</p> <p>You can't change a thing's name after you create it. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.</p><br>
7    ///   - [`thing_type_name(impl Into<String>)`](crate::operation::create_thing::builders::CreateThingFluentBuilder::thing_type_name) / [`set_thing_type_name(Option<String>)`](crate::operation::create_thing::builders::CreateThingFluentBuilder::set_thing_type_name):<br>required: **false**<br><p>The name of the thing type associated with the new thing.</p><br>
8    ///   - [`attribute_payload(AttributePayload)`](crate::operation::create_thing::builders::CreateThingFluentBuilder::attribute_payload) / [`set_attribute_payload(Option<AttributePayload>)`](crate::operation::create_thing::builders::CreateThingFluentBuilder::set_attribute_payload):<br>required: **false**<br><p>The attribute payload, which consists of up to three name/value pairs in a JSON document. For example:</p> <p><code>{\"attributes\":{\"string1\":\"string2\"}}</code></p><br>
9    ///   - [`billing_group_name(impl Into<String>)`](crate::operation::create_thing::builders::CreateThingFluentBuilder::billing_group_name) / [`set_billing_group_name(Option<String>)`](crate::operation::create_thing::builders::CreateThingFluentBuilder::set_billing_group_name):<br>required: **false**<br><p>The name of the billing group the thing will be added to.</p><br>
10    /// - On success, responds with [`CreateThingOutput`](crate::operation::create_thing::CreateThingOutput) with field(s):
11    ///   - [`thing_name(Option<String>)`](crate::operation::create_thing::CreateThingOutput::thing_name): <p>The name of the new thing.</p>
12    ///   - [`thing_arn(Option<String>)`](crate::operation::create_thing::CreateThingOutput::thing_arn): <p>The ARN of the new thing.</p>
13    ///   - [`thing_id(Option<String>)`](crate::operation::create_thing::CreateThingOutput::thing_id): <p>The thing ID.</p>
14    /// - On failure, responds with [`SdkError<CreateThingError>`](crate::operation::create_thing::CreateThingError)
15    pub fn create_thing(&self) -> crate::operation::create_thing::builders::CreateThingFluentBuilder {
16        crate::operation::create_thing::builders::CreateThingFluentBuilder::new(self.handle.clone())
17    }
18}