CognitoIdentityProvider / Client / update_resource_server

update_resource_server#

CognitoIdentityProvider.Client.update_resource_server(**kwargs)#

Updates the name and scopes of resource server. All other fields are read-only.

Warning

If you don’t provide a value for an attribute, it is set to the default value.

Note

Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

Learn more

See also: AWS API Documentation

Request Syntax

response = client.update_resource_server(
    UserPoolId='string',
    Identifier='string',
    Name='string',
    Scopes=[
        {
            'ScopeName': 'string',
            'ScopeDescription': 'string'
        },
    ]
)
Parameters:
  • UserPoolId (string) –

    [REQUIRED]

    The user pool ID for the user pool.

  • 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]

    The name of the resource server.

  • Scopes (list) –

    The scope values to be set for the resource server.

    • (dict) –

      A resource server scope.

      • ScopeName (string) – [REQUIRED]

        The name of the scope.

      • ScopeDescription (string) – [REQUIRED]

        A description of the scope.

Return type:

dict

Returns:

Response Syntax

{
    'ResourceServer': {
        'UserPoolId': 'string',
        'Identifier': 'string',
        'Name': 'string',
        'Scopes': [
            {
                'ScopeName': 'string',
                'ScopeDescription': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • ResourceServer (dict) –

      The resource server.

      • UserPoolId (string) –

        The user pool ID for the user pool that hosts the resource server.

      • Identifier (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.

      • Name (string) –

        The name of the resource server.

      • Scopes (list) –

        A list of scopes that are defined for the resource server.

        • (dict) –

          A resource server scope.

          • ScopeName (string) –

            The name of the scope.

          • ScopeDescription (string) –

            A description of the scope.

Exceptions