# CfnUserPoolDomainProps

Properties for defining a `CfnUserPoolDomain`.

Used as props by: [CfnUserPoolDomain](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnUserPoolDomain.html)

- Source: Generated at build time
- Type last changed: v2.261.0 · 2 Jul 2026

## 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 cfnUserPoolDomainProps: cognito.CfnUserPoolDomainProps = {
  domain: 'domain',
  userPoolId: 'userPoolId',

  // the properties below are optional
  customDomainConfig: {
    certificateArn: 'certificateArn',
    securityPolicy: 'securityPolicy',
  },
  managedLoginVersion: 123,
  routing: {
    failover: {
      primaryRoute53HealthCheckId: 'primaryRoute53HealthCheckId',
      secondaryRegion: 'secondaryRegion',
    },
  },
};
```

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

cfn_user_pool_domain_props = cognito.CfnUserPoolDomainProps(
    domain="domain",
    user_pool_id="userPoolId",

    # the properties below are optional
    custom_domain_config=cognito.CfnUserPoolDomain.CustomDomainConfigTypeProperty(
        certificate_arn="certificateArn",
        security_policy="securityPolicy"
    ),
    managed_login_version=123,
    routing=cognito.CfnUserPoolDomain.RoutingTypeProperty(
        failover=cognito.CfnUserPoolDomain.FailoverTypeProperty(
            primary_route53_health_check_id="primaryRoute53HealthCheckId",
            secondary_region="secondaryRegion"
        )
    )
)
```

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.*;

CfnUserPoolDomainProps cfnUserPoolDomainProps = CfnUserPoolDomainProps.builder()
        .domain("domain")
        .userPoolId("userPoolId")

        // the properties below are optional
        .customDomainConfig(CustomDomainConfigTypeProperty.builder()
                .certificateArn("certificateArn")
                .securityPolicy("securityPolicy")
                .build())
        .managedLoginVersion(123)
        .routing(RoutingTypeProperty.builder()
                .failover(FailoverTypeProperty.builder()
                        .primaryRoute53HealthCheckId("primaryRoute53HealthCheckId")
                        .secondaryRegion("secondaryRegion")
                        .build())
                .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 cfnUserPoolDomainProps = new CfnUserPoolDomainProps {
    Domain = "domain",
    UserPoolId = "userPoolId",

    // the properties below are optional
    CustomDomainConfig = new CustomDomainConfigTypeProperty {
        CertificateArn = "certificateArn",
        SecurityPolicy = "securityPolicy"
    },
    ManagedLoginVersion = 123,
    Routing = new RoutingTypeProperty {
        Failover = new FailoverTypeProperty {
            PrimaryRoute53HealthCheckId = "primaryRoute53HealthCheckId",
            SecondaryRegion = "secondaryRegion"
        }
    }
};
```

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"

cfnUserPoolDomainProps := &CfnUserPoolDomainProps{
	Domain: jsii.String("domain"),
	UserPoolId: jsii.String("userPoolId"),

	// the properties below are optional
	CustomDomainConfig: &CustomDomainConfigTypeProperty{
		CertificateArn: jsii.String("certificateArn"),
		SecurityPolicy: jsii.String("securityPolicy"),
	},
	ManagedLoginVersion: jsii.Number(123),
	Routing: &RoutingTypeProperty{
		Failover: &FailoverTypeProperty{
			PrimaryRoute53HealthCheckId: jsii.String("primaryRoute53HealthCheckId"),
			SecondaryRegion: jsii.String("secondaryRegion"),
		},
	},
}
```

## Properties

- `customDomainConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnUserPoolDomain.CustomDomainConfigTypeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnUserPoolDomain.CustomDomainConfigTypeProperty.html) — The configuration for a custom domain that hosts the sign-up and sign-in pages for your application.

  Use this object to specify an SSL certificate that is managed by ACM.

  When you create a custom domain, the passkey RP ID defaults to the custom domain. If you had a prefix domain active, this will cause passkey integration for your prefix domain to stop working due to a mismatch in RP ID. To keep the prefix domain passkey integration working, you can explicitly set RP ID to the prefix domain.

- `domain`: string (required) — The name of the domain that you want to update.

  For custom domains, this is the fully-qualified domain name, for example `auth.example.com` . For prefix domains, this is the prefix alone, such as `myprefix` .

- `managedLoginVersion`: number — A version number that indicates the state of managed login for your domain.

  Version `1` is hosted UI (classic). Version `2` is the newer managed login with the branding editor. For more information, see [Managed login](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html) .

- `routing`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnUserPoolDomain.RoutingTypeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnUserPoolDomain.RoutingTypeProperty.html)

- `userPoolId`: string (required) — The ID of the user pool that is associated with the domain you're updating.
