UNPKG

@pulumi/aws

Version:

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

135 lines 8.84 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.ManagedUserPoolClient = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use the `aws.cognito.UserPoolClient` resource to manage a Cognito User Pool Client. * * **This resource is advanced** and has special caveats to consider before use. Please read this document completely before using the resource. * * Use the `aws.cognito.ManagedUserPoolClient` resource to manage a Cognito User Pool Client that is automatically created by an AWS service. For instance, when [configuring an OpenSearch Domain to use Cognito authentication](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html), the OpenSearch service creates the User Pool Client during setup and removes it when it is no longer required. As a result, the `aws.cognito.ManagedUserPoolClient` resource does not create or delete this resource, but instead assumes management of it. * * Use the `aws.cognito.UserPoolClient` resource to manage Cognito User Pool Clients for normal use cases. * * ## Example Usage * * ### Using Name Pattern * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cognito.ManagedUserPoolClient("example", { * namePattern: "^AmazonOpenSearchService-example-(\\w+)$", * userPoolId: exampleAwsCognitoUserPool.id, * }); * ``` * * ## Import * * Using `pulumi import`, import Cognito User Pool Clients using the `id` of the Cognito User Pool and the `id` of the Cognito User Pool Client. For example: * * ```sh * $ pulumi import aws:cognito/managedUserPoolClient:ManagedUserPoolClient client us-west-2_abc123/3ho4ek12345678909nh3fmhpko * ``` */ class ManagedUserPoolClient extends pulumi.CustomResource { /** * Get an existing ManagedUserPoolClient 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 ManagedUserPoolClient(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ManagedUserPoolClient. 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'] === ManagedUserPoolClient.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessTokenValidity"] = state ? state.accessTokenValidity : undefined; resourceInputs["allowedOauthFlows"] = state ? state.allowedOauthFlows : undefined; resourceInputs["allowedOauthFlowsUserPoolClient"] = state ? state.allowedOauthFlowsUserPoolClient : undefined; resourceInputs["allowedOauthScopes"] = state ? state.allowedOauthScopes : undefined; resourceInputs["analyticsConfiguration"] = state ? state.analyticsConfiguration : undefined; resourceInputs["authSessionValidity"] = state ? state.authSessionValidity : undefined; resourceInputs["callbackUrls"] = state ? state.callbackUrls : undefined; resourceInputs["clientSecret"] = state ? state.clientSecret : undefined; resourceInputs["defaultRedirectUri"] = state ? state.defaultRedirectUri : undefined; resourceInputs["enablePropagateAdditionalUserContextData"] = state ? state.enablePropagateAdditionalUserContextData : undefined; resourceInputs["enableTokenRevocation"] = state ? state.enableTokenRevocation : undefined; resourceInputs["explicitAuthFlows"] = state ? state.explicitAuthFlows : undefined; resourceInputs["idTokenValidity"] = state ? state.idTokenValidity : undefined; resourceInputs["logoutUrls"] = state ? state.logoutUrls : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["namePattern"] = state ? state.namePattern : undefined; resourceInputs["namePrefix"] = state ? state.namePrefix : undefined; resourceInputs["preventUserExistenceErrors"] = state ? state.preventUserExistenceErrors : undefined; resourceInputs["readAttributes"] = state ? state.readAttributes : undefined; resourceInputs["refreshTokenRotation"] = state ? state.refreshTokenRotation : undefined; resourceInputs["refreshTokenValidity"] = state ? state.refreshTokenValidity : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["supportedIdentityProviders"] = state ? state.supportedIdentityProviders : undefined; resourceInputs["tokenValidityUnits"] = state ? state.tokenValidityUnits : undefined; resourceInputs["userPoolId"] = state ? state.userPoolId : undefined; resourceInputs["writeAttributes"] = state ? state.writeAttributes : undefined; } else { const args = argsOrState; if ((!args || args.userPoolId === undefined) && !opts.urn) { throw new Error("Missing required property 'userPoolId'"); } resourceInputs["accessTokenValidity"] = args ? args.accessTokenValidity : undefined; resourceInputs["allowedOauthFlows"] = args ? args.allowedOauthFlows : undefined; resourceInputs["allowedOauthFlowsUserPoolClient"] = args ? args.allowedOauthFlowsUserPoolClient : undefined; resourceInputs["allowedOauthScopes"] = args ? args.allowedOauthScopes : undefined; resourceInputs["analyticsConfiguration"] = args ? args.analyticsConfiguration : undefined; resourceInputs["authSessionValidity"] = args ? args.authSessionValidity : undefined; resourceInputs["callbackUrls"] = args ? args.callbackUrls : undefined; resourceInputs["defaultRedirectUri"] = args ? args.defaultRedirectUri : undefined; resourceInputs["enablePropagateAdditionalUserContextData"] = args ? args.enablePropagateAdditionalUserContextData : undefined; resourceInputs["enableTokenRevocation"] = args ? args.enableTokenRevocation : undefined; resourceInputs["explicitAuthFlows"] = args ? args.explicitAuthFlows : undefined; resourceInputs["idTokenValidity"] = args ? args.idTokenValidity : undefined; resourceInputs["logoutUrls"] = args ? args.logoutUrls : undefined; resourceInputs["namePattern"] = args ? args.namePattern : undefined; resourceInputs["namePrefix"] = args ? args.namePrefix : undefined; resourceInputs["preventUserExistenceErrors"] = args ? args.preventUserExistenceErrors : undefined; resourceInputs["readAttributes"] = args ? args.readAttributes : undefined; resourceInputs["refreshTokenRotation"] = args ? args.refreshTokenRotation : undefined; resourceInputs["refreshTokenValidity"] = args ? args.refreshTokenValidity : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["supportedIdentityProviders"] = args ? args.supportedIdentityProviders : undefined; resourceInputs["tokenValidityUnits"] = args ? args.tokenValidityUnits : undefined; resourceInputs["userPoolId"] = args ? args.userPoolId : undefined; resourceInputs["writeAttributes"] = args ? args.writeAttributes : undefined; resourceInputs["clientSecret"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["clientSecret"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(ManagedUserPoolClient.__pulumiType, name, resourceInputs, opts); } } exports.ManagedUserPoolClient = ManagedUserPoolClient; /** @internal */ ManagedUserPoolClient.__pulumiType = 'aws:cognito/managedUserPoolClient:ManagedUserPoolClient'; //# sourceMappingURL=managedUserPoolClient.js.map