# UserPoolResourceServerOptions

Options to create a UserPoolResourceServer.

- Source: [`aws-cognito/lib/user-pool-resource-server.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-cognito/lib/user-pool-resource-server.ts#L60)

## Example

```ts
const pool = new cognito.UserPool(this, 'Pool');

const readOnlyScope = new cognito.ResourceServerScope({ scopeName: 'read', scopeDescription: 'Read-only access' });
const fullAccessScope = new cognito.ResourceServerScope({ scopeName: '*', scopeDescription: 'Full access' });

const userServer = pool.addResourceServer('ResourceServer', {
  identifier: 'users',
  scopes: [ readOnlyScope, fullAccessScope ],
});

const readOnlyClient = pool.addClient('read-only-client', {
  // ...
  oAuth: {
    // ...
    scopes: [ cognito.OAuthScope.resourceServer(userServer, readOnlyScope) ],
  },
});

const fullAccessClient = pool.addClient('full-access-client', {
  // ...
  oAuth: {
    // ...
    scopes: [ cognito.OAuthScope.resourceServer(userServer, fullAccessScope) ],
  },
});
```

## Properties

- `identifier`: string (required) — A unique resource server identifier for the resource server.

- `scopes`: [ResourceServerScope](/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.ResourceServerScope.html)[] — Oauth scopes.

  **Default:** No scopes will be added

- `userPoolResourceServerName`: string — A friendly name for the resource server.

  **Default:** same as `identifier`
