UNPKG

@pulumi/aws

Version:

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

103 lines 4.12 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, { ...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?.awsRegion; resourceInputs["globalQuota"] = state?.globalQuota; resourceInputs["quotaCode"] = state?.quotaCode; resourceInputs["quotaName"] = state?.quotaName; resourceInputs["region"] = state?.region; resourceInputs["serviceCode"] = state?.serviceCode; resourceInputs["serviceName"] = state?.serviceName; resourceInputs["unit"] = state?.unit; resourceInputs["value"] = state?.value; } else { const args = argsOrState; if (args?.quotaCode === undefined && !opts.urn) { throw new Error("Missing required property 'quotaCode'"); } if (args?.serviceCode === undefined && !opts.urn) { throw new Error("Missing required property 'serviceCode'"); } if (args?.value === undefined && !opts.urn) { throw new Error("Missing required property 'value'"); } resourceInputs["awsRegion"] = args?.awsRegion; resourceInputs["quotaCode"] = args?.quotaCode; resourceInputs["region"] = args?.region; resourceInputs["serviceCode"] = args?.serviceCode; resourceInputs["value"] = args?.value; 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