@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
122 lines • 6.81 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.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, Object.assign(Object.assign({}, 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 ? state.accountName : undefined;
resourceInputs["accountSubscriptionStatus"] = state ? state.accountSubscriptionStatus : undefined;
resourceInputs["activeDirectoryName"] = state ? state.activeDirectoryName : undefined;
resourceInputs["adminGroups"] = state ? state.adminGroups : undefined;
resourceInputs["authenticationMethod"] = state ? state.authenticationMethod : undefined;
resourceInputs["authorGroups"] = state ? state.authorGroups : undefined;
resourceInputs["awsAccountId"] = state ? state.awsAccountId : undefined;
resourceInputs["contactNumber"] = state ? state.contactNumber : undefined;
resourceInputs["directoryId"] = state ? state.directoryId : undefined;
resourceInputs["edition"] = state ? state.edition : undefined;
resourceInputs["emailAddress"] = state ? state.emailAddress : undefined;
resourceInputs["firstName"] = state ? state.firstName : undefined;
resourceInputs["iamIdentityCenterInstanceArn"] = state ? state.iamIdentityCenterInstanceArn : undefined;
resourceInputs["lastName"] = state ? state.lastName : undefined;
resourceInputs["notificationEmail"] = state ? state.notificationEmail : undefined;
resourceInputs["readerGroups"] = state ? state.readerGroups : undefined;
resourceInputs["realm"] = state ? state.realm : undefined;
resourceInputs["region"] = state ? state.region : undefined;
}
else {
const args = argsOrState;
if ((!args || args.accountName === undefined) && !opts.urn) {
throw new Error("Missing required property 'accountName'");
}
if ((!args || args.authenticationMethod === undefined) && !opts.urn) {
throw new Error("Missing required property 'authenticationMethod'");
}
if ((!args || args.edition === undefined) && !opts.urn) {
throw new Error("Missing required property 'edition'");
}
if ((!args || args.notificationEmail === undefined) && !opts.urn) {
throw new Error("Missing required property 'notificationEmail'");
}
resourceInputs["accountName"] = args ? args.accountName : undefined;
resourceInputs["activeDirectoryName"] = args ? args.activeDirectoryName : undefined;
resourceInputs["adminGroups"] = args ? args.adminGroups : undefined;
resourceInputs["authenticationMethod"] = args ? args.authenticationMethod : undefined;
resourceInputs["authorGroups"] = args ? args.authorGroups : undefined;
resourceInputs["awsAccountId"] = args ? args.awsAccountId : undefined;
resourceInputs["contactNumber"] = args ? args.contactNumber : undefined;
resourceInputs["directoryId"] = args ? args.directoryId : undefined;
resourceInputs["edition"] = args ? args.edition : undefined;
resourceInputs["emailAddress"] = args ? args.emailAddress : undefined;
resourceInputs["firstName"] = args ? args.firstName : undefined;
resourceInputs["iamIdentityCenterInstanceArn"] = args ? args.iamIdentityCenterInstanceArn : undefined;
resourceInputs["lastName"] = args ? args.lastName : undefined;
resourceInputs["notificationEmail"] = args ? args.notificationEmail : undefined;
resourceInputs["readerGroups"] = args ? args.readerGroups : undefined;
resourceInputs["realm"] = args ? args.realm : undefined;
resourceInputs["region"] = args ? args.region : undefined;
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