AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Cognito::UserPoolResourceServer

CfnUserPoolResourceServer

The `AWS::Cognito::UserPoolResourceServer` resource creates a new OAuth2.0 resource server and defines custom scopes in it. > If you don't specify a value for a parameter, Amazon Cognito sets it to a default value.

Import

import { CfnUserPoolResourceServer } from 'aws-cdk-lib/aws-cognito';

Or use the module namespace:

import * as cognito from 'aws-cdk-lib/aws-cognito';
// cognito.CfnUserPoolResourceServer

Properties

Configuration passed to the constructor as CfnUserPoolResourceServerProps.

identifierRequired
string

A unique resource server identifier for the resource server. 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.

nameRequired
string

A friendly name for the resource server.

userPoolIdRequired
string | IUserPoolRef

The ID of the user pool where you want to create a resource server.

scopesOptional
IResolvable | IResolvable | ResourceServerScopeTypeProperty[]

A list of scopes. Each scope is a map with keys `ScopeName` and `ScopeDescription` .

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon Cognito Cheat Sheet

Everything you need to know about Amazon Cognito on one page. HD quality, print-friendly.

Download Free Infographic