1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. quotas
  5. getQuotas
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.quotas.getQuotas

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides the Quotas Quotas of the current Alibaba Cloud user.

NOTE: Available in v1.115.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = alicloud.quotas.getQuotas({
    productCode: "ecs",
    nameRegex: "专有宿主机总数量上限",
});
export const firstQuotasQuotaId = example.then(example => example.quotas?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.quotas.get_quotas(product_code="ecs",
    name_regex="专有宿主机总数量上限")
pulumi.export("firstQuotasQuotaId", example.quotas[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/quotas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := quotas.GetQuotas(ctx, &quotas.GetQuotasArgs{
			ProductCode: "ecs",
			NameRegex:   pulumi.StringRef("专有宿主机总数量上限"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstQuotasQuotaId", example.Quotas[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = AliCloud.Quotas.GetQuotas.Invoke(new()
    {
        ProductCode = "ecs",
        NameRegex = "专有宿主机总数量上限",
    });

    return new Dictionary<string, object?>
    {
        ["firstQuotasQuotaId"] = example.Apply(getQuotasResult => getQuotasResult.Quotas[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.quotas.QuotasFunctions;
import com.pulumi.alicloud.quotas.inputs.GetQuotasArgs;
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 example = QuotasFunctions.getQuotas(GetQuotasArgs.builder()
            .productCode("ecs")
            .nameRegex("专有宿主机总数量上限")
            .build());

        ctx.export("firstQuotasQuotaId", example.applyValue(getQuotasResult -> getQuotasResult.quotas()[0].id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:quotas:getQuotas
      arguments:
        productCode: ecs
        nameRegex: 专有宿主机总数量上限
outputs:
  firstQuotasQuotaId: ${example.quotas[0].id}
Copy

Using getQuotas

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 getQuotas(args: GetQuotasArgs, opts?: InvokeOptions): Promise<GetQuotasResult>
function getQuotasOutput(args: GetQuotasOutputArgs, opts?: InvokeOptions): Output<GetQuotasResult>
Copy
def get_quotas(dimensions: Optional[Sequence[GetQuotasDimension]] = None,
               group_code: Optional[str] = None,
               key_word: Optional[str] = None,
               name_regex: Optional[str] = None,
               output_file: Optional[str] = None,
               product_code: Optional[str] = None,
               quota_action_code: Optional[str] = None,
               quota_category: Optional[str] = None,
               sort_field: Optional[str] = None,
               sort_order: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetQuotasResult
def get_quotas_output(dimensions: Optional[pulumi.Input[Sequence[pulumi.Input[GetQuotasDimensionArgs]]]] = None,
               group_code: Optional[pulumi.Input[str]] = None,
               key_word: Optional[pulumi.Input[str]] = None,
               name_regex: Optional[pulumi.Input[str]] = None,
               output_file: Optional[pulumi.Input[str]] = None,
               product_code: Optional[pulumi.Input[str]] = None,
               quota_action_code: Optional[pulumi.Input[str]] = None,
               quota_category: Optional[pulumi.Input[str]] = None,
               sort_field: Optional[pulumi.Input[str]] = None,
               sort_order: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetQuotasResult]
Copy
func GetQuotas(ctx *Context, args *GetQuotasArgs, opts ...InvokeOption) (*GetQuotasResult, error)
func GetQuotasOutput(ctx *Context, args *GetQuotasOutputArgs, opts ...InvokeOption) GetQuotasResultOutput
Copy

> Note: This function is named GetQuotas in the Go SDK.

public static class GetQuotas 
{
    public static Task<GetQuotasResult> InvokeAsync(GetQuotasArgs args, InvokeOptions? opts = null)
    public static Output<GetQuotasResult> Invoke(GetQuotasInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetQuotasResult> getQuotas(GetQuotasArgs args, InvokeOptions options)
public static Output<GetQuotasResult> getQuotas(GetQuotasArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:quotas/getQuotas:getQuotas
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ProductCode
This property is required.
Changes to this property will trigger replacement.
string
The product code.
Dimensions Changes to this property will trigger replacement. List<Pulumi.AliCloud.Quotas.Inputs.GetQuotasDimension>
The dimensions.
GroupCode Changes to this property will trigger replacement. string
The group code.
KeyWord Changes to this property will trigger replacement. string
The key word.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Quota name.
OutputFile string
File name where to save data source results (after running pulumi preview).
QuotaActionCode Changes to this property will trigger replacement. string
The quota action code.
QuotaCategory Changes to this property will trigger replacement. string
The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
SortField Changes to this property will trigger replacement. string
Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
SortOrder Changes to this property will trigger replacement. string
Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
ProductCode
This property is required.
Changes to this property will trigger replacement.
string
The product code.
Dimensions Changes to this property will trigger replacement. []GetQuotasDimension
The dimensions.
GroupCode Changes to this property will trigger replacement. string
The group code.
KeyWord Changes to this property will trigger replacement. string
The key word.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Quota name.
OutputFile string
File name where to save data source results (after running pulumi preview).
QuotaActionCode Changes to this property will trigger replacement. string
The quota action code.
QuotaCategory Changes to this property will trigger replacement. string
The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
SortField Changes to this property will trigger replacement. string
Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
SortOrder Changes to this property will trigger replacement. string
Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
productCode
This property is required.
Changes to this property will trigger replacement.
String
The product code.
dimensions Changes to this property will trigger replacement. List<GetQuotasDimension>
The dimensions.
groupCode Changes to this property will trigger replacement. String
The group code.
keyWord Changes to this property will trigger replacement. String
The key word.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Quota name.
outputFile String
File name where to save data source results (after running pulumi preview).
quotaActionCode Changes to this property will trigger replacement. String
The quota action code.
quotaCategory Changes to this property will trigger replacement. String
The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
sortField Changes to this property will trigger replacement. String
Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
sortOrder Changes to this property will trigger replacement. String
Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
productCode
This property is required.
Changes to this property will trigger replacement.
string
The product code.
dimensions Changes to this property will trigger replacement. GetQuotasDimension[]
The dimensions.
groupCode Changes to this property will trigger replacement. string
The group code.
keyWord Changes to this property will trigger replacement. string
The key word.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Quota name.
outputFile string
File name where to save data source results (after running pulumi preview).
quotaActionCode Changes to this property will trigger replacement. string
The quota action code.
quotaCategory Changes to this property will trigger replacement. string
The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
sortField Changes to this property will trigger replacement. string
Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
sortOrder Changes to this property will trigger replacement. string
Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
product_code
This property is required.
Changes to this property will trigger replacement.
str
The product code.
dimensions Changes to this property will trigger replacement. Sequence[GetQuotasDimension]
The dimensions.
group_code Changes to this property will trigger replacement. str
The group code.
key_word Changes to this property will trigger replacement. str
The key word.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Quota name.
output_file str
File name where to save data source results (after running pulumi preview).
quota_action_code Changes to this property will trigger replacement. str
The quota action code.
quota_category Changes to this property will trigger replacement. str
The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
sort_field Changes to this property will trigger replacement. str
Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
sort_order Changes to this property will trigger replacement. str
Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
productCode
This property is required.
Changes to this property will trigger replacement.
String
The product code.
dimensions Changes to this property will trigger replacement. List<Property Map>
The dimensions.
groupCode Changes to this property will trigger replacement. String
The group code.
keyWord Changes to this property will trigger replacement. String
The key word.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Quota name.
outputFile String
File name where to save data source results (after running pulumi preview).
quotaActionCode Changes to this property will trigger replacement. String
The quota action code.
quotaCategory Changes to this property will trigger replacement. String
The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
sortField Changes to this property will trigger replacement. String
Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
sortOrder Changes to this property will trigger replacement. String
Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.

getQuotas Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
ProductCode string
Quotas List<Pulumi.AliCloud.Quotas.Outputs.GetQuotasQuota>
Dimensions List<Pulumi.AliCloud.Quotas.Outputs.GetQuotasDimension>
GroupCode string
KeyWord string
NameRegex string
OutputFile string
QuotaActionCode string
QuotaCategory string
SortField string
SortOrder string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
ProductCode string
Quotas []GetQuotasQuota
Dimensions []GetQuotasDimension
GroupCode string
KeyWord string
NameRegex string
OutputFile string
QuotaActionCode string
QuotaCategory string
SortField string
SortOrder string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
productCode String
quotas List<GetQuotasQuota>
dimensions List<GetQuotasDimension>
groupCode String
keyWord String
nameRegex String
outputFile String
quotaActionCode String
quotaCategory String
sortField String
sortOrder String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
productCode string
quotas GetQuotasQuota[]
dimensions GetQuotasDimension[]
groupCode string
keyWord string
nameRegex string
outputFile string
quotaActionCode string
quotaCategory string
sortField string
sortOrder string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
product_code str
quotas Sequence[GetQuotasQuota]
dimensions Sequence[GetQuotasDimension]
group_code str
key_word str
name_regex str
output_file str
quota_action_code str
quota_category str
sort_field str
sort_order str
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
productCode String
quotas List<Property Map>
dimensions List<Property Map>
groupCode String
keyWord String
nameRegex String
outputFile String
quotaActionCode String
quotaCategory String
sortField String
sortOrder String

Supporting Types

GetQuotasDimension

Key string
The key of dimensions.
Value string
The value of dimensions.
Key string
The key of dimensions.
Value string
The value of dimensions.
key String
The key of dimensions.
value String
The value of dimensions.
key string
The key of dimensions.
value string
The value of dimensions.
key str
The key of dimensions.
value str
The value of dimensions.
key String
The key of dimensions.
value String
The value of dimensions.

GetQuotasQuota

Adjustable This property is required. bool
Is the quota adjustable.
ApplicableRanges This property is required. List<string>
The range of quota adjustment.
ApplicableType This property is required. string
The type of quota.
Consumable This property is required. bool
Show used quota.
Id This property is required. string
The ID of the Quota.
QuotaActionCode This property is required. string
The quota action code.
QuotaDescription This property is required. string
The quota description.
QuotaName This property is required. string
The quota name.
QuotaType This property is required. string
The quota type.
QuotaUnit This property is required. string
The quota unit.
TotalQuota This property is required. double
TotalQuota.
TotalUsage This property is required. double
The total of usage.
UnadjustableDetail This property is required. string
The unadjustable detail.
Adjustable This property is required. bool
Is the quota adjustable.
ApplicableRanges This property is required. []string
The range of quota adjustment.
ApplicableType This property is required. string
The type of quota.
Consumable This property is required. bool
Show used quota.
Id This property is required. string
The ID of the Quota.
QuotaActionCode This property is required. string
The quota action code.
QuotaDescription This property is required. string
The quota description.
QuotaName This property is required. string
The quota name.
QuotaType This property is required. string
The quota type.
QuotaUnit This property is required. string
The quota unit.
TotalQuota This property is required. float64
TotalQuota.
TotalUsage This property is required. float64
The total of usage.
UnadjustableDetail This property is required. string
The unadjustable detail.
adjustable This property is required. Boolean
Is the quota adjustable.
applicableRanges This property is required. List<String>
The range of quota adjustment.
applicableType This property is required. String
The type of quota.
consumable This property is required. Boolean
Show used quota.
id This property is required. String
The ID of the Quota.
quotaActionCode This property is required. String
The quota action code.
quotaDescription This property is required. String
The quota description.
quotaName This property is required. String
The quota name.
quotaType This property is required. String
The quota type.
quotaUnit This property is required. String
The quota unit.
totalQuota This property is required. Double
TotalQuota.
totalUsage This property is required. Double
The total of usage.
unadjustableDetail This property is required. String
The unadjustable detail.
adjustable This property is required. boolean
Is the quota adjustable.
applicableRanges This property is required. string[]
The range of quota adjustment.
applicableType This property is required. string
The type of quota.
consumable This property is required. boolean
Show used quota.
id This property is required. string
The ID of the Quota.
quotaActionCode This property is required. string
The quota action code.
quotaDescription This property is required. string
The quota description.
quotaName This property is required. string
The quota name.
quotaType This property is required. string
The quota type.
quotaUnit This property is required. string
The quota unit.
totalQuota This property is required. number
TotalQuota.
totalUsage This property is required. number
The total of usage.
unadjustableDetail This property is required. string
The unadjustable detail.
adjustable This property is required. bool
Is the quota adjustable.
applicable_ranges This property is required. Sequence[str]
The range of quota adjustment.
applicable_type This property is required. str
The type of quota.
consumable This property is required. bool
Show used quota.
id This property is required. str
The ID of the Quota.
quota_action_code This property is required. str
The quota action code.
quota_description This property is required. str
The quota description.
quota_name This property is required. str
The quota name.
quota_type This property is required. str
The quota type.
quota_unit This property is required. str
The quota unit.
total_quota This property is required. float
TotalQuota.
total_usage This property is required. float
The total of usage.
unadjustable_detail This property is required. str
The unadjustable detail.
adjustable This property is required. Boolean
Is the quota adjustable.
applicableRanges This property is required. List<String>
The range of quota adjustment.
applicableType This property is required. String
The type of quota.
consumable This property is required. Boolean
Show used quota.
id This property is required. String
The ID of the Quota.
quotaActionCode This property is required. String
The quota action code.
quotaDescription This property is required. String
The quota description.
quotaName This property is required. String
The quota name.
quotaType This property is required. String
The quota type.
quotaUnit This property is required. String
The quota unit.
totalQuota This property is required. Number
TotalQuota.
totalUsage This property is required. Number
The total of usage.
unadjustableDetail This property is required. String
The unadjustable detail.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi