CustomAttributeConfig Struct
Configuration that will be fed into CloudFormation for any custom attribute type.
| Source | aws-cognito/lib/user-pool-attr.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';
const customAttributeConfig: cognito.CustomAttributeConfig = {
dataType: 'dataType',
// the properties below are optional
mutable: false,
numberConstraints: {
max: 123,
min: 123,
},
stringConstraints: {
maxLen: 123,
minLen: 123,
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cognito as cognito
custom_attribute_config = cognito.CustomAttributeConfig(
data_type="dataType",
# the properties below are optional
mutable=False,
number_constraints=cognito.NumberAttributeConstraints(
max=123,
min=123
),
string_constraints=cognito.StringAttributeConstraints(
max_len=123,
min_len=123
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cognito.*;
CustomAttributeConfig customAttributeConfig = CustomAttributeConfig.builder()
.dataType("dataType")
// the properties below are optional
.mutable(false)
.numberConstraints(NumberAttributeConstraints.builder()
.max(123)
.min(123)
.build())
.stringConstraints(StringAttributeConstraints.builder()
.maxLen(123)
.minLen(123)
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Cognito;
var customAttributeConfig = new CustomAttributeConfig {
DataType = "dataType",
// the properties below are optional
Mutable = false,
NumberConstraints = new NumberAttributeConstraints {
Max = 123,
Min = 123
},
StringConstraints = new StringAttributeConstraints {
MaxLen = 123,
MinLen = 123
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
customAttributeConfig := &CustomAttributeConfig{
DataType: jsii.String("dataType"),
// the properties below are optional
Mutable: jsii.Boolean(false),
NumberConstraints: &NumberAttributeConstraints{
Max: jsii.Number(123),
Min: jsii.Number(123),
},
StringConstraints: &StringAttributeConstraints{
MaxLen: jsii.Number(123),
MinLen: jsii.Number(123),
},
}
Properties
The data type of the custom attribute.
mutableoptionalbooleanmutableoptionalboolmutableoptionalBooleanMutableoptionalboolMutableoptional*bool = false #Specifies whether the value of the attribute can be changed.
notes
For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute.
numberConstraintsoptionalNumberAttributeConstraintsnumber_constraintsoptionalNumberAttributeConstraintsnumberConstraintsoptionalNumberAttributeConstraintsNumberConstraintsoptionalNumberAttributeConstraintsNumberConstraintsoptionalNumberAttributeConstraints = None. #The constraints for a custom attribute of the 'Number' data type.
stringConstraintsoptionalStringAttributeConstraintsstring_constraintsoptionalStringAttributeConstraintsstringConstraintsoptionalStringAttributeConstraintsStringConstraintsoptionalStringAttributeConstraintsStringConstraintsoptionalStringAttributeConstraints = None. #The constraints for a custom attribute of 'String' data type.