Skip to content
v2.278.0

CfnUserPoolDomainProps Struct ​

Properties for defining a CfnUserPoolDomain.

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 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
# 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
// 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();
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"
        }
    }
};
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 ​

customDomainConfigoptionalIResolvable | CfnUserPoolDomain.CustomDomainConfigTypePropertycustom_domain_configoptionaltyping.Union[IResolvable, CustomDomainConfigTypeProperty]customDomainConfigoptionalIResolvableCustomDomainConfigoptionalIResolvableCustomDomainConfigoptionalinterface{} #
The configuration for a custom domain that hosts the sign-up and sign-in pages for your application.
notes

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.

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

managedLoginVersionoptionalnumbermanaged_login_versionoptionalint | floatmanagedLoginVersionoptionalNumberManagedLoginVersionoptionaldoubleManagedLoginVersionoptional*float64 #
A version number that indicates the state of managed login for your domain.
notes

Version 1 is hosted UI (classic). Version 2 is the newer managed login with the branding editor. For more information, see Managed login .

routingoptionalIResolvable | CfnUserPoolDomain.RoutingTypePropertyroutingoptionaltyping.Union[IResolvable, RoutingTypeProperty]routingoptionalIResolvableRoutingoptionalIResolvableRoutingoptionalinterface{} #
userPoolIdstringuser_pool_idstruserPoolIdStringUserPoolIdstringUserPoolId*string required #
The ID of the user pool that is associated with the domain you're updating.