UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

110 lines 4.43 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ResourceServer = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Cognito Resource Server. * * ## Example Usage * * ### Create a basic resource server * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const pool = new aws.cognito.UserPool("pool", {name: "pool"}); * const resource = new aws.cognito.ResourceServer("resource", { * identifier: "https://example.com", * name: "example", * userPoolId: pool.id, * }); * ``` * * ### Create a resource server with sample-scope * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const pool = new aws.cognito.UserPool("pool", {name: "pool"}); * const resource = new aws.cognito.ResourceServer("resource", { * identifier: "https://example.com", * name: "example", * scopes: [{ * scopeName: "sample-scope", * scopeDescription: "a Sample Scope Description", * }], * userPoolId: pool.id, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_cognito_resource_server` using their User Pool ID and Identifier. For example: * * ```sh * $ pulumi import aws:cognito/resourceServer:ResourceServer example "us-west-2_abc123|https://example.com" * ``` */ class ResourceServer extends pulumi.CustomResource { /** * Get an existing ResourceServer resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new ResourceServer(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ResourceServer. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ResourceServer.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["identifier"] = state ? state.identifier : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["scopeIdentifiers"] = state ? state.scopeIdentifiers : undefined; resourceInputs["scopes"] = state ? state.scopes : undefined; resourceInputs["userPoolId"] = state ? state.userPoolId : undefined; } else { const args = argsOrState; if ((!args || args.identifier === undefined) && !opts.urn) { throw new Error("Missing required property 'identifier'"); } if ((!args || args.userPoolId === undefined) && !opts.urn) { throw new Error("Missing required property 'userPoolId'"); } resourceInputs["identifier"] = args ? args.identifier : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["scopes"] = args ? args.scopes : undefined; resourceInputs["userPoolId"] = args ? args.userPoolId : undefined; resourceInputs["scopeIdentifiers"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ResourceServer.__pulumiType, name, resourceInputs, opts); } } exports.ResourceServer = ResourceServer; /** @internal */ ResourceServer.__pulumiType = 'aws:cognito/resourceServer:ResourceServer'; //# sourceMappingURL=resourceServer.js.map