Struct aws_sdk_iot::input::CreateThingInput
source · #[non_exhaustive]pub struct CreateThingInput { /* private fields */ }
Expand description
The input for the CreateThing operation.
Implementations§
source§impl CreateThingInput
impl CreateThingInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<CreateThing, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<CreateThing, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<CreateThing
>
Examples found in repository?
src/client.rs (line 8289)
8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreateThing,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreateThingError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateThingOutput,
aws_smithy_http::result::SdkError<crate::error::CreateThingError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture CreateThingInput
.
source§impl CreateThingInput
impl CreateThingInput
sourcepub fn thing_name(&self) -> Option<&str>
pub fn thing_name(&self) -> Option<&str>
The name of the thing to create.
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.
sourcepub fn thing_type_name(&self) -> Option<&str>
pub fn thing_type_name(&self) -> Option<&str>
The name of the thing type associated with the new thing.
sourcepub fn attribute_payload(&self) -> Option<&AttributePayload>
pub fn attribute_payload(&self) -> Option<&AttributePayload>
The attribute payload, which consists of up to three name/value pairs in a JSON document. For example:
{\"attributes\":{\"string1\":\"string2\"}}
sourcepub fn billing_group_name(&self) -> Option<&str>
pub fn billing_group_name(&self) -> Option<&str>
The name of the billing group the thing will be added to.
Trait Implementations§
source§impl Clone for CreateThingInput
impl Clone for CreateThingInput
source§fn clone(&self) -> CreateThingInput
fn clone(&self) -> CreateThingInput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more