# UserPoolResourceServerProps

Properties for the UserPoolResourceServer construct.

Extends: [UserPoolResourceServerOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolResourceServerOptions.html)
Used as props by: [UserPoolResourceServer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolResourceServer.html)

- Source: [`aws-cognito/lib/user-pool-resource-server.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cognito/lib/user-pool-resource-server.ts#L82)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

TypeScript:

```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';
import { aws_cognito as interfaces_cognito } from 'aws-cdk-lib/interfaces';

declare const resourceServerScope: cognito.ResourceServerScope;
declare const userPoolRef: interfaces_cognito.IUserPoolRef;
const userPoolResourceServerProps: cognito.UserPoolResourceServerProps = {
  identifier: 'identifier',
  userPool: userPoolRef,

  // the properties below are optional
  scopes: [resourceServerScope],
  userPoolResourceServerName: 'userPoolResourceServerName',
};
```

Python:

```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
from aws_cdk.interfaces import aws_cognito as interfaces_cognito

# resource_server_scope: cognito.ResourceServerScope
# user_pool_ref: interfaces_cognito.IUserPoolRef

user_pool_resource_server_props = cognito.UserPoolResourceServerProps(
    identifier="identifier",
    user_pool=user_pool_ref,

    # the properties below are optional
    scopes=[resource_server_scope],
    user_pool_resource_server_name="userPoolResourceServerName"
)
```

Java:

```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.*;
import software.amazon.awscdk.interfaces.cognito.*;

ResourceServerScope resourceServerScope;
IUserPoolRef userPoolRef;

UserPoolResourceServerProps userPoolResourceServerProps = UserPoolResourceServerProps.builder()
        .identifier("identifier")
        .userPool(userPoolRef)

        // the properties below are optional
        .scopes(List.of(resourceServerScope))
        .userPoolResourceServerName("userPoolResourceServerName")
        .build();
```

C# / .NET:

```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;
using Amazon.CDK.Interfaces.Cognito;

ResourceServerScope resourceServerScope;
IUserPoolRef userPoolRef;

var userPoolResourceServerProps = new UserPoolResourceServerProps {
    Identifier = "identifier",
    UserPool = userPoolRef,

    // the properties below are optional
    Scopes = new [] { resourceServerScope },
    UserPoolResourceServerName = "userPoolResourceServerName"
};
```

Golang:

```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"
import "github.com/aws/aws-cdk-go/awscdk"

var resourceServerScope ResourceServerScope
var userPoolRef IUserPoolRef

userPoolResourceServerProps := &UserPoolResourceServerProps{
	Identifier: jsii.String("identifier"),
	UserPool: userPoolRef,

	// the properties below are optional
	Scopes: []ResourceServerScope{
		resourceServerScope,
	},
	UserPoolResourceServerName: jsii.String("userPoolResourceServerName"),
}
```

## Properties

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

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

  **Default:** No scopes will be added

- `userPool`: [IUserPoolRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cognito.IUserPoolRef.html) (required) — The user pool to add this resource server to.

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

  **Default:** same as `identifier`
