aws_sdk_cognitoidentityprovider/client/
add_custom_attributes.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 [`AddCustomAttributes`](crate::operation::add_custom_attributes::builders::AddCustomAttributesFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`user_pool_id(impl Into<String>)`](crate::operation::add_custom_attributes::builders::AddCustomAttributesFluentBuilder::user_pool_id) / [`set_user_pool_id(Option<String>)`](crate::operation::add_custom_attributes::builders::AddCustomAttributesFluentBuilder::set_user_pool_id):<br>required: **true**<br><p>The ID of the user pool where you want to add custom attributes.</p><br>
7    ///   - [`custom_attributes(SchemaAttributeType)`](crate::operation::add_custom_attributes::builders::AddCustomAttributesFluentBuilder::custom_attributes) / [`set_custom_attributes(Option<Vec::<SchemaAttributeType>>)`](crate::operation::add_custom_attributes::builders::AddCustomAttributesFluentBuilder::set_custom_attributes):<br>required: **true**<br><p>An array of custom attribute names and other properties. Sets the following characteristics:</p> <dl>  <dt>   AttributeDataType  </dt>  <dd>   <p>The expected data type. Can be a string, a number, a date and time, or a boolean.</p>  </dd>  <dt>   Mutable  </dt>  <dd>   <p>If true, you can grant app clients write access to the attribute value. If false, the attribute value can only be set up on sign-up or administrator creation of users.</p>  </dd>  <dt>   Name  </dt>  <dd>   <p>The attribute name. For an attribute like <code>custom:myAttribute</code>, enter <code>myAttribute</code> for this field.</p>  </dd>  <dt>   Required  </dt>  <dd>   <p>When true, users who sign up or are created must set a value for the attribute.</p>  </dd>  <dt>   NumberAttributeConstraints  </dt>  <dd>   <p>The minimum and maximum length of accepted values for a <code>Number</code>-type attribute.</p>  </dd>  <dt>   StringAttributeConstraints  </dt>  <dd>   <p>The minimum and maximum length of accepted values for a <code>String</code>-type attribute.</p>  </dd>  <dt>   DeveloperOnlyAttribute  </dt>  <dd>   <p>This legacy option creates an attribute with a <code>dev:</code> prefix. You can only set the value of a developer-only attribute with administrative IAM credentials.</p>  </dd> </dl><br>
8    /// - On success, responds with [`AddCustomAttributesOutput`](crate::operation::add_custom_attributes::AddCustomAttributesOutput)
9    /// - On failure, responds with [`SdkError<AddCustomAttributesError>`](crate::operation::add_custom_attributes::AddCustomAttributesError)
10    pub fn add_custom_attributes(&self) -> crate::operation::add_custom_attributes::builders::AddCustomAttributesFluentBuilder {
11        crate::operation::add_custom_attributes::builders::AddCustomAttributesFluentBuilder::new(self.handle.clone())
12    }
13}