UNPKG

@pulumi/aws

Version:

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

130 lines 5.65 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.UserPoolUICustomization = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Cognito User Pool UI Customization resource. * * > **Note:** To use this resource, the user pool must have a domain associated with it. For more information, see the Amazon Cognito Developer Guide on [Customizing the Built-in Sign-In and Sign-up Webpages](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-ui-customization.html). * * ## Example Usage * * ### UI customization settings for a single client * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * * const example = new aws.cognito.UserPool("example", {name: "example"}); * const exampleUserPoolDomain = new aws.cognito.UserPoolDomain("example", { * domain: "example", * userPoolId: example.id, * }); * const exampleUserPoolClient = new aws.cognito.UserPoolClient("example", { * name: "example", * userPoolId: example.id, * }); * const exampleUserPoolUICustomization = new aws.cognito.UserPoolUICustomization("example", { * clientId: exampleUserPoolClient.id, * css: ".label-customizable {font-weight: 400;}", * imageFile: std.filebase64({ * input: "logo.png", * }).then(invoke => invoke.result), * userPoolId: exampleUserPoolDomain.userPoolId, * }); * ``` * * ### UI customization settings for all clients * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * * const example = new aws.cognito.UserPool("example", {name: "example"}); * const exampleUserPoolDomain = new aws.cognito.UserPoolDomain("example", { * domain: "example", * userPoolId: example.id, * }); * const exampleUserPoolUICustomization = new aws.cognito.UserPoolUICustomization("example", { * css: ".label-customizable {font-weight: 400;}", * imageFile: std.filebase64({ * input: "logo.png", * }).then(invoke => invoke.result), * userPoolId: exampleUserPoolDomain.userPoolId, * }); * ``` * * ## Import * * Using `pulumi import`, import Cognito User Pool UI Customizations using the `user_pool_id` and `client_id` separated by `,`. For example: * * ```sh * $ pulumi import aws:cognito/userPoolUICustomization:UserPoolUICustomization example us-west-2_ZCTarbt5C,12bu4fuk3mlgqa2rtrujgp6egq * ``` */ class UserPoolUICustomization extends pulumi.CustomResource { /** * Get an existing UserPoolUICustomization 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 UserPoolUICustomization(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of UserPoolUICustomization. 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'] === UserPoolUICustomization.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["clientId"] = state?.clientId; resourceInputs["creationDate"] = state?.creationDate; resourceInputs["css"] = state?.css; resourceInputs["cssVersion"] = state?.cssVersion; resourceInputs["imageFile"] = state?.imageFile; resourceInputs["imageUrl"] = state?.imageUrl; resourceInputs["lastModifiedDate"] = state?.lastModifiedDate; resourceInputs["region"] = state?.region; resourceInputs["userPoolId"] = state?.userPoolId; } else { const args = argsOrState; if (args?.userPoolId === undefined && !opts.urn) { throw new Error("Missing required property 'userPoolId'"); } resourceInputs["clientId"] = args?.clientId; resourceInputs["css"] = args?.css; resourceInputs["imageFile"] = args?.imageFile; resourceInputs["region"] = args?.region; resourceInputs["userPoolId"] = args?.userPoolId; resourceInputs["creationDate"] = undefined /*out*/; resourceInputs["cssVersion"] = undefined /*out*/; resourceInputs["imageUrl"] = undefined /*out*/; resourceInputs["lastModifiedDate"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(UserPoolUICustomization.__pulumiType, name, resourceInputs, opts); } } exports.UserPoolUICustomization = UserPoolUICustomization; /** @internal */ UserPoolUICustomization.__pulumiType = 'aws:cognito/userPoolUICustomization:UserPoolUICustomization'; //# sourceMappingURL=userPoolUICustomization.js.map