Skip to content
v2.278.0

StringAttributeConstraintsProperty Struct ​

The minimum and maximum length values of an attribute that is of the string type, for example custom:department .

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 stringAttributeConstraintsProperty: cognito.CfnUserPool.StringAttributeConstraintsProperty = {
  maxLength: 'maxLength',
  minLength: 'minLength',
};
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

string_attribute_constraints_property = cognito.CfnUserPool.StringAttributeConstraintsProperty(
    max_length="maxLength",
    min_length="minLength"
)
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.*;

StringAttributeConstraintsProperty stringAttributeConstraintsProperty = StringAttributeConstraintsProperty.builder()
        .maxLength("maxLength")
        .minLength("minLength")
        .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 stringAttributeConstraintsProperty = new StringAttributeConstraintsProperty {
    MaxLength = "maxLength",
    MinLength = "minLength"
};
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"

stringAttributeConstraintsProperty := &StringAttributeConstraintsProperty{
	MaxLength: jsii.String("maxLength"),
	MinLength: jsii.String("minLength"),
}

Properties ​

maxLengthoptionalstringmax_lengthoptionalstrmaxLengthoptionalStringMaxLengthoptionalstringMaxLengthoptional*string #
The maximum length of a string attribute value.

Must be a number less than or equal to 2^1023 , represented as a string with a length of 131072 characters or fewer.

minLengthoptionalstringmin_lengthoptionalstrminLengthoptionalStringMinLengthoptionalstringMinLengthoptional*string #
The minimum length of a string attribute value.