Class UserPoolResourceServer
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cognito.UserPoolResourceServer
- All Implemented Interfaces:
IEnvironmentAware,IResource,IUserPoolResourceServer,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:01.628Z")
@Stability(Stable)
public class UserPoolResourceServer
extends Resource
implements IUserPoolResourceServer
Defines a User Pool OAuth2.0 Resource Server.
Example:
UserPool pool = new UserPool(this, "Pool");
ResourceServerScope readOnlyScope = ResourceServerScope.Builder.create().scopeName("read").scopeDescription("Read-only access").build();
ResourceServerScope fullAccessScope = ResourceServerScope.Builder.create().scopeName("*").scopeDescription("Full access").build();
UserPoolResourceServer userServer = pool.addResourceServer("ResourceServer", UserPoolResourceServerOptions.builder()
.identifier("users")
.scopes(List.of(readOnlyScope, fullAccessScope))
.build());
UserPoolClient readOnlyClient = pool.addClient("read-only-client", UserPoolClientOptions.builder()
// ...
.oAuth(OAuthSettings.builder()
// ...
.scopes(List.of(OAuthScope.resourceServer(userServer, readOnlyScope)))
.build())
.build());
UserPoolClient fullAccessClient = pool.addClient("full-access-client", UserPoolClientOptions.builder()
// ...
.oAuth(OAuthSettings.builder()
// ...
.scopes(List.of(OAuthScope.resourceServer(userServer, fullAccessScope)))
.build())
.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.IUserPoolResourceServer
IUserPoolResourceServer.Jsii$Default, IUserPoolResourceServer.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUserPoolResourceServer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedUserPoolResourceServer(software.amazon.jsii.JsiiObjectRef objRef) UserPoolResourceServer(software.constructs.Construct scope, String id, UserPoolResourceServerProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IUserPoolResourceServerfromUserPoolResourceServerId(software.constructs.Construct scope, String id, String userPoolResourceServerId) Import a user pool resource client given its id.Resource server id.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.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
UserPoolResourceServer
protected UserPoolResourceServer(software.amazon.jsii.JsiiObjectRef objRef) -
UserPoolResourceServer
protected UserPoolResourceServer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
UserPoolResourceServer
@Stability(Stable) public UserPoolResourceServer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull UserPoolResourceServerProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromUserPoolResourceServerId
@Stability(Stable) @NotNull public static IUserPoolResourceServer fromUserPoolResourceServerId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String userPoolResourceServerId) Import a user pool resource client given its id.- Parameters:
scope- This parameter is required.id- This parameter is required.userPoolResourceServerId- This parameter is required.
-
getUserPoolResourceServerId
Resource server id.- Specified by:
getUserPoolResourceServerIdin interfaceIUserPoolResourceServer
-