UNPKG

@pulumi/aws

Version:

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

103 lines 4.44 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.Template = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Service Quotas Template. * * > Only the management account of an organization can alter Service Quota templates, and this must be done from the `us-east-1` region. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.servicequotas.Template("example", { * awsRegion: "us-east-1", * quotaCode: "L-2ACBD22F", * serviceCode: "lambda", * value: 80, * }); * ``` * * ## Import * * Using `pulumi import`, import Service Quotas Template using the `id`. For example: * * ```sh * $ pulumi import aws:servicequotas/template:Template example us-east-1,L-2ACBD22F,lambda * ``` */ class Template extends pulumi.CustomResource { /** * Get an existing Template 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 Template(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Template. 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'] === Template.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["awsRegion"] = state ? state.awsRegion : undefined; resourceInputs["globalQuota"] = state ? state.globalQuota : undefined; resourceInputs["quotaCode"] = state ? state.quotaCode : undefined; resourceInputs["quotaName"] = state ? state.quotaName : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["serviceCode"] = state ? state.serviceCode : undefined; resourceInputs["serviceName"] = state ? state.serviceName : undefined; resourceInputs["unit"] = state ? state.unit : undefined; resourceInputs["value"] = state ? state.value : undefined; } else { const args = argsOrState; if ((!args || args.quotaCode === undefined) && !opts.urn) { throw new Error("Missing required property 'quotaCode'"); } if ((!args || args.serviceCode === undefined) && !opts.urn) { throw new Error("Missing required property 'serviceCode'"); } if ((!args || args.value === undefined) && !opts.urn) { throw new Error("Missing required property 'value'"); } resourceInputs["awsRegion"] = args ? args.awsRegion : undefined; resourceInputs["quotaCode"] = args ? args.quotaCode : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["serviceCode"] = args ? args.serviceCode : undefined; resourceInputs["value"] = args ? args.value : undefined; resourceInputs["globalQuota"] = undefined /*out*/; resourceInputs["quotaName"] = undefined /*out*/; resourceInputs["serviceName"] = undefined /*out*/; resourceInputs["unit"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Template.__pulumiType, name, resourceInputs, opts); } } exports.Template = Template; /** @internal */ Template.__pulumiType = 'aws:servicequotas/template:Template'; //# sourceMappingURL=template.js.map