UNPKG

@pulumi/aws

Version:

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

126 lines 6.14 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.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, Object.assign(Object.assign({}, 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 ? state.acceptLanguage : undefined; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["createdTime"] = state ? state.createdTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["distributor"] = state ? state.distributor : undefined; resourceInputs["hasDefaultPath"] = state ? state.hasDefaultPath : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["owner"] = state ? state.owner : undefined; resourceInputs["provisioningArtifactParameters"] = state ? state.provisioningArtifactParameters : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["supportDescription"] = state ? state.supportDescription : undefined; resourceInputs["supportEmail"] = state ? state.supportEmail : undefined; resourceInputs["supportUrl"] = state ? state.supportUrl : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.owner === undefined) && !opts.urn) { throw new Error("Missing required property 'owner'"); } if ((!args || args.provisioningArtifactParameters === undefined) && !opts.urn) { throw new Error("Missing required property 'provisioningArtifactParameters'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["acceptLanguage"] = args ? args.acceptLanguage : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["distributor"] = args ? args.distributor : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["owner"] = args ? args.owner : undefined; resourceInputs["provisioningArtifactParameters"] = args ? args.provisioningArtifactParameters : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["supportDescription"] = args ? args.supportDescription : undefined; resourceInputs["supportEmail"] = args ? args.supportEmail : undefined; resourceInputs["supportUrl"] = args ? args.supportUrl : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["type"] = args ? args.type : undefined; 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