Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.quotas.getQuotas
Explore with Pulumi AI
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, "as.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:
- Product
Code string - The product code.
- Dimensions
List<Pulumi.
Ali Cloud. Quotas. Inputs. Get Quotas Dimension> - The dimensions.
- Group
Code string - The group code.
- Key
Word string - The key word.
- Name
Regex string - A regex string to filter results by Quota name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Quota
Action stringCode - The quota action code.
- Quota
Category string - The category of quota. Valid Values:
FlowControl
andCommonQuota
,WhiteListLabel
. - Sort
Field string - Cloud service ECS specification quota supports setting sorting fields. Valid Values:
TIME
,TOTAL
andRESERVED
. - Sort
Order string - Ranking of cloud service ECS specification quota support. Valid Values:
Ascending
andDescending
.
- Product
Code string - The product code.
- Dimensions
[]Get
Quotas Dimension - The dimensions.
- Group
Code string - The group code.
- Key
Word string - The key word.
- Name
Regex string - A regex string to filter results by Quota name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Quota
Action stringCode - The quota action code.
- Quota
Category string - The category of quota. Valid Values:
FlowControl
andCommonQuota
,WhiteListLabel
. - Sort
Field string - Cloud service ECS specification quota supports setting sorting fields. Valid Values:
TIME
,TOTAL
andRESERVED
. - Sort
Order string - Ranking of cloud service ECS specification quota support. Valid Values:
Ascending
andDescending
.
- product
Code String - The product code.
- dimensions
List<Get
Quotas Dimension> - The dimensions.
- group
Code String - The group code.
- key
Word String - The key word.
- name
Regex String - A regex string to filter results by Quota name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - quota
Action StringCode - The quota action code.
- quota
Category String - The category of quota. Valid Values:
FlowControl
andCommonQuota
,WhiteListLabel
. - sort
Field String - Cloud service ECS specification quota supports setting sorting fields. Valid Values:
TIME
,TOTAL
andRESERVED
. - sort
Order String - Ranking of cloud service ECS specification quota support. Valid Values:
Ascending
andDescending
.
- product
Code string - The product code.
- dimensions
Get
Quotas Dimension[] - The dimensions.
- group
Code string - The group code.
- key
Word string - The key word.
- name
Regex string - A regex string to filter results by Quota name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - quota
Action stringCode - The quota action code.
- quota
Category string - The category of quota. Valid Values:
FlowControl
andCommonQuota
,WhiteListLabel
. - sort
Field string - Cloud service ECS specification quota supports setting sorting fields. Valid Values:
TIME
,TOTAL
andRESERVED
. - sort
Order string - Ranking of cloud service ECS specification quota support. Valid Values:
Ascending
andDescending
.
- product_
code str - The product code.
- dimensions
Sequence[Get
Quotas Dimension] - 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_ strcode - The quota action code.
- quota_
category str - The category of quota. Valid Values:
FlowControl
andCommonQuota
,WhiteListLabel
. - sort_
field str - Cloud service ECS specification quota supports setting sorting fields. Valid Values:
TIME
,TOTAL
andRESERVED
. - sort_
order str - Ranking of cloud service ECS specification quota support. Valid Values:
Ascending
andDescending
.
- product
Code String - The product code.
- dimensions List<Property Map>
- The dimensions.
- group
Code String - The group code.
- key
Word String - The key word.
- name
Regex String - A regex string to filter results by Quota name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - quota
Action StringCode - The quota action code.
- quota
Category String - The category of quota. Valid Values:
FlowControl
andCommonQuota
,WhiteListLabel
. - sort
Field String - Cloud service ECS specification quota supports setting sorting fields. Valid Values:
TIME
,TOTAL
andRESERVED
. - sort
Order String - Ranking of cloud service ECS specification quota support. Valid Values:
Ascending
andDescending
.
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>
- Product
Code string - Quotas
List<Pulumi.
Ali Cloud. Quotas. Outputs. Get Quotas Quota> - Dimensions
List<Pulumi.
Ali Cloud. Quotas. Outputs. Get Quotas Dimension> - Group
Code string - Key
Word string - Name
Regex string - Output
File string - Quota
Action stringCode - Quota
Category string - Sort
Field string - Sort
Order string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Product
Code string - Quotas
[]Get
Quotas Quota - Dimensions
[]Get
Quotas Dimension - Group
Code string - Key
Word string - Name
Regex string - Output
File string - Quota
Action stringCode - Quota
Category string - Sort
Field string - Sort
Order string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- product
Code String - quotas
List<Get
Quotas Quota> - dimensions
List<Get
Quotas Dimension> - group
Code String - key
Word String - name
Regex String - output
File String - quota
Action StringCode - quota
Category String - sort
Field String - sort
Order String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- product
Code string - quotas
Get
Quotas Quota[] - dimensions
Get
Quotas Dimension[] - group
Code string - key
Word string - name
Regex string - output
File string - quota
Action stringCode - quota
Category string - sort
Field string - sort
Order string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- product_
code str - quotas
Sequence[Get
Quotas Quota] - dimensions
Sequence[Get
Quotas Dimension] - group_
code str - key_
word str - name_
regex str - output_
file str - quota_
action_ strcode - 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>
- product
Code String - quotas List<Property Map>
- dimensions List<Property Map>
- group
Code String - key
Word String - name
Regex String - output
File String - quota
Action StringCode - quota
Category String - sort
Field String - sort
Order String
Supporting Types
GetQuotasDimension
GetQuotasQuota
- Adjustable bool
- Is the quota adjustable.
- Applicable
Ranges List<string> - The range of quota adjustment.
- Applicable
Type string - The type of quota.
- Consumable bool
- Show used quota.
- Id string
- The ID of the Quota.
- Quota
Action stringCode - The quota action code.
- Quota
Description string - The quota description.
- Quota
Name string - The quota name.
- Quota
Type string - The quota type.
- Quota
Unit string - The quota unit.
- Total
Quota double - TotalQuota.
- Total
Usage double - The total of usage.
- Unadjustable
Detail string - The unadjustable detail.
- Adjustable bool
- Is the quota adjustable.
- Applicable
Ranges []string - The range of quota adjustment.
- Applicable
Type string - The type of quota.
- Consumable bool
- Show used quota.
- Id string
- The ID of the Quota.
- Quota
Action stringCode - The quota action code.
- Quota
Description string - The quota description.
- Quota
Name string - The quota name.
- Quota
Type string - The quota type.
- Quota
Unit string - The quota unit.
- Total
Quota float64 - TotalQuota.
- Total
Usage float64 - The total of usage.
- Unadjustable
Detail string - The unadjustable detail.
- adjustable Boolean
- Is the quota adjustable.
- applicable
Ranges List<String> - The range of quota adjustment.
- applicable
Type String - The type of quota.
- consumable Boolean
- Show used quota.
- id String
- The ID of the Quota.
- quota
Action StringCode - The quota action code.
- quota
Description String - The quota description.
- quota
Name String - The quota name.
- quota
Type String - The quota type.
- quota
Unit String - The quota unit.
- total
Quota Double - TotalQuota.
- total
Usage Double - The total of usage.
- unadjustable
Detail String - The unadjustable detail.
- adjustable boolean
- Is the quota adjustable.
- applicable
Ranges string[] - The range of quota adjustment.
- applicable
Type string - The type of quota.
- consumable boolean
- Show used quota.
- id string
- The ID of the Quota.
- quota
Action stringCode - The quota action code.
- quota
Description string - The quota description.
- quota
Name string - The quota name.
- quota
Type string - The quota type.
- quota
Unit string - The quota unit.
- total
Quota number - TotalQuota.
- total
Usage number - The total of usage.
- unadjustable
Detail 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_ strcode - 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.
- applicable
Ranges List<String> - The range of quota adjustment.
- applicable
Type String - The type of quota.
- consumable Boolean
- Show used quota.
- id String
- The ID of the Quota.
- quota
Action StringCode - The quota action code.
- quota
Description String - The quota description.
- quota
Name String - The quota name.
- quota
Type String - The quota type.
- quota
Unit String - The quota unit.
- total
Quota Number - TotalQuota.
- total
Usage Number - The total of usage.
- unadjustable
Detail 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.