UNPKG

@pulumi/aws

Version:

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

131 lines 5.34 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"); /** * Resource for managing QuickSight User * * ## Example Usage * * ### Create User With IAM Identity Type Using an IAM Role * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.quicksight.User("example", { * email: "author1@example.com", * identityType: "IAM", * userRole: "AUTHOR", * iamArn: "arn:aws:iam::123456789012:role/AuthorRole", * sessionName: "author1", * }); * ``` * * ### Create User With IAM Identity Type Using an IAM User * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.quicksight.User("example", { * email: "authorpro1@example.com", * identityType: "IAM", * userRole: "AUTHOR_PRO", * iamArn: "arn:aws:iam::123456789012:user/authorpro1", * }); * ``` * * ### Create User With QuickSight Identity Type in Non-Default Namespace * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.quicksight.User("example", { * email: "reader1@example.com", * identityType: "QUICKSIGHT", * userRole: "READER", * namespace: "example", * userName: "reader1", * }); * ``` * * ## Import * * You cannot import this resource. */ 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, Object.assign(Object.assign({}, 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["arn"] = state ? state.arn : undefined; resourceInputs["awsAccountId"] = state ? state.awsAccountId : undefined; resourceInputs["email"] = state ? state.email : undefined; resourceInputs["iamArn"] = state ? state.iamArn : undefined; resourceInputs["identityType"] = state ? state.identityType : undefined; resourceInputs["namespace"] = state ? state.namespace : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["sessionName"] = state ? state.sessionName : undefined; resourceInputs["userInvitationUrl"] = state ? state.userInvitationUrl : undefined; resourceInputs["userName"] = state ? state.userName : undefined; resourceInputs["userRole"] = state ? state.userRole : undefined; } else { const args = argsOrState; if ((!args || args.email === undefined) && !opts.urn) { throw new Error("Missing required property 'email'"); } if ((!args || args.identityType === undefined) && !opts.urn) { throw new Error("Missing required property 'identityType'"); } if ((!args || args.userRole === undefined) && !opts.urn) { throw new Error("Missing required property 'userRole'"); } resourceInputs["awsAccountId"] = args ? args.awsAccountId : undefined; resourceInputs["email"] = args ? args.email : undefined; resourceInputs["iamArn"] = args ? args.iamArn : undefined; resourceInputs["identityType"] = args ? args.identityType : undefined; resourceInputs["namespace"] = args ? args.namespace : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["sessionName"] = args ? args.sessionName : undefined; resourceInputs["userName"] = args ? args.userName : undefined; resourceInputs["userRole"] = args ? args.userRole : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["userInvitationUrl"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(User.__pulumiType, name, resourceInputs, opts); } } exports.User = User; /** @internal */ User.__pulumiType = 'aws:quicksight/user:User'; //# sourceMappingURL=user.js.map