@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
135 lines • 7.87 kB
JavaScript
;
// *** 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, { ...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?.accessTokenValidity;
resourceInputs["allowedOauthFlows"] = state?.allowedOauthFlows;
resourceInputs["allowedOauthFlowsUserPoolClient"] = state?.allowedOauthFlowsUserPoolClient;
resourceInputs["allowedOauthScopes"] = state?.allowedOauthScopes;
resourceInputs["analyticsConfiguration"] = state?.analyticsConfiguration;
resourceInputs["authSessionValidity"] = state?.authSessionValidity;
resourceInputs["callbackUrls"] = state?.callbackUrls;
resourceInputs["clientSecret"] = state?.clientSecret;
resourceInputs["defaultRedirectUri"] = state?.defaultRedirectUri;
resourceInputs["enablePropagateAdditionalUserContextData"] = state?.enablePropagateAdditionalUserContextData;
resourceInputs["enableTokenRevocation"] = state?.enableTokenRevocation;
resourceInputs["explicitAuthFlows"] = state?.explicitAuthFlows;
resourceInputs["idTokenValidity"] = state?.idTokenValidity;
resourceInputs["logoutUrls"] = state?.logoutUrls;
resourceInputs["name"] = state?.name;
resourceInputs["namePattern"] = state?.namePattern;
resourceInputs["namePrefix"] = state?.namePrefix;
resourceInputs["preventUserExistenceErrors"] = state?.preventUserExistenceErrors;
resourceInputs["readAttributes"] = state?.readAttributes;
resourceInputs["refreshTokenRotation"] = state?.refreshTokenRotation;
resourceInputs["refreshTokenValidity"] = state?.refreshTokenValidity;
resourceInputs["region"] = state?.region;
resourceInputs["supportedIdentityProviders"] = state?.supportedIdentityProviders;
resourceInputs["tokenValidityUnits"] = state?.tokenValidityUnits;
resourceInputs["userPoolId"] = state?.userPoolId;
resourceInputs["writeAttributes"] = state?.writeAttributes;
}
else {
const args = argsOrState;
if (args?.userPoolId === undefined && !opts.urn) {
throw new Error("Missing required property 'userPoolId'");
}
resourceInputs["accessTokenValidity"] = args?.accessTokenValidity;
resourceInputs["allowedOauthFlows"] = args?.allowedOauthFlows;
resourceInputs["allowedOauthFlowsUserPoolClient"] = args?.allowedOauthFlowsUserPoolClient;
resourceInputs["allowedOauthScopes"] = args?.allowedOauthScopes;
resourceInputs["analyticsConfiguration"] = args?.analyticsConfiguration;
resourceInputs["authSessionValidity"] = args?.authSessionValidity;
resourceInputs["callbackUrls"] = args?.callbackUrls;
resourceInputs["defaultRedirectUri"] = args?.defaultRedirectUri;
resourceInputs["enablePropagateAdditionalUserContextData"] = args?.enablePropagateAdditionalUserContextData;
resourceInputs["enableTokenRevocation"] = args?.enableTokenRevocation;
resourceInputs["explicitAuthFlows"] = args?.explicitAuthFlows;
resourceInputs["idTokenValidity"] = args?.idTokenValidity;
resourceInputs["logoutUrls"] = args?.logoutUrls;
resourceInputs["namePattern"] = args?.namePattern;
resourceInputs["namePrefix"] = args?.namePrefix;
resourceInputs["preventUserExistenceErrors"] = args?.preventUserExistenceErrors;
resourceInputs["readAttributes"] = args?.readAttributes;
resourceInputs["refreshTokenRotation"] = args?.refreshTokenRotation;
resourceInputs["refreshTokenValidity"] = args?.refreshTokenValidity;
resourceInputs["region"] = args?.region;
resourceInputs["supportedIdentityProviders"] = args?.supportedIdentityProviders;
resourceInputs["tokenValidityUnits"] = args?.tokenValidityUnits;
resourceInputs["userPoolId"] = args?.userPoolId;
resourceInputs["writeAttributes"] = args?.writeAttributes;
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