UNPKG

@pulumi/aws

Version:

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

128 lines 5.45 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.User = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * This resource manages a User resource within an Identity Store. * * > **Note:** If you use an external identity provider or Active Directory as your identity source, * use this resource with caution. IAM Identity Center does not support outbound synchronization, * so your identity source does not automatically update with the changes that you make to * users using this resource. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.identitystore.User("example", { * identityStoreId: exampleAwsSsoadminInstances.identityStoreIds[0], * displayName: "John Doe", * userName: "johndoe", * name: { * givenName: "John", * familyName: "Doe", * }, * emails: { * value: "john@example.com", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import an Identity Store User using the combination `identity_store_id/user_id`. For example: * * ```sh * $ pulumi import aws:identitystore/user:User example d-9c6705e95c/065212b4-9061-703b-5876-13a517ae2a7c * ``` */ class User extends pulumi.CustomResource { /** * Get an existing User 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 User(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of User. 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'] === User.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["addresses"] = state?.addresses; resourceInputs["displayName"] = state?.displayName; resourceInputs["emails"] = state?.emails; resourceInputs["externalIds"] = state?.externalIds; resourceInputs["identityStoreId"] = state?.identityStoreId; resourceInputs["locale"] = state?.locale; resourceInputs["name"] = state?.name; resourceInputs["nickname"] = state?.nickname; resourceInputs["phoneNumbers"] = state?.phoneNumbers; resourceInputs["preferredLanguage"] = state?.preferredLanguage; resourceInputs["profileUrl"] = state?.profileUrl; resourceInputs["region"] = state?.region; resourceInputs["timezone"] = state?.timezone; resourceInputs["title"] = state?.title; resourceInputs["userId"] = state?.userId; resourceInputs["userName"] = state?.userName; resourceInputs["userType"] = state?.userType; } else { const args = argsOrState; if (args?.displayName === undefined && !opts.urn) { throw new Error("Missing required property 'displayName'"); } if (args?.identityStoreId === undefined && !opts.urn) { throw new Error("Missing required property 'identityStoreId'"); } if (args?.userName === undefined && !opts.urn) { throw new Error("Missing required property 'userName'"); } resourceInputs["addresses"] = args?.addresses; resourceInputs["displayName"] = args?.displayName; resourceInputs["emails"] = args?.emails; resourceInputs["identityStoreId"] = args?.identityStoreId; resourceInputs["locale"] = args?.locale; resourceInputs["name"] = args?.name; resourceInputs["nickname"] = args?.nickname; resourceInputs["phoneNumbers"] = args?.phoneNumbers; resourceInputs["preferredLanguage"] = args?.preferredLanguage; resourceInputs["profileUrl"] = args?.profileUrl; resourceInputs["region"] = args?.region; resourceInputs["timezone"] = args?.timezone; resourceInputs["title"] = args?.title; resourceInputs["userName"] = args?.userName; resourceInputs["userType"] = args?.userType; resourceInputs["externalIds"] = undefined /*out*/; resourceInputs["userId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(User.__pulumiType, name, resourceInputs, opts); } } exports.User = User; /** @internal */ User.__pulumiType = 'aws:identitystore/user:User'; //# sourceMappingURL=user.js.map