# CfnUserPoolResourceServerProps

Properties for defining a `CfnUserPoolResourceServer`.

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

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

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

  // the properties below are optional
  scopes: [{
    scopeDescription: 'scopeDescription',
    scopeName: 'scopeName',
  }],
};
```

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

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:

```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();
```

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;

var cfnUserPoolResourceServerProps = new CfnUserPoolResourceServerProps {
    Identifier = "identifier",
    Name = "name",
    UserPoolId = "userPoolId",

    // the properties below are optional
    Scopes = new [] { new ResourceServerScopeTypeProperty {
        ScopeDescription = "scopeDescription",
        ScopeName = "scopeName"
    } }
};
```

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"

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

- `identifier`: string (required) — 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.

- `name`: string (required) — A friendly name for the resource server.

- `scopes`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnUserPoolResourceServer.ResourceServerScopeTypeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnUserPoolResourceServer.ResourceServerScopeTypeProperty.html)[] — A list of scopes.

  Each scope is a map with keys `ScopeName` and `ScopeDescription` .

- `userPoolId`: string | [IUserPoolRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cognito.IUserPoolRef.html) (required) — The ID of the user pool where you want to create a resource server.
