UNPKG

@pulumi/aws

Version:

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

108 lines 4.86 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.ServiceQuota = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an individual Service Quota. * * > **NOTE:** Global quotas apply to all AWS regions, but can only be accessed in `us-east-1` in the Commercial partition or `us-gov-west-1` in the GovCloud partition. In other regions, the AWS API will return the error `The request failed because the specified service does not exist.` * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.servicequotas.ServiceQuota("example", { * quotaCode: "L-F678F1CE", * serviceCode: "vpc", * value: 75, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_servicequotas_service_quota` using the service code and quota code, separated by a front slash (`/`). For example: * * ~> __NOTE:__ This resource does not require explicit import and will assume management of an existing service quota on Pulumi resource creation. * * ```sh * $ pulumi import aws:servicequotas/serviceQuota:ServiceQuota example vpc/L-F678F1CE * ``` */ class ServiceQuota extends pulumi.CustomResource { /** * Get an existing ServiceQuota 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 ServiceQuota(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ServiceQuota. 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'] === ServiceQuota.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["adjustable"] = state?.adjustable; resourceInputs["arn"] = state?.arn; resourceInputs["defaultValue"] = state?.defaultValue; resourceInputs["quotaCode"] = state?.quotaCode; resourceInputs["quotaName"] = state?.quotaName; resourceInputs["region"] = state?.region; resourceInputs["requestId"] = state?.requestId; resourceInputs["requestStatus"] = state?.requestStatus; resourceInputs["serviceCode"] = state?.serviceCode; resourceInputs["serviceName"] = state?.serviceName; resourceInputs["usageMetrics"] = state?.usageMetrics; 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["quotaCode"] = args?.quotaCode; resourceInputs["region"] = args?.region; resourceInputs["serviceCode"] = args?.serviceCode; resourceInputs["value"] = args?.value; resourceInputs["adjustable"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; resourceInputs["defaultValue"] = undefined /*out*/; resourceInputs["quotaName"] = undefined /*out*/; resourceInputs["requestId"] = undefined /*out*/; resourceInputs["requestStatus"] = undefined /*out*/; resourceInputs["serviceName"] = undefined /*out*/; resourceInputs["usageMetrics"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServiceQuota.__pulumiType, name, resourceInputs, opts); } } exports.ServiceQuota = ServiceQuota; /** @internal */ ServiceQuota.__pulumiType = 'aws:servicequotas/serviceQuota:ServiceQuota'; //# sourceMappingURL=serviceQuota.js.map