AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.servicequotas.getServiceQuota
Explore with Pulumi AI
Retrieve information about a Service Quota.
NOTE: Global quotas apply to all AWS regions, but can only be accessed in
us-east-1in the Commercial partition orus-gov-west-1in the GovCloud partition. In other regions, the AWS API will return the errorThe request failed because the specified service does not exist.
Example Usage
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",
});
import pulumi
import pulumi_aws as aws
by_quota_code = aws.servicequotas.get_service_quota(quota_code="L-F678F1CE",
    service_code="vpc")
by_quota_name = aws.servicequotas.get_service_quota(quota_name="VPCs per Region",
    service_code="vpc")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicequotas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicequotas.LookupServiceQuota(ctx, &servicequotas.LookupServiceQuotaArgs{
			QuotaCode:   pulumi.StringRef("L-F678F1CE"),
			ServiceCode: "vpc",
		}, nil)
		if err != nil {
			return err
		}
		_, err = servicequotas.LookupServiceQuota(ctx, &servicequotas.LookupServiceQuotaArgs{
			QuotaName:   pulumi.StringRef("VPCs per Region"),
			ServiceCode: "vpc",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var byQuotaCode = Aws.ServiceQuotas.GetServiceQuota.Invoke(new()
    {
        QuotaCode = "L-F678F1CE",
        ServiceCode = "vpc",
    });
    var byQuotaName = Aws.ServiceQuotas.GetServiceQuota.Invoke(new()
    {
        QuotaName = "VPCs per Region",
        ServiceCode = "vpc",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.servicequotas.ServicequotasFunctions;
import com.pulumi.aws.servicequotas.inputs.GetServiceQuotaArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var byQuotaCode = ServicequotasFunctions.getServiceQuota(GetServiceQuotaArgs.builder()
            .quotaCode("L-F678F1CE")
            .serviceCode("vpc")
            .build());
        final var byQuotaName = ServicequotasFunctions.getServiceQuota(GetServiceQuotaArgs.builder()
            .quotaName("VPCs per Region")
            .serviceCode("vpc")
            .build());
    }
}
variables:
  byQuotaCode:
    fn::invoke:
      function: aws:servicequotas:getServiceQuota
      arguments:
        quotaCode: L-F678F1CE
        serviceCode: vpc
  byQuotaName:
    fn::invoke:
      function: aws:servicequotas:getServiceQuota
      arguments:
        quotaName: VPCs per Region
        serviceCode: vpc
Using getServiceQuota
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServiceQuota(args: GetServiceQuotaArgs, opts?: InvokeOptions): Promise<GetServiceQuotaResult>
function getServiceQuotaOutput(args: GetServiceQuotaOutputArgs, opts?: InvokeOptions): Output<GetServiceQuotaResult>def get_service_quota(quota_code: Optional[str] = None,
                      quota_name: Optional[str] = None,
                      service_code: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetServiceQuotaResult
def get_service_quota_output(quota_code: Optional[pulumi.Input[str]] = None,
                      quota_name: Optional[pulumi.Input[str]] = None,
                      service_code: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetServiceQuotaResult]func LookupServiceQuota(ctx *Context, args *LookupServiceQuotaArgs, opts ...InvokeOption) (*LookupServiceQuotaResult, error)
func LookupServiceQuotaOutput(ctx *Context, args *LookupServiceQuotaOutputArgs, opts ...InvokeOption) LookupServiceQuotaResultOutput> Note: This function is named LookupServiceQuota in the Go SDK.
public static class GetServiceQuota 
{
    public static Task<GetServiceQuotaResult> InvokeAsync(GetServiceQuotaArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceQuotaResult> Invoke(GetServiceQuotaInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceQuotaResult> getServiceQuota(GetServiceQuotaArgs args, InvokeOptions options)
public static Output<GetServiceQuotaResult> getServiceQuota(GetServiceQuotaArgs args, InvokeOptions options)
fn::invoke:
  function: aws:servicequotas/getServiceQuota:getServiceQuota
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ServiceCode string
- Service code for the quota. Available values can be found with the aws.servicequotas.getServicedata source or AWS CLI service-quotas list-services command.
- QuotaCode string
- 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. One of quota_codeorquota_namemust be specified.
- QuotaName 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. One of quota_nameorquota_codemust be specified.
- ServiceCode string
- Service code for the quota. Available values can be found with the aws.servicequotas.getServicedata source or AWS CLI service-quotas list-services command.
- QuotaCode string
- 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. One of quota_codeorquota_namemust be specified.
- QuotaName 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. One of quota_nameorquota_codemust be specified.
- serviceCode String
- Service code for the quota. Available values can be found with the aws.servicequotas.getServicedata source or AWS CLI service-quotas list-services command.
- quotaCode String
- 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. One of quota_codeorquota_namemust be specified.
- quotaName 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. One of quota_nameorquota_codemust be specified.
- serviceCode string
- Service code for the quota. Available values can be found with the aws.servicequotas.getServicedata source or AWS CLI service-quotas list-services command.
- quotaCode string
- 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. One of quota_codeorquota_namemust be specified.
- quotaName 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. One of quota_nameorquota_codemust be specified.
- service_code str
- Service code for the quota. Available values can be found with the aws.servicequotas.getServicedata source or AWS CLI service-quotas list-services command.
- quota_code str
- 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. One of quota_codeorquota_namemust be specified.
- quota_name str
- 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. One of quota_nameorquota_codemust be specified.
- serviceCode String
- Service code for the quota. Available values can be found with the aws.servicequotas.getServicedata source or AWS CLI service-quotas list-services command.
- quotaCode String
- 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. One of quota_codeorquota_namemust be specified.
- quotaName 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. One of quota_nameorquota_codemust be specified.
getServiceQuota Result
The following output properties are available:
- Adjustable bool
- Whether the service quota is adjustable.
- Arn string
- ARN of the service quota.
- DefaultValue double
- Default value of the service quota.
- GlobalQuota bool
- Whether the service quota is global for the AWS account.
- Id string
- The provider-assigned unique ID for this managed resource.
- QuotaCode string
- QuotaName string
- ServiceCode string
- ServiceName string
- Name of the service.
- UsageMetrics List<GetService Quota Usage Metric> 
- Information about the measurement.
- Value double
- Current value of the service quota.
- Adjustable bool
- Whether the service quota is adjustable.
- Arn string
- ARN of the service quota.
- DefaultValue float64
- Default value of the service quota.
- GlobalQuota bool
- Whether the service quota is global for the AWS account.
- Id string
- The provider-assigned unique ID for this managed resource.
- QuotaCode string
- QuotaName string
- ServiceCode string
- ServiceName string
- Name of the service.
- UsageMetrics []GetService Quota Usage Metric 
- Information about the measurement.
- Value float64
- Current value of the service quota.
- adjustable Boolean
- Whether the service quota is adjustable.
- arn String
- ARN of the service quota.
- defaultValue Double
- Default value of the service quota.
- globalQuota Boolean
- Whether the service quota is global for the AWS account.
- id String
- The provider-assigned unique ID for this managed resource.
- quotaCode String
- quotaName String
- serviceCode String
- serviceName String
- Name of the service.
- usageMetrics List<GetService Quota Usage Metric> 
- Information about the measurement.
- value Double
- Current value of the service quota.
- adjustable boolean
- Whether the service quota is adjustable.
- arn string
- ARN of the service quota.
- defaultValue number
- Default value of the service quota.
- globalQuota boolean
- Whether the service quota is global for the AWS account.
- id string
- The provider-assigned unique ID for this managed resource.
- quotaCode string
- quotaName string
- serviceCode string
- serviceName string
- Name of the service.
- usageMetrics GetService Quota Usage Metric[] 
- Information about the measurement.
- value number
- Current value of the service quota.
- adjustable bool
- Whether the service quota is adjustable.
- arn str
- ARN of the service quota.
- default_value float
- Default value of the service quota.
- global_quota bool
- Whether the service quota is global for the AWS account.
- id str
- The provider-assigned unique ID for this managed resource.
- quota_code str
- quota_name str
- service_code str
- service_name str
- Name of the service.
- usage_metrics Sequence[GetService Quota Usage Metric] 
- Information about the measurement.
- value float
- Current value of the service quota.
- adjustable Boolean
- Whether the service quota is adjustable.
- arn String
- ARN of the service quota.
- defaultValue Number
- Default value of the service quota.
- globalQuota Boolean
- Whether the service quota is global for the AWS account.
- id String
- The provider-assigned unique ID for this managed resource.
- quotaCode String
- quotaName String
- serviceCode String
- serviceName String
- Name of the service.
- usageMetrics List<Property Map>
- Information about the measurement.
- value Number
- Current value of the service quota.
Supporting Types
GetServiceQuotaUsageMetric    
- MetricDimensions List<GetService Quota Usage Metric Metric Dimension> 
- The metric dimensions.
- MetricName string
- The name of the metric.
- MetricNamespace string
- The namespace of the metric.
- MetricStatistic stringRecommendation 
- The metric statistic that AWS recommend you use when determining quota usage.
- MetricDimensions []GetService Quota Usage Metric Metric Dimension 
- The metric dimensions.
- MetricName string
- The name of the metric.
- MetricNamespace string
- The namespace of the metric.
- MetricStatistic stringRecommendation 
- The metric statistic that AWS recommend you use when determining quota usage.
- metricDimensions List<GetService Quota Usage Metric Metric Dimension> 
- The metric dimensions.
- metricName String
- The name of the metric.
- metricNamespace String
- The namespace of the metric.
- metricStatistic StringRecommendation 
- The metric statistic that AWS recommend you use when determining quota usage.
- metricDimensions GetService Quota Usage Metric Metric Dimension[] 
- The metric dimensions.
- metricName string
- The name of the metric.
- metricNamespace string
- The namespace of the metric.
- metricStatistic stringRecommendation 
- The metric statistic that AWS recommend you use when determining quota usage.
- metric_dimensions Sequence[GetService Quota Usage Metric Metric Dimension] 
- The metric dimensions.
- metric_name str
- The name of the metric.
- metric_namespace str
- The namespace of the metric.
- metric_statistic_ strrecommendation 
- The metric statistic that AWS recommend you use when determining quota usage.
- metricDimensions List<Property Map>
- The metric dimensions.
- metricName String
- The name of the metric.
- metricNamespace String
- The namespace of the metric.
- metricStatistic StringRecommendation 
- The metric statistic that AWS recommend you use when determining quota usage.
GetServiceQuotaUsageMetricMetricDimension      
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.