1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. quotas
  5. getQuotas
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.quotas.getQuotas

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 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);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.quotas.get_quotas(product_code="ecs",
        name_regex="专有宿主机总数量上限")
    pulumi.export("firstQuotasQuotaId", example.quotas[0].id)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:quotas:getQuotas
          Arguments:
            productCode: ecs
            nameRegex: 专有宿主机总数量上限
    outputs:
      firstQuotasQuotaId: ${example.quotas[0].id}
    

    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>
    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]
    func GetQuotas(ctx *Context, args *GetQuotasArgs, opts ...InvokeOption) (*GetQuotasResult, error)
    func GetQuotasOutput(ctx *Context, args *GetQuotasOutputArgs, opts ...InvokeOption) GetQuotasResultOutput

    > 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)
    }
    public static CompletableFuture<GetQuotasResult> getQuotas(GetQuotasArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:quotas/getQuotas:getQuotas
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProductCode string
    The product code.
    Dimensions List<Pulumi.AliCloud.Quotas.Inputs.GetQuotasDimension>
    The dimensions.
    GroupCode string
    The group code.
    KeyWord string
    The key word.
    NameRegex 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 string
    The quota action code.
    QuotaCategory string
    The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
    SortField string
    Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
    SortOrder string
    Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
    ProductCode string
    The product code.
    Dimensions []GetQuotasDimension
    The dimensions.
    GroupCode string
    The group code.
    KeyWord string
    The key word.
    NameRegex 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 string
    The quota action code.
    QuotaCategory string
    The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
    SortField string
    Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
    SortOrder string
    Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
    productCode String
    The product code.
    dimensions List<GetQuotasDimension>
    The dimensions.
    groupCode String
    The group code.
    keyWord String
    The key word.
    nameRegex 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 String
    The quota action code.
    quotaCategory String
    The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
    sortField String
    Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
    sortOrder String
    Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
    productCode string
    The product code.
    dimensions GetQuotasDimension[]
    The dimensions.
    groupCode string
    The group code.
    keyWord string
    The key word.
    nameRegex 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 string
    The quota action code.
    quotaCategory string
    The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
    sortField string
    Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
    sortOrder string
    Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
    product_code str
    The product code.
    dimensions Sequence[GetQuotasDimension]
    The dimensions.
    group_code str
    The group code.
    key_word str
    The key word.
    name_regex 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 str
    The quota action code.
    quota_category str
    The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
    sort_field str
    Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
    sort_order str
    Ranking of cloud service ECS specification quota support. Valid Values: Ascending and Descending.
    productCode String
    The product code.
    dimensions List<Property Map>
    The dimensions.
    groupCode String
    The group code.
    keyWord String
    The key word.
    nameRegex 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 String
    The quota action code.
    quotaCategory String
    The category of quota. Valid Values: FlowControl and CommonQuota, WhiteListLabel.
    sortField String
    Cloud service ECS specification quota supports setting sorting fields. Valid Values: TIME, TOTAL and RESERVED.
    sortOrder 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
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    GetQuotasQuota

    Adjustable bool
    Is the quota adjustable.
    ApplicableRanges List<string>
    The range of quota adjustment.
    ApplicableType string
    The type of quota.
    Consumable bool
    Show used quota.
    Id string
    The ID of the Quota.
    QuotaActionCode string
    The quota action code.
    QuotaDescription string
    The quota description.
    QuotaName string
    The quota name.
    QuotaType string
    The quota type.
    QuotaUnit string
    The quota unit.
    TotalQuota double
    TotalQuota.
    TotalUsage double
    The total of usage.
    UnadjustableDetail string
    The unadjustable detail.
    Adjustable bool
    Is the quota adjustable.
    ApplicableRanges []string
    The range of quota adjustment.
    ApplicableType string
    The type of quota.
    Consumable bool
    Show used quota.
    Id string
    The ID of the Quota.
    QuotaActionCode string
    The quota action code.
    QuotaDescription string
    The quota description.
    QuotaName string
    The quota name.
    QuotaType string
    The quota type.
    QuotaUnit string
    The quota unit.
    TotalQuota float64
    TotalQuota.
    TotalUsage float64
    The total of usage.
    UnadjustableDetail string
    The unadjustable detail.
    adjustable Boolean
    Is the quota adjustable.
    applicableRanges List<String>
    The range of quota adjustment.
    applicableType String
    The type of quota.
    consumable Boolean
    Show used quota.
    id String
    The ID of the Quota.
    quotaActionCode String
    The quota action code.
    quotaDescription String
    The quota description.
    quotaName String
    The quota name.
    quotaType String
    The quota type.
    quotaUnit String
    The quota unit.
    totalQuota Double
    TotalQuota.
    totalUsage Double
    The total of usage.
    unadjustableDetail String
    The unadjustable detail.
    adjustable boolean
    Is the quota adjustable.
    applicableRanges string[]
    The range of quota adjustment.
    applicableType string
    The type of quota.
    consumable boolean
    Show used quota.
    id string
    The ID of the Quota.
    quotaActionCode string
    The quota action code.
    quotaDescription string
    The quota description.
    quotaName string
    The quota name.
    quotaType string
    The quota type.
    quotaUnit string
    The quota unit.
    totalQuota number
    TotalQuota.
    totalUsage number
    The total of usage.
    unadjustableDetail string
    The unadjustable detail.
    adjustable bool
    Is the quota adjustable.
    applicable_ranges Sequence[str]
    The range of quota adjustment.
    applicable_type str
    The type of quota.
    consumable bool
    Show used quota.
    id str
    The ID of the Quota.
    quota_action_code str
    The quota action code.
    quota_description str
    The quota description.
    quota_name str
    The quota name.
    quota_type str
    The quota type.
    quota_unit str
    The quota unit.
    total_quota float
    TotalQuota.
    total_usage float
    The total of usage.
    unadjustable_detail str
    The unadjustable detail.
    adjustable Boolean
    Is the quota adjustable.
    applicableRanges List<String>
    The range of quota adjustment.
    applicableType String
    The type of quota.
    consumable Boolean
    Show used quota.
    id String
    The ID of the Quota.
    quotaActionCode String
    The quota action code.
    quotaDescription String
    The quota description.
    quotaName String
    The quota name.
    quotaType String
    The quota type.
    quotaUnit String
    The quota unit.
    totalQuota Number
    TotalQuota.
    totalUsage Number
    The total of usage.
    unadjustableDetail 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.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi