@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
94 lines • 3.86 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.TemplateAlias = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS QuickSight Template Alias.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.quicksight.TemplateAlias("example", {
* aliasName: "example-alias",
* templateId: test.templateId,
* templateVersionNumber: test.versionNumber,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import QuickSight Template Alias using the AWS account ID, template ID, and alias name separated by a comma (`,`). For example:
*
* ```sh
* $ pulumi import aws:quicksight/templateAlias:TemplateAlias example 123456789012,example-id,example-alias
* ```
*/
class TemplateAlias extends pulumi.CustomResource {
/**
* Get an existing TemplateAlias 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 TemplateAlias(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of TemplateAlias. 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'] === TemplateAlias.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["aliasName"] = state?.aliasName;
resourceInputs["arn"] = state?.arn;
resourceInputs["awsAccountId"] = state?.awsAccountId;
resourceInputs["region"] = state?.region;
resourceInputs["templateId"] = state?.templateId;
resourceInputs["templateVersionNumber"] = state?.templateVersionNumber;
}
else {
const args = argsOrState;
if (args?.aliasName === undefined && !opts.urn) {
throw new Error("Missing required property 'aliasName'");
}
if (args?.templateId === undefined && !opts.urn) {
throw new Error("Missing required property 'templateId'");
}
if (args?.templateVersionNumber === undefined && !opts.urn) {
throw new Error("Missing required property 'templateVersionNumber'");
}
resourceInputs["aliasName"] = args?.aliasName;
resourceInputs["awsAccountId"] = args?.awsAccountId;
resourceInputs["region"] = args?.region;
resourceInputs["templateId"] = args?.templateId;
resourceInputs["templateVersionNumber"] = args?.templateVersionNumber;
resourceInputs["arn"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TemplateAlias.__pulumiType, name, resourceInputs, opts);
}
}
exports.TemplateAlias = TemplateAlias;
/** @internal */
TemplateAlias.__pulumiType = 'aws:quicksight/templateAlias:TemplateAlias';
//# sourceMappingURL=templateAlias.js.map
;