# PoliciesProperty

A list of user pool policies.

Contains the policy that sets password-complexity requirements.

- Source: Generated at build time
- Type last changed: v2.172.0 · 7 Dec 2024

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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" }
    }
};
```

Golang:

```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

- `passwordPolicy`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnUserPool.PasswordPolicyProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnUserPool.PasswordPolicyProperty.html) — The password policy settings for a user pool, including complexity, history, and length requirements.

- `signInPolicy`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnUserPool.SignInPolicyProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnUserPool.SignInPolicyProperty.html) — The policy for allowed types of authentication in a user pool.

  To activate this setting, your user pool must be in the [Essentials tier](https://docs.aws.amazon.com/cognito/latest/developerguide/feature-plans-features-essentials.html) or higher.
