Skip to content
v2.278.0

CfnUserPoolResourceServerProps Struct ​

Properties for defining a CfnUserPoolResourceServer.

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 cfnUserPoolResourceServerProps: cognito.CfnUserPoolResourceServerProps = {
  identifier: 'identifier',
  name: 'name',
  userPoolId: 'userPoolId',

  // the properties below are optional
  scopes: [{
    scopeDescription: 'scopeDescription',
    scopeName: 'scopeName',
  }],
};
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_resource_server_props = cognito.CfnUserPoolResourceServerProps(
    identifier="identifier",
    name="name",
    user_pool_id="userPoolId",

    # the properties below are optional
    scopes=[cognito.CfnUserPoolResourceServer.ResourceServerScopeTypeProperty(
        scope_description="scopeDescription",
        scope_name="scopeName"
    )]
)
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.*;

CfnUserPoolResourceServerProps cfnUserPoolResourceServerProps = CfnUserPoolResourceServerProps.builder()
        .identifier("identifier")
        .name("name")
        .userPoolId("userPoolId")

        // the properties below are optional
        .scopes(List.of(ResourceServerScopeTypeProperty.builder()
                .scopeDescription("scopeDescription")
                .scopeName("scopeName")
                .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 cfnUserPoolResourceServerProps = new CfnUserPoolResourceServerProps {
    Identifier = "identifier",
    Name = "name",
    UserPoolId = "userPoolId",

    // the properties below are optional
    Scopes = new [] { new ResourceServerScopeTypeProperty {
        ScopeDescription = "scopeDescription",
        ScopeName = "scopeName"
    } }
};
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"

cfnUserPoolResourceServerProps := &CfnUserPoolResourceServerProps{
	Identifier: jsii.String("identifier"),
	Name: jsii.String("name"),
	UserPoolId: jsii.String("userPoolId"),

	// the properties below are optional
	Scopes: []interface{}{
		&ResourceServerScopeTypeProperty{
			ScopeDescription: jsii.String("scopeDescription"),
			ScopeName: jsii.String("scopeName"),
		},
	},
}

Properties ​

identifierstringidentifierstridentifierStringIdentifierstringIdentifier*string required #
A unique resource server identifier for the resource server.
notes

The identifier can be an API friendly name like solar-system-data . You can also set an API URL like https://solar-system-data-api.example.com as your identifier.

Amazon Cognito represents scopes in the access token in the format $resource-server-identifier/$scope . Longer scope-identifier strings increase the size of your access tokens.

namestringnamestrnameStringNamestringName*string required #
A friendly name for the resource server.
scopesoptionalIResolvable | IResolvable | CfnUserPoolResourceServer.ResourceServerScopeTypeProperty[]scopesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ResourceServerScopeTypeProperty]]]scopesoptionalIResolvableScopesoptionalIResolvableScopesoptionalinterface{} #
A list of scopes.

Each scope is a map with keys ScopeName and ScopeDescription .

userPoolIdstring | IUserPoolRefuser_pool_idtyping.Union[str, IUserPoolRef]userPoolIdStringUserPoolIdstringUserPoolIdinterface{} required #
The ID of the user pool where you want to create a resource server.