AWS v6.54.0 published on Friday, Sep 27, 2024 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-1
in the Commercial partition orus-gov-west-1
in 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:servicequotas/getServiceQuota:getServiceQuota
arguments:
# arguments dictionary
The following arguments are supported:
- Service
Code 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. - Quota
Code 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
orquota_name
must be specified. - Quota
Name 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
orquota_code
must be specified.
- Service
Code 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. - Quota
Code 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
orquota_name
must be specified. - Quota
Name 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
orquota_code
must be specified.
- service
Code 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. - quota
Code 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
orquota_name
must be specified. - quota
Name 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
orquota_code
must be specified.
- service
Code 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. - quota
Code 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
orquota_name
must be specified. - quota
Name 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
orquota_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
orquota_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
orquota_code
must be specified.
- service
Code 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. - quota
Code 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
orquota_name
must be specified. - quota
Name 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
orquota_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.
- Default
Value double - Default value of the service quota.
- Global
Quota bool - Whether the service quota is global for the AWS account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Quota
Code string - Quota
Name string - Service
Code string - Service
Name string - Name of the service.
- Usage
Metrics 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.
- Default
Value float64 - Default value of the service quota.
- Global
Quota bool - Whether the service quota is global for the AWS account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Quota
Code string - Quota
Name string - Service
Code string - Service
Name string - Name of the service.
- Usage
Metrics []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.
- default
Value Double - Default value of the service quota.
- global
Quota Boolean - Whether the service quota is global for the AWS account.
- id String
- The provider-assigned unique ID for this managed resource.
- quota
Code String - quota
Name String - service
Code String - service
Name String - Name of the service.
- usage
Metrics 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.
- default
Value number - Default value of the service quota.
- global
Quota boolean - Whether the service quota is global for the AWS account.
- id string
- The provider-assigned unique ID for this managed resource.
- quota
Code string - quota
Name string - service
Code string - service
Name string - Name of the service.
- usage
Metrics 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.
- default
Value Number - Default value of the service quota.
- global
Quota Boolean - Whether the service quota is global for the AWS account.
- id String
- The provider-assigned unique ID for this managed resource.
- quota
Code String - quota
Name String - service
Code String - service
Name String - Name of the service.
- usage
Metrics List<Property Map> - Information about the measurement.
- value Number
- Current value of the service quota.
Supporting Types
GetServiceQuotaUsageMetric
- Metric
Dimensions List<GetService Quota Usage Metric Metric Dimension> - The metric dimensions.
- Metric
Name string - The name of the metric.
- Metric
Namespace string - The namespace of the metric.
- Metric
Statistic stringRecommendation - The metric statistic that AWS recommend you use when determining quota usage.
- Metric
Dimensions []GetService Quota Usage Metric Metric Dimension - The metric dimensions.
- Metric
Name string - The name of the metric.
- Metric
Namespace string - The namespace of the metric.
- Metric
Statistic stringRecommendation - The metric statistic that AWS recommend you use when determining quota usage.
- metric
Dimensions List<GetService Quota Usage Metric Metric Dimension> - The metric dimensions.
- metric
Name String - The name of the metric.
- metric
Namespace String - The namespace of the metric.
- metric
Statistic StringRecommendation - The metric statistic that AWS recommend you use when determining quota usage.
- metric
Dimensions GetService Quota Usage Metric Metric Dimension[] - The metric dimensions.
- metric
Name string - The name of the metric.
- metric
Namespace string - The namespace of the metric.
- metric
Statistic 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.
- metric
Dimensions List<Property Map> - The metric dimensions.
- metric
Name String - The name of the metric.
- metric
Namespace String - The namespace of the metric.
- metric
Statistic 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
aws
Terraform Provider.