1. Packages
  2. AWS Classic
  3. API Docs
  4. servicequotas
  5. getServiceQuota

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

aws.servicequotas.getServiceQuota

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

    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

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:servicequotas/getServiceQuota:getServiceQuota
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ServiceCode 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.
    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_code or quota_name must 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_name or quota_code must be specified.
    ServiceCode 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.
    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_code or quota_name must 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_name or quota_code must be specified.
    serviceCode 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.
    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_code or quota_name must 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_name or quota_code must be specified.
    serviceCode 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.
    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_code or quota_name must 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_name or quota_code must be specified.
    service_code str
    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.
    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_code or quota_name must 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_name or quota_code must be specified.
    serviceCode 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.
    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_code or quota_name must 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_name or quota_code must 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<GetServiceQuotaUsageMetric>
    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 []GetServiceQuotaUsageMetric
    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<GetServiceQuotaUsageMetric>
    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 GetServiceQuotaUsageMetric[]
    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[GetServiceQuotaUsageMetric]
    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<GetServiceQuotaUsageMetricMetricDimension>
    The metric dimensions.
    MetricName string
    The name of the metric.
    MetricNamespace string
    The namespace of the metric.
    MetricStatisticRecommendation string
    The metric statistic that AWS recommend you use when determining quota usage.
    MetricDimensions []GetServiceQuotaUsageMetricMetricDimension
    The metric dimensions.
    MetricName string
    The name of the metric.
    MetricNamespace string
    The namespace of the metric.
    MetricStatisticRecommendation string
    The metric statistic that AWS recommend you use when determining quota usage.
    metricDimensions List<GetServiceQuotaUsageMetricMetricDimension>
    The metric dimensions.
    metricName String
    The name of the metric.
    metricNamespace String
    The namespace of the metric.
    metricStatisticRecommendation String
    The metric statistic that AWS recommend you use when determining quota usage.
    metricDimensions GetServiceQuotaUsageMetricMetricDimension[]
    The metric dimensions.
    metricName string
    The name of the metric.
    metricNamespace string
    The namespace of the metric.
    metricStatisticRecommendation string
    The metric statistic that AWS recommend you use when determining quota usage.
    metric_dimensions Sequence[GetServiceQuotaUsageMetricMetricDimension]
    The metric dimensions.
    metric_name str
    The name of the metric.
    metric_namespace str
    The namespace of the metric.
    metric_statistic_recommendation str
    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.
    metricStatisticRecommendation String
    The metric statistic that AWS recommend you use when determining quota usage.

    GetServiceQuotaUsageMetricMetricDimension

    Class string
    Resource string
    Service string
    Type string
    Class string
    Resource string
    Service string
    Type string
    class_ String
    resource String
    service String
    type String
    class string
    resource string
    service string
    type string
    class String
    resource String
    service String
    type String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi