![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.cognito.kotlin.inputs.UserPoolSchemaAttributeArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.cognito.kotlin.inputs
import com.pulumi.awsnative.cognito.inputs.UserPoolSchemaAttributeArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
*
* @property attributeDataType The data format of the values for your attribute. When you choose an `AttributeDataType` , Amazon Cognito validates the input against the data type. A custom attribute value in your user's ID token is always a string, for example `"custom:isMember" : "true"` or `"custom:YearsAsMember" : "12"` .
* @property developerOnlyAttribute > We recommend that you use [WriteAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes) in the user pool client to control how attributes can be mutated for new use cases instead of using `DeveloperOnlyAttribute` .
* Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users will not be able to modify this attribute using their access token.
* @property mutable Specifies whether the value of the attribute can be changed.
* Any user pool attribute whose value you map from an IdP attribute must be mutable, with a parameter value of `true` . Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see [Specifying Identity Provider Attribute Mappings for Your User Pool](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html) .
* @property name The name of your user pool attribute. When you create or update a user pool, adding a schema attribute creates a custom or developer-only attribute. When you add an attribute with a `Name` value of `MyAttribute` , Amazon Cognito creates the custom attribute `custom:MyAttribute` . When `DeveloperOnlyAttribute` is `true` , Amazon Cognito creates your attribute as `dev:MyAttribute` . In an operation that describes a user pool, Amazon Cognito returns this value as `value` for standard attributes, `custom:value` for custom attributes, and `dev:value` for developer-only attributes..
* @property numberAttributeConstraints Specifies the constraints for an attribute of the number type.
* @property required Specifies whether a user pool attribute is required. If the attribute is required and the user doesn't provide a value, registration or sign-in will fail.
* @property stringAttributeConstraints Specifies the constraints for an attribute of the string type.
*/
public data class UserPoolSchemaAttributeArgs(
public val attributeDataType: Output? = null,
public val developerOnlyAttribute: Output? = null,
public val mutable: Output? = null,
public val name: Output? = null,
public val numberAttributeConstraints: Output? = null,
public val required: Output? = null,
public val stringAttributeConstraints: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.cognito.inputs.UserPoolSchemaAttributeArgs =
com.pulumi.awsnative.cognito.inputs.UserPoolSchemaAttributeArgs.builder()
.attributeDataType(attributeDataType?.applyValue({ args0 -> args0 }))
.developerOnlyAttribute(developerOnlyAttribute?.applyValue({ args0 -> args0 }))
.mutable(mutable?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.numberAttributeConstraints(
numberAttributeConstraints?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.required(required?.applyValue({ args0 -> args0 }))
.stringAttributeConstraints(
stringAttributeConstraints?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [UserPoolSchemaAttributeArgs].
*/
@PulumiTagMarker
public class UserPoolSchemaAttributeArgsBuilder internal constructor() {
private var attributeDataType: Output? = null
private var developerOnlyAttribute: Output? = null
private var mutable: Output? = null
private var name: Output? = null
private var numberAttributeConstraints: Output? = null
private var required: Output? = null
private var stringAttributeConstraints: Output? = null
/**
* @param value The data format of the values for your attribute. When you choose an `AttributeDataType` , Amazon Cognito validates the input against the data type. A custom attribute value in your user's ID token is always a string, for example `"custom:isMember" : "true"` or `"custom:YearsAsMember" : "12"` .
*/
@JvmName("gueqoocxdgailnfd")
public suspend fun attributeDataType(`value`: Output) {
this.attributeDataType = value
}
/**
* @param value > We recommend that you use [WriteAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes) in the user pool client to control how attributes can be mutated for new use cases instead of using `DeveloperOnlyAttribute` .
* Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users will not be able to modify this attribute using their access token.
*/
@JvmName("dkgaitppqhbrygnl")
public suspend fun developerOnlyAttribute(`value`: Output) {
this.developerOnlyAttribute = value
}
/**
* @param value Specifies whether the value of the attribute can be changed.
* Any user pool attribute whose value you map from an IdP attribute must be mutable, with a parameter value of `true` . Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see [Specifying Identity Provider Attribute Mappings for Your User Pool](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html) .
*/
@JvmName("afamhngnlquwfapg")
public suspend fun mutable(`value`: Output) {
this.mutable = value
}
/**
* @param value The name of your user pool attribute. When you create or update a user pool, adding a schema attribute creates a custom or developer-only attribute. When you add an attribute with a `Name` value of `MyAttribute` , Amazon Cognito creates the custom attribute `custom:MyAttribute` . When `DeveloperOnlyAttribute` is `true` , Amazon Cognito creates your attribute as `dev:MyAttribute` . In an operation that describes a user pool, Amazon Cognito returns this value as `value` for standard attributes, `custom:value` for custom attributes, and `dev:value` for developer-only attributes..
*/
@JvmName("uqkstcnsikyywead")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Specifies the constraints for an attribute of the number type.
*/
@JvmName("kujfnfrbgyghwxpo")
public suspend fun numberAttributeConstraints(`value`: Output) {
this.numberAttributeConstraints = value
}
/**
* @param value Specifies whether a user pool attribute is required. If the attribute is required and the user doesn't provide a value, registration or sign-in will fail.
*/
@JvmName("pdeevbfagapdvhde")
public suspend fun required(`value`: Output) {
this.required = value
}
/**
* @param value Specifies the constraints for an attribute of the string type.
*/
@JvmName("pfqvavnjxtyjgvui")
public suspend fun stringAttributeConstraints(`value`: Output) {
this.stringAttributeConstraints = value
}
/**
* @param value The data format of the values for your attribute. When you choose an `AttributeDataType` , Amazon Cognito validates the input against the data type. A custom attribute value in your user's ID token is always a string, for example `"custom:isMember" : "true"` or `"custom:YearsAsMember" : "12"` .
*/
@JvmName("amvpggydccwvpmmb")
public suspend fun attributeDataType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.attributeDataType = mapped
}
/**
* @param value > We recommend that you use [WriteAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes) in the user pool client to control how attributes can be mutated for new use cases instead of using `DeveloperOnlyAttribute` .
* Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users will not be able to modify this attribute using their access token.
*/
@JvmName("uwnlifpxulnlgexn")
public suspend fun developerOnlyAttribute(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.developerOnlyAttribute = mapped
}
/**
* @param value Specifies whether the value of the attribute can be changed.
* Any user pool attribute whose value you map from an IdP attribute must be mutable, with a parameter value of `true` . Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see [Specifying Identity Provider Attribute Mappings for Your User Pool](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html) .
*/
@JvmName("eoqwdwysrfqprmhc")
public suspend fun mutable(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.mutable = mapped
}
/**
* @param value The name of your user pool attribute. When you create or update a user pool, adding a schema attribute creates a custom or developer-only attribute. When you add an attribute with a `Name` value of `MyAttribute` , Amazon Cognito creates the custom attribute `custom:MyAttribute` . When `DeveloperOnlyAttribute` is `true` , Amazon Cognito creates your attribute as `dev:MyAttribute` . In an operation that describes a user pool, Amazon Cognito returns this value as `value` for standard attributes, `custom:value` for custom attributes, and `dev:value` for developer-only attributes..
*/
@JvmName("jxbdxbqallsgyqap")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Specifies the constraints for an attribute of the number type.
*/
@JvmName("dqyotxhqjgbkerhl")
public suspend fun numberAttributeConstraints(`value`: UserPoolNumberAttributeConstraintsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.numberAttributeConstraints = mapped
}
/**
* @param argument Specifies the constraints for an attribute of the number type.
*/
@JvmName("ghsuvfemmhoitehc")
public suspend fun numberAttributeConstraints(argument: suspend UserPoolNumberAttributeConstraintsArgsBuilder.() -> Unit) {
val toBeMapped = UserPoolNumberAttributeConstraintsArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.numberAttributeConstraints = mapped
}
/**
* @param value Specifies whether a user pool attribute is required. If the attribute is required and the user doesn't provide a value, registration or sign-in will fail.
*/
@JvmName("xivohbhvnayklxxr")
public suspend fun required(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.required = mapped
}
/**
* @param value Specifies the constraints for an attribute of the string type.
*/
@JvmName("wvpulyanxxpvqtsd")
public suspend fun stringAttributeConstraints(`value`: UserPoolStringAttributeConstraintsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.stringAttributeConstraints = mapped
}
/**
* @param argument Specifies the constraints for an attribute of the string type.
*/
@JvmName("yosnxtyjtnprxsnc")
public suspend fun stringAttributeConstraints(argument: suspend UserPoolStringAttributeConstraintsArgsBuilder.() -> Unit) {
val toBeMapped = UserPoolStringAttributeConstraintsArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.stringAttributeConstraints = mapped
}
internal fun build(): UserPoolSchemaAttributeArgs = UserPoolSchemaAttributeArgs(
attributeDataType = attributeDataType,
developerOnlyAttribute = developerOnlyAttribute,
mutable = mutable,
name = name,
numberAttributeConstraints = numberAttributeConstraints,
required = required,
stringAttributeConstraints = stringAttributeConstraints,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy