@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
126 lines • 5.54 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.Product = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a Service Catalog Product.
*
* > **NOTE:** The user or role that uses this resources must have the `cloudformation:GetTemplate` IAM policy permission. This policy permission is required when using the `templatePhysicalId` argument.
*
* > A "provisioning artifact" is also referred to as a "version." A "distributor" is also referred to as a "vendor."
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.servicecatalog.Product("example", {
* name: "example",
* owner: "example-owner",
* type: "CLOUD_FORMATION_TEMPLATE",
* provisioningArtifactParameters: {
* templateUrl: "https://s3.amazonaws.com/cf-templates-ozkq9d3hgiq2-us-east-1/temp1.json",
* },
* tags: {
* foo: "bar",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_servicecatalog_product` using the product ID. For example:
*
* ```sh
* $ pulumi import aws:servicecatalog/product:Product example prod-dnigbtea24ste
* ```
*/
class Product extends pulumi.CustomResource {
/**
* Get an existing Product 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 Product(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Product. 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'] === Product.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["acceptLanguage"] = state?.acceptLanguage;
resourceInputs["arn"] = state?.arn;
resourceInputs["createdTime"] = state?.createdTime;
resourceInputs["description"] = state?.description;
resourceInputs["distributor"] = state?.distributor;
resourceInputs["hasDefaultPath"] = state?.hasDefaultPath;
resourceInputs["name"] = state?.name;
resourceInputs["owner"] = state?.owner;
resourceInputs["provisioningArtifactParameters"] = state?.provisioningArtifactParameters;
resourceInputs["region"] = state?.region;
resourceInputs["status"] = state?.status;
resourceInputs["supportDescription"] = state?.supportDescription;
resourceInputs["supportEmail"] = state?.supportEmail;
resourceInputs["supportUrl"] = state?.supportUrl;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["type"] = state?.type;
}
else {
const args = argsOrState;
if (args?.owner === undefined && !opts.urn) {
throw new Error("Missing required property 'owner'");
}
if (args?.provisioningArtifactParameters === undefined && !opts.urn) {
throw new Error("Missing required property 'provisioningArtifactParameters'");
}
if (args?.type === undefined && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["acceptLanguage"] = args?.acceptLanguage;
resourceInputs["description"] = args?.description;
resourceInputs["distributor"] = args?.distributor;
resourceInputs["name"] = args?.name;
resourceInputs["owner"] = args?.owner;
resourceInputs["provisioningArtifactParameters"] = args?.provisioningArtifactParameters;
resourceInputs["region"] = args?.region;
resourceInputs["supportDescription"] = args?.supportDescription;
resourceInputs["supportEmail"] = args?.supportEmail;
resourceInputs["supportUrl"] = args?.supportUrl;
resourceInputs["tags"] = args?.tags;
resourceInputs["type"] = args?.type;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["createdTime"] = undefined /*out*/;
resourceInputs["hasDefaultPath"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Product.__pulumiType, name, resourceInputs, opts);
}
}
exports.Product = Product;
/** @internal */
Product.__pulumiType = 'aws:servicecatalog/product:Product';
//# sourceMappingURL=product.js.map