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
new ResourceServer(name: string, args: ResourceServerArgs, opts?: CustomResourceOptions);def ResourceServer(resource_name, opts=None, identifier=None, name=None, scopes=None, user_pool_id=None, __props__=None);func NewResourceServer(ctx *Context, name string, args ResourceServerArgs, opts ...ResourceOption) (*ResourceServer, error)public ResourceServer(string name, ResourceServerArgs args, CustomResourceOptions? opts = null)- 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.
- User
Pool stringId - Name string
A name for the resource server.
- Scopes
List<Resource
Server Scope Args> A list of Authorization Scope.
- Identifier string
An identifier for the resource server.
- User
Pool stringId - Name string
A name for the resource server.
- Scopes
[]Resource
Server Scope A list of Authorization Scope.
- identifier string
An identifier for the resource server.
- user
Pool stringId - name string
A name for the resource server.
- scopes
Resource
Server Scope[] A list of Authorization Scope.
- identifier str
An identifier for the resource server.
- user_
pool_ strid - name str
A name for the resource server.
- scopes
List[Resource
Server Scope] 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.
- Scope
Identifiers 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.
- Scope
Identifiers []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.
- scope
Identifiers 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): ResourceServerstatic 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.
- Scope
Identifiers List<string> A list of all scopes configured for this resource server in the format identifier/scope_name.
- Scopes
List<Resource
Server Scope Args> A list of Authorization Scope.
- User
Pool stringId
- Identifier string
An identifier for the resource server.
- Name string
A name for the resource server.
- Scope
Identifiers []string A list of all scopes configured for this resource server in the format identifier/scope_name.
- Scopes
[]Resource
Server Scope A list of Authorization Scope.
- User
Pool stringId
- identifier string
An identifier for the resource server.
- name string
A name for the resource server.
- scope
Identifiers string[] A list of all scopes configured for this resource server in the format identifier/scope_name.
- scopes
Resource
Server Scope[] A list of Authorization Scope.
- user
Pool stringId
- 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[Resource
Server Scope] A list of Authorization Scope.
- user_
pool_ strid
Supporting Types
ResourceServerScope
- Scope
Description string The scope description.
- Scope
Name string The scope name.
- Scope
Description string The scope description.
- Scope
Name string The scope name.
- scope
Description string The scope description.
- scope
Name string The scope name.
- scope
Description str The scope description.
- scope
Name 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
awsTerraform Provider.