@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
134 lines (133 loc) • 5.94 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Retrieve information about a 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 byQuotaCode = aws.servicequotas.getServiceQuota({
* quotaCode: "L-F678F1CE",
* serviceCode: "vpc",
* });
* const byQuotaName = aws.servicequotas.getServiceQuota({
* quotaName: "VPCs per Region",
* serviceCode: "vpc",
* });
* ```
*/
export declare function getServiceQuota(args: GetServiceQuotaArgs, opts?: pulumi.InvokeOptions): Promise<GetServiceQuotaResult>;
/**
* A collection of arguments for invoking getServiceQuota.
*/
export interface GetServiceQuotaArgs {
/**
* Quota code within the service. When configured, the data source directly looks up the service quota. Available values can be found with the [AWS CLI service-quotas list-service-quotas command](https://docs.aws.amazon.com/cli/latest/reference/service-quotas/list-service-quotas.html). One of `quotaCode` or `quotaName` must be specified.
*/
quotaCode?: string;
/**
* Quota name within the service. When configured, the data source searches through all service quotas to find the matching quota name. Available values can be found with the [AWS CLI service-quotas list-service-quotas command](https://docs.aws.amazon.com/cli/latest/reference/service-quotas/list-service-quotas.html). One of `quotaName` or `quotaCode` must be specified.
*
* > *NOTE:* Either `quotaCode` or `quotaName` must be configured.
*/
quotaName?: string;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: string;
/**
* Service code for the quota. Available values can be found with the `aws.servicequotas.getService` data source or [AWS CLI service-quotas list-services command](https://docs.aws.amazon.com/cli/latest/reference/service-quotas/list-services.html).
*/
serviceCode: string;
}
/**
* A collection of values returned by getServiceQuota.
*/
export interface GetServiceQuotaResult {
/**
* Whether the service quota is adjustable.
*/
readonly adjustable: boolean;
/**
* ARN of the service quota.
*/
readonly arn: string;
/**
* Default value of the service quota.
*/
readonly defaultValue: number;
/**
* Whether the service quota is global for the AWS account.
*/
readonly globalQuota: boolean;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly quotaCode: string;
readonly quotaName: string;
readonly region: string;
readonly serviceCode: string;
/**
* Name of the service.
*/
readonly serviceName: string;
/**
* Information about the measurement.
*/
readonly usageMetrics: outputs.servicequotas.GetServiceQuotaUsageMetric[];
/**
* Current value of the service quota.
*/
readonly value: number;
}
/**
* Retrieve information about a 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 byQuotaCode = aws.servicequotas.getServiceQuota({
* quotaCode: "L-F678F1CE",
* serviceCode: "vpc",
* });
* const byQuotaName = aws.servicequotas.getServiceQuota({
* quotaName: "VPCs per Region",
* serviceCode: "vpc",
* });
* ```
*/
export declare function getServiceQuotaOutput(args: GetServiceQuotaOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetServiceQuotaResult>;
/**
* A collection of arguments for invoking getServiceQuota.
*/
export interface GetServiceQuotaOutputArgs {
/**
* Quota code within the service. When configured, the data source directly looks up the service quota. Available values can be found with the [AWS CLI service-quotas list-service-quotas command](https://docs.aws.amazon.com/cli/latest/reference/service-quotas/list-service-quotas.html). One of `quotaCode` or `quotaName` must be specified.
*/
quotaCode?: pulumi.Input<string>;
/**
* Quota name within the service. When configured, the data source searches through all service quotas to find the matching quota name. Available values can be found with the [AWS CLI service-quotas list-service-quotas command](https://docs.aws.amazon.com/cli/latest/reference/service-quotas/list-service-quotas.html). One of `quotaName` or `quotaCode` must be specified.
*
* > *NOTE:* Either `quotaCode` or `quotaName` must be configured.
*/
quotaName?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Service code for the quota. Available values can be found with the `aws.servicequotas.getService` data source or [AWS CLI service-quotas list-services command](https://docs.aws.amazon.com/cli/latest/reference/service-quotas/list-services.html).
*/
serviceCode: pulumi.Input<string>;
}