Skip to content
v2.277.0

PoliciesProperty Struct ​

A list of user pool policies.

Contains the policy that sets password-complexity requirements.

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 policiesProperty: cognito.CfnUserPool.PoliciesProperty = {
  passwordPolicy: {
    minimumLength: 123,
    passwordHistorySize: 123,
    requireLowercase: false,
    requireNumbers: false,
    requireSymbols: false,
    requireUppercase: false,
    temporaryPasswordValidityDays: 123,
  },
  signInPolicy: {
    allowedFirstAuthFactors: ['allowedFirstAuthFactors'],
  },
};
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

policies_property = cognito.CfnUserPool.PoliciesProperty(
    password_policy=cognito.CfnUserPool.PasswordPolicyProperty(
        minimum_length=123,
        password_history_size=123,
        require_lowercase=False,
        require_numbers=False,
        require_symbols=False,
        require_uppercase=False,
        temporary_password_validity_days=123
    ),
    sign_in_policy=cognito.CfnUserPool.SignInPolicyProperty(
        allowed_first_auth_factors=["allowedFirstAuthFactors"]
    )
)
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.*;

PoliciesProperty policiesProperty = PoliciesProperty.builder()
        .passwordPolicy(PasswordPolicyProperty.builder()
                .minimumLength(123)
                .passwordHistorySize(123)
                .requireLowercase(false)
                .requireNumbers(false)
                .requireSymbols(false)
                .requireUppercase(false)
                .temporaryPasswordValidityDays(123)
                .build())
        .signInPolicy(SignInPolicyProperty.builder()
                .allowedFirstAuthFactors(List.of("allowedFirstAuthFactors"))
                .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 policiesProperty = new PoliciesProperty {
    PasswordPolicy = new PasswordPolicyProperty {
        MinimumLength = 123,
        PasswordHistorySize = 123,
        RequireLowercase = false,
        RequireNumbers = false,
        RequireSymbols = false,
        RequireUppercase = false,
        TemporaryPasswordValidityDays = 123
    },
    SignInPolicy = new SignInPolicyProperty {
        AllowedFirstAuthFactors = new [] { "allowedFirstAuthFactors" }
    }
};
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"

policiesProperty := &PoliciesProperty{
	PasswordPolicy: &PasswordPolicyProperty{
		MinimumLength: jsii.Number(123),
		PasswordHistorySize: jsii.Number(123),
		RequireLowercase: jsii.Boolean(false),
		RequireNumbers: jsii.Boolean(false),
		RequireSymbols: jsii.Boolean(false),
		RequireUppercase: jsii.Boolean(false),
		TemporaryPasswordValidityDays: jsii.Number(123),
	},
	SignInPolicy: &SignInPolicyProperty{
		AllowedFirstAuthFactors: []*string{
			jsii.String("allowedFirstAuthFactors"),
		},
	},
}

Properties ​

passwordPolicyoptionalIResolvable | CfnUserPool.PasswordPolicyPropertypassword_policyoptionaltyping.Union[IResolvable, PasswordPolicyProperty]passwordPolicyoptionalIResolvablePasswordPolicyoptionalIResolvablePasswordPolicyoptionalinterface{}#
The password policy settings for a user pool, including complexity, history, and length requirements.
signInPolicyoptionalIResolvable | CfnUserPool.SignInPolicyPropertysign_in_policyoptionaltyping.Union[IResolvable, SignInPolicyProperty]signInPolicyoptionalIResolvableSignInPolicyoptionalIResolvableSignInPolicyoptionalinterface{}#
The policy for allowed types of authentication in a user pool.

To activate this setting, your user pool must be in the Essentials tier or higher.