UNPKG

@pulumi/aws

Version:

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

122 lines 6.09 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.AccountSubscription = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS QuickSight Account Subscription. * * > Due to the absence of the `adminGroup`, `authorGroup`, and `readerGroup` fields in the [`DescribeAccountSettings`](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeAccountSettings.html) API response, changes made to these groups post-subscription will not be detected by this resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const subscription = new aws.quicksight.AccountSubscription("subscription", { * accountName: "quicksight-pulumi", * authenticationMethod: "IAM_AND_QUICKSIGHT", * edition: "ENTERPRISE", * notificationEmail: "notification@email.com", * }); * ``` * * ## Import * * Using `pulumi import`, import a QuickSight Account Subscription using `aws_account_id`. For example: * * ```sh * $ pulumi import aws:quicksight/accountSubscription:AccountSubscription example "012345678901" * ``` */ class AccountSubscription extends pulumi.CustomResource { /** * Get an existing AccountSubscription 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 AccountSubscription(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AccountSubscription. 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'] === AccountSubscription.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountName"] = state?.accountName; resourceInputs["accountSubscriptionStatus"] = state?.accountSubscriptionStatus; resourceInputs["activeDirectoryName"] = state?.activeDirectoryName; resourceInputs["adminGroups"] = state?.adminGroups; resourceInputs["authenticationMethod"] = state?.authenticationMethod; resourceInputs["authorGroups"] = state?.authorGroups; resourceInputs["awsAccountId"] = state?.awsAccountId; resourceInputs["contactNumber"] = state?.contactNumber; resourceInputs["directoryId"] = state?.directoryId; resourceInputs["edition"] = state?.edition; resourceInputs["emailAddress"] = state?.emailAddress; resourceInputs["firstName"] = state?.firstName; resourceInputs["iamIdentityCenterInstanceArn"] = state?.iamIdentityCenterInstanceArn; resourceInputs["lastName"] = state?.lastName; resourceInputs["notificationEmail"] = state?.notificationEmail; resourceInputs["readerGroups"] = state?.readerGroups; resourceInputs["realm"] = state?.realm; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.accountName === undefined && !opts.urn) { throw new Error("Missing required property 'accountName'"); } if (args?.authenticationMethod === undefined && !opts.urn) { throw new Error("Missing required property 'authenticationMethod'"); } if (args?.edition === undefined && !opts.urn) { throw new Error("Missing required property 'edition'"); } if (args?.notificationEmail === undefined && !opts.urn) { throw new Error("Missing required property 'notificationEmail'"); } resourceInputs["accountName"] = args?.accountName; resourceInputs["activeDirectoryName"] = args?.activeDirectoryName; resourceInputs["adminGroups"] = args?.adminGroups; resourceInputs["authenticationMethod"] = args?.authenticationMethod; resourceInputs["authorGroups"] = args?.authorGroups; resourceInputs["awsAccountId"] = args?.awsAccountId; resourceInputs["contactNumber"] = args?.contactNumber; resourceInputs["directoryId"] = args?.directoryId; resourceInputs["edition"] = args?.edition; resourceInputs["emailAddress"] = args?.emailAddress; resourceInputs["firstName"] = args?.firstName; resourceInputs["iamIdentityCenterInstanceArn"] = args?.iamIdentityCenterInstanceArn; resourceInputs["lastName"] = args?.lastName; resourceInputs["notificationEmail"] = args?.notificationEmail; resourceInputs["readerGroups"] = args?.readerGroups; resourceInputs["realm"] = args?.realm; resourceInputs["region"] = args?.region; resourceInputs["accountSubscriptionStatus"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AccountSubscription.__pulumiType, name, resourceInputs, opts); } } exports.AccountSubscription = AccountSubscription; /** @internal */ AccountSubscription.__pulumiType = 'aws:quicksight/accountSubscription:AccountSubscription'; //# sourceMappingURL=accountSubscription.js.map