ResourceServer

Provides a Cognito Resource Server.

Example Usage

Create a basic resource server

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var pool = new Aws.Cognito.UserPool("pool", new Aws.Cognito.UserPoolArgs
        {
        });
        var resource = new Aws.Cognito.ResourceServer("resource", new Aws.Cognito.ResourceServerArgs
        {
            Identifier = "https://example.com",
            UserPoolId = pool.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/cognito"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        pool, err := cognito.NewUserPool(ctx, "pool", nil)
        if err != nil {
            return err
        }
        _, err = cognito.NewResourceServer(ctx, "resource", &cognito.ResourceServerArgs{
            Identifier: pulumi.String("https://example.com"),
            UserPoolId: pool.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

pool = aws.cognito.UserPool("pool")
resource = aws.cognito.ResourceServer("resource",
    identifier="https://example.com",
    user_pool_id=pool.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const pool = new aws.cognito.UserPool("pool", {});
const resource = new aws.cognito.ResourceServer("resource", {
    identifier: "https://example.com",
    userPoolId: pool.id,
});

Create a resource server with sample-scope

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var pool = new Aws.Cognito.UserPool("pool", new Aws.Cognito.UserPoolArgs
        {
        });
        var resource = new Aws.Cognito.ResourceServer("resource", new Aws.Cognito.ResourceServerArgs
        {
            Identifier = "https://example.com",
            Scopes = 
            {
                new Aws.Cognito.Inputs.ResourceServerScopeArgs
                {
                    ScopeDescription = "a Sample Scope Description",
                    ScopeName = "sample-scope",
                },
            },
            UserPoolId = pool.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/cognito"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        pool, err := cognito.NewUserPool(ctx, "pool", nil)
        if err != nil {
            return err
        }
        _, err = cognito.NewResourceServer(ctx, "resource", &cognito.ResourceServerArgs{
            Identifier: pulumi.String("https://example.com"),
            Scopes: cognito.ResourceServerScopeArray{
                &cognito.ResourceServerScopeArgs{
                    ScopeDescription: pulumi.String("a Sample Scope Description"),
                    ScopeName:        pulumi.String("sample-scope"),
                },
            },
            UserPoolId: pool.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

pool = aws.cognito.UserPool("pool")
resource = aws.cognito.ResourceServer("resource",
    identifier="https://example.com",
    scopes=[{
        "scopeDescription": "a Sample Scope Description",
        "scopeName": "sample-scope",
    }],
    user_pool_id=pool.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const pool = new aws.cognito.UserPool("pool", {});
const resource = new aws.cognito.ResourceServer("resource", {
    identifier: "https://example.com",
    scopes: [{
        scopeDescription: "a Sample Scope Description",
        scopeName: "sample-scope",
    }],
    userPoolId: pool.id,
});

Create a ResourceServer Resource

def ResourceServer(resource_name, opts=None, identifier=None, name=None, scopes=None, user_pool_id=None, __props__=None);
name string
The unique name of the resource.
args ResourceServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ResourceServerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ResourceServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ResourceServer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ResourceServer resource accepts the following input properties:

Identifier string

An identifier for the resource server.

UserPoolId string
Name string

A name for the resource server.

Scopes List<ResourceServerScopeArgs>

A list of Authorization Scope.

Identifier string

An identifier for the resource server.

UserPoolId string
Name string

A name for the resource server.

Scopes []ResourceServerScope

A list of Authorization Scope.

identifier string

An identifier for the resource server.

userPoolId string
name string

A name for the resource server.

scopes ResourceServerScope[]

A list of Authorization Scope.

identifier str

An identifier for the resource server.

user_pool_id str
name str

A name for the resource server.

scopes List[ResourceServerScope]

A list of Authorization Scope.

Outputs

All input properties are implicitly available as output properties. Additionally, the ResourceServer resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
ScopeIdentifiers List<string>

A list of all scopes configured for this resource server in the format identifier/scope_name.

Id string
The provider-assigned unique ID for this managed resource.
ScopeIdentifiers []string

A list of all scopes configured for this resource server in the format identifier/scope_name.

id string
The provider-assigned unique ID for this managed resource.
scopeIdentifiers string[]

A list of all scopes configured for this resource server in the format identifier/scope_name.

id str
The provider-assigned unique ID for this managed resource.
scope_identifiers List[str]

A list of all scopes configured for this resource server in the format identifier/scope_name.

Look up an Existing ResourceServer Resource

Get an existing ResourceServer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ResourceServerState, opts?: CustomResourceOptions): ResourceServer
static get(resource_name, id, opts=None, identifier=None, name=None, scope_identifiers=None, scopes=None, user_pool_id=None, __props__=None);
func GetResourceServer(ctx *Context, name string, id IDInput, state *ResourceServerState, opts ...ResourceOption) (*ResourceServer, error)
public static ResourceServer Get(string name, Input<string> id, ResourceServerState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Identifier string

An identifier for the resource server.

Name string

A name for the resource server.

ScopeIdentifiers List<string>

A list of all scopes configured for this resource server in the format identifier/scope_name.

Scopes List<ResourceServerScopeArgs>

A list of Authorization Scope.

UserPoolId string
Identifier string

An identifier for the resource server.

Name string

A name for the resource server.

ScopeIdentifiers []string

A list of all scopes configured for this resource server in the format identifier/scope_name.

Scopes []ResourceServerScope

A list of Authorization Scope.

UserPoolId string
identifier string

An identifier for the resource server.

name string

A name for the resource server.

scopeIdentifiers string[]

A list of all scopes configured for this resource server in the format identifier/scope_name.

scopes ResourceServerScope[]

A list of Authorization Scope.

userPoolId string
identifier str

An identifier for the resource server.

name str

A name for the resource server.

scope_identifiers List[str]

A list of all scopes configured for this resource server in the format identifier/scope_name.

scopes List[ResourceServerScope]

A list of Authorization Scope.

user_pool_id str

Supporting Types

ResourceServerScope

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ScopeDescription string

The scope description.

ScopeName string

The scope name.

ScopeDescription string

The scope description.

ScopeName string

The scope name.

scopeDescription string

The scope description.

scopeName string

The scope name.

scopeDescription str

The scope description.

scopeName str

The scope name.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.