Class UserPoolDomain
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cognito.UserPoolDomain
- All Implemented Interfaces:
IResource,IUserPoolDomain,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:35.414Z")
@Stability(Stable)
public class UserPoolDomain
extends Resource
implements IUserPoolDomain
Define a user pool domain.
Example:
UserPool userpool = UserPool.Builder.create(this, "UserPool").build();
UserPoolClient client = userpool.addClient("Client", UserPoolClientOptions.builder()
// ...
.oAuth(OAuthSettings.builder()
.flows(OAuthFlows.builder()
.implicitCodeGrant(true)
.build())
.callbackUrls(List.of("https://myapp.com/home", "https://myapp.com/users"))
.build())
.build());
UserPoolDomain domain = userpool.addDomain("Domain", UserPoolDomainOptions.builder().build());
String signInUrl = domain.signInUrl(client, SignInUrlOptions.builder()
.redirectUri("https://myapp.com/home")
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.cognito.IUserPoolDomain
IUserPoolDomain.Jsii$Default, IUserPoolDomain.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUserPoolDomain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedUserPoolDomain(software.amazon.jsii.JsiiObjectRef objRef) UserPoolDomain(software.constructs.Construct scope, String id, UserPoolDomainProps props) -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()The URL to the hosted UI associated with this domain.baseUrl(BaseUrlOptions options) The URL to the hosted UI associated with this domain.static IUserPoolDomainfromDomainName(software.constructs.Construct scope, String id, String userPoolDomainName) Import a UserPoolDomain given its domain name.Deprecated.The domain name of the CloudFront distribution associated with the user pool domain.The domain that was specified to be created.signInUrl(UserPoolClient client, SignInUrlOptions options) The URL to the sign in page in this domain using a specific UserPoolClient.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
UserPoolDomain
protected UserPoolDomain(software.amazon.jsii.JsiiObjectRef objRef) -
UserPoolDomain
protected UserPoolDomain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
UserPoolDomain
@Stability(Stable) public UserPoolDomain(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull UserPoolDomainProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromDomainName
@Stability(Stable) @NotNull public static IUserPoolDomain fromDomainName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String userPoolDomainName) Import a UserPoolDomain given its domain name.- Parameters:
scope- This parameter is required.id- This parameter is required.userPoolDomainName- This parameter is required.
-
baseUrl
The URL to the hosted UI associated with this domain.- Parameters:
options- options to customize baseUrl.
-
baseUrl
The URL to the hosted UI associated with this domain. -
signInUrl
@Stability(Stable) @NotNull public String signInUrl(@NotNull UserPoolClient client, @NotNull SignInUrlOptions options) The URL to the sign in page in this domain using a specific UserPoolClient.- Parameters:
client- [disable-awslint:ref-via-interface] the user pool client that the UI will use to interact with the UserPool. This parameter is required.options- options to customize signInUrl. This parameter is required.
-
getCloudFrontDomainName
Deprecated.usecloudFrontEndpointmethod instead.(deprecated) The domain name of the CloudFront distribution associated with the user pool domain.This method creates a custom resource internally to get the CloudFront domain name.
-
getCloudFrontEndpoint
The domain name of the CloudFront distribution associated with the user pool domain. -
getDomainName
The domain that was specified to be created.If
customDomainwas selected, this holds the full domain name that was specified. If thecognitoDomainwas used, it contains the prefix to the Cognito hosted domain.- Specified by:
getDomainNamein interfaceIUserPoolDomain
-
cloudFrontEndpointmethod instead.