aws_sdk_iot/client/attach_thing_principal.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 [`AttachThingPrincipal`](crate::operation::attach_thing_principal::builders::AttachThingPrincipalFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`thing_name(impl Into<String>)`](crate::operation::attach_thing_principal::builders::AttachThingPrincipalFluentBuilder::thing_name) / [`set_thing_name(Option<String>)`](crate::operation::attach_thing_principal::builders::AttachThingPrincipalFluentBuilder::set_thing_name):<br>required: **true**<br><p>The name of the thing.</p><br>
7 /// - [`principal(impl Into<String>)`](crate::operation::attach_thing_principal::builders::AttachThingPrincipalFluentBuilder::principal) / [`set_principal(Option<String>)`](crate::operation::attach_thing_principal::builders::AttachThingPrincipalFluentBuilder::set_principal):<br>required: **true**<br><p>The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.</p><br>
8 /// - [`thing_principal_type(ThingPrincipalType)`](crate::operation::attach_thing_principal::builders::AttachThingPrincipalFluentBuilder::thing_principal_type) / [`set_thing_principal_type(Option<ThingPrincipalType>)`](crate::operation::attach_thing_principal::builders::AttachThingPrincipalFluentBuilder::set_thing_principal_type):<br>required: **false**<br><p>The type of the relation you want to specify when you attach a principal to a thing.</p> <ul> <li> <p><code>EXCLUSIVE_THING</code> - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.</p></li> </ul> <ul> <li> <p><code>NON_EXCLUSIVE_THING</code> - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.</p></li> </ul><br>
9 /// - On success, responds with [`AttachThingPrincipalOutput`](crate::operation::attach_thing_principal::AttachThingPrincipalOutput)
10 /// - On failure, responds with [`SdkError<AttachThingPrincipalError>`](crate::operation::attach_thing_principal::AttachThingPrincipalError)
11 pub fn attach_thing_principal(&self) -> crate::operation::attach_thing_principal::builders::AttachThingPrincipalFluentBuilder {
12 crate::operation::attach_thing_principal::builders::AttachThingPrincipalFluentBuilder::new(self.handle.clone())
13 }
14}