1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. quotas
  5. getQuotaApplications
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.quotas.getQuotaApplications

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

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

    NOTE: Available since v1.117.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultQuotaApplication = new alicloud.quotas.QuotaApplication("defaultQuotaApplication", {
        productCode: "vpc",
        noticeType: 3,
        effectiveTime: "2023-05-22T16:00:00Z",
        expireTime: "2024-09-15T00:08:32Z",
        desireValue: 1,
        reason: "",
        quotaActionCode: "vpc_whitelist/ha_vip_whitelist",
        auditMode: "Sync",
        envLanguage: "zh",
        quotaCategory: "WhiteListLabel",
    });
    const defaultQuotaApplications = pulumi.all([defaultQuotaApplication.quotaCategory, defaultQuotaApplication.id]).apply(([quotaCategory, id]) => alicloud.quotas.getQuotaApplicationsOutput({
        productCode: "vpc",
        enableDetails: true,
        quotaCategory: quotaCategory,
        ids: [id],
    }));
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_quota_application = alicloud.quotas.QuotaApplication("defaultQuotaApplication",
        product_code="vpc",
        notice_type=3,
        effective_time="2023-05-22T16:00:00Z",
        expire_time="2024-09-15T00:08:32Z",
        desire_value=1,
        reason="",
        quota_action_code="vpc_whitelist/ha_vip_whitelist",
        audit_mode="Sync",
        env_language="zh",
        quota_category="WhiteListLabel")
    default_quota_applications = pulumi.Output.all(default_quota_application.quota_category, default_quota_application.id).apply(lambda quota_category, id: alicloud.quotas.get_quota_applications_output(product_code="vpc",
        enable_details=True,
        quota_category=quota_category,
        ids=[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 {
    		defaultQuotaApplication, err := quotas.NewQuotaApplication(ctx, "defaultQuotaApplication", &quotas.QuotaApplicationArgs{
    			ProductCode:     pulumi.String("vpc"),
    			NoticeType:      pulumi.Int(3),
    			EffectiveTime:   pulumi.String("2023-05-22T16:00:00Z"),
    			ExpireTime:      pulumi.String("2024-09-15T00:08:32Z"),
    			DesireValue:     pulumi.Float64(1),
    			Reason:          pulumi.String(""),
    			QuotaActionCode: pulumi.String("vpc_whitelist/ha_vip_whitelist"),
    			AuditMode:       pulumi.String("Sync"),
    			EnvLanguage:     pulumi.String("zh"),
    			QuotaCategory:   pulumi.String("WhiteListLabel"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = pulumi.All(defaultQuotaApplication.QuotaCategory, defaultQuotaApplication.ID()).ApplyT(func(_args []interface{}) (quotas.GetQuotaApplicationsResult, error) {
    			quotaCategory := _args[0].(*string)
    			id := _args[1].(string)
    			return quotas.GetQuotaApplicationsOutput(ctx, quotas.GetQuotaApplicationsOutputArgs{
    				ProductCode:   "vpc",
    				EnableDetails: true,
    				QuotaCategory: quotaCategory,
    				Ids: []string{
    					id,
    				},
    			}, nil), nil
    		}).(quotas.GetQuotaApplicationsResultOutput)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultQuotaApplication = new AliCloud.Quotas.QuotaApplication("defaultQuotaApplication", new()
        {
            ProductCode = "vpc",
            NoticeType = 3,
            EffectiveTime = "2023-05-22T16:00:00Z",
            ExpireTime = "2024-09-15T00:08:32Z",
            DesireValue = 1,
            Reason = "",
            QuotaActionCode = "vpc_whitelist/ha_vip_whitelist",
            AuditMode = "Sync",
            EnvLanguage = "zh",
            QuotaCategory = "WhiteListLabel",
        });
    
        var defaultQuotaApplications = AliCloud.Quotas.GetQuotaApplications.Invoke(new()
        {
            ProductCode = "vpc",
            EnableDetails = true,
            QuotaCategory = defaultQuotaApplication.QuotaCategory,
            Ids = new[]
            {
                defaultQuotaApplication.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.quotas.QuotaApplication;
    import com.pulumi.alicloud.quotas.QuotaApplicationArgs;
    import com.pulumi.alicloud.quotas.QuotasFunctions;
    import com.pulumi.alicloud.quotas.inputs.GetQuotaApplicationsArgs;
    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) {
            var defaultQuotaApplication = new QuotaApplication("defaultQuotaApplication", QuotaApplicationArgs.builder()        
                .productCode("vpc")
                .noticeType("3")
                .effectiveTime("2023-05-22T16:00:00Z")
                .expireTime("2024-09-15T00:08:32Z")
                .desireValue("1")
                .reason("")
                .quotaActionCode("vpc_whitelist/ha_vip_whitelist")
                .auditMode("Sync")
                .envLanguage("zh")
                .quotaCategory("WhiteListLabel")
                .build());
    
            final var defaultQuotaApplications = QuotasFunctions.getQuotaApplications(GetQuotaApplicationsArgs.builder()
                .productCode("vpc")
                .enableDetails("true")
                .quotaCategory(defaultQuotaApplication.quotaCategory())
                .ids(defaultQuotaApplication.id())
                .build());
    
        }
    }
    
    resources:
      defaultQuotaApplication:
        type: alicloud:quotas:QuotaApplication
        properties:
          productCode: vpc
          noticeType: '3'
          effectiveTime: 2023-05-22T16:00:00Z
          expireTime: 2024-09-15T00:08:32Z
          desireValue: '1'
          reason:
          quotaActionCode: vpc_whitelist/ha_vip_whitelist
          auditMode: Sync
          envLanguage: zh
          quotaCategory: WhiteListLabel
    variables:
      defaultQuotaApplications:
        fn::invoke:
          Function: alicloud:quotas:getQuotaApplications
          Arguments:
            productCode: vpc
            enableDetails: 'true'
            quotaCategory: ${defaultQuotaApplication.quotaCategory}
            ids:
              - ${defaultQuotaApplication.id}
    

    Using getQuotaApplications

    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 getQuotaApplications(args: GetQuotaApplicationsArgs, opts?: InvokeOptions): Promise<GetQuotaApplicationsResult>
    function getQuotaApplicationsOutput(args: GetQuotaApplicationsOutputArgs, opts?: InvokeOptions): Output<GetQuotaApplicationsResult>
    def get_quota_applications(dimensions: Optional[Sequence[GetQuotaApplicationsDimension]] = None,
                               enable_details: Optional[bool] = None,
                               ids: Optional[Sequence[str]] = None,
                               key_word: Optional[str] = None,
                               output_file: Optional[str] = None,
                               product_code: Optional[str] = None,
                               quota_action_code: Optional[str] = None,
                               quota_category: Optional[str] = None,
                               status: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetQuotaApplicationsResult
    def get_quota_applications_output(dimensions: Optional[pulumi.Input[Sequence[pulumi.Input[GetQuotaApplicationsDimensionArgs]]]] = None,
                               enable_details: Optional[pulumi.Input[bool]] = None,
                               ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                               key_word: 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,
                               status: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetQuotaApplicationsResult]
    func GetQuotaApplications(ctx *Context, args *GetQuotaApplicationsArgs, opts ...InvokeOption) (*GetQuotaApplicationsResult, error)
    func GetQuotaApplicationsOutput(ctx *Context, args *GetQuotaApplicationsOutputArgs, opts ...InvokeOption) GetQuotaApplicationsResultOutput

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

    public static class GetQuotaApplications 
    {
        public static Task<GetQuotaApplicationsResult> InvokeAsync(GetQuotaApplicationsArgs args, InvokeOptions? opts = null)
        public static Output<GetQuotaApplicationsResult> Invoke(GetQuotaApplicationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetQuotaApplicationsResult> getQuotaApplications(GetQuotaApplicationsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:quotas/getQuotaApplications:getQuotaApplications
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProductCode string
    The product code.
    Dimensions List<Pulumi.AliCloud.Quotas.Inputs.GetQuotaApplicationsDimension>
    The quota dimensions.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids List<string>
    A list of Application Info IDs.
    KeyWord string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    QuotaActionCode string
    The ID of quota action..
    QuotaCategory string
    The quota category. Valid values: CommonQuota, FlowControl, WhiteListLabel.
    Status string
    The status of the quota application.
    ProductCode string
    The product code.
    Dimensions []GetQuotaApplicationsDimension
    The quota dimensions.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids []string
    A list of Application Info IDs.
    KeyWord string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    QuotaActionCode string
    The ID of quota action..
    QuotaCategory string
    The quota category. Valid values: CommonQuota, FlowControl, WhiteListLabel.
    Status string
    The status of the quota application.
    productCode String
    The product code.
    dimensions List<GetQuotaApplicationsDimension>
    The quota dimensions.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Application Info IDs.
    keyWord String
    outputFile String
    File name where to save data source results (after running pulumi preview).
    quotaActionCode String
    The ID of quota action..
    quotaCategory String
    The quota category. Valid values: CommonQuota, FlowControl, WhiteListLabel.
    status String
    The status of the quota application.
    productCode string
    The product code.
    dimensions GetQuotaApplicationsDimension[]
    The quota dimensions.
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids string[]
    A list of Application Info IDs.
    keyWord string
    outputFile string
    File name where to save data source results (after running pulumi preview).
    quotaActionCode string
    The ID of quota action..
    quotaCategory string
    The quota category. Valid values: CommonQuota, FlowControl, WhiteListLabel.
    status string
    The status of the quota application.
    product_code str
    The product code.
    dimensions Sequence[GetQuotaApplicationsDimension]
    The quota dimensions.
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    ids Sequence[str]
    A list of Application Info IDs.
    key_word str
    output_file str
    File name where to save data source results (after running pulumi preview).
    quota_action_code str
    The ID of quota action..
    quota_category str
    The quota category. Valid values: CommonQuota, FlowControl, WhiteListLabel.
    status str
    The status of the quota application.
    productCode String
    The product code.
    dimensions List<Property Map>
    The quota dimensions.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Application Info IDs.
    keyWord String
    outputFile String
    File name where to save data source results (after running pulumi preview).
    quotaActionCode String
    The ID of quota action..
    quotaCategory String
    The quota category. Valid values: CommonQuota, FlowControl, WhiteListLabel.
    status String
    The status of the quota application.

    getQuotaApplications Result

    The following output properties are available:

    Applications []GetQuotaApplicationsApplication
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    ProductCode string
    Dimensions []GetQuotaApplicationsDimension
    EnableDetails bool
    KeyWord string
    OutputFile string
    QuotaActionCode string
    QuotaCategory string
    Status string
    applications List<GetQuotaApplicationsApplication>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    productCode String
    dimensions List<GetQuotaApplicationsDimension>
    enableDetails Boolean
    keyWord String
    outputFile String
    quotaActionCode String
    quotaCategory String
    status String
    applications GetQuotaApplicationsApplication[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    productCode string
    dimensions GetQuotaApplicationsDimension[]
    enableDetails boolean
    keyWord string
    outputFile string
    quotaActionCode string
    quotaCategory string
    status string
    applications List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    productCode String
    dimensions List<Property Map>
    enableDetails Boolean
    keyWord String
    outputFile String
    quotaActionCode String
    quotaCategory String
    status String

    Supporting Types

    GetQuotaApplicationsApplication

    ApplicationId string
    The first ID of the resource.
    ApproveValue string
    The approve value.
    AuditReason string
    The audit reason.
    DesireValue double
    The desire value of the quota application.
    Dimensions List<Pulumi.AliCloud.Quotas.Inputs.GetQuotaApplicationsApplicationDimension>
    The quota dimensions.
    EffectiveTime string
    The effective time.
    ExpireTime string
    The expire time.
    Id string
    The ID of the Application Info.
    NoticeType int
    The notice type.
    ProductCode string
    The product code.
    QuotaActionCode string
    The ID of quota action..
    QuotaDescription string
    The description of the quota.
    QuotaName string
    The name of the quota.
    QuotaUnit string
    The quota unit.
    Reason string
    The reason of the quota application.
    Status string
    The status of the quota application.
    ApplicationId string
    The first ID of the resource.
    ApproveValue string
    The approve value.
    AuditReason string
    The audit reason.
    DesireValue float64
    The desire value of the quota application.
    Dimensions []GetQuotaApplicationsApplicationDimension
    The quota dimensions.
    EffectiveTime string
    The effective time.
    ExpireTime string
    The expire time.
    Id string
    The ID of the Application Info.
    NoticeType int
    The notice type.
    ProductCode string
    The product code.
    QuotaActionCode string
    The ID of quota action..
    QuotaDescription string
    The description of the quota.
    QuotaName string
    The name of the quota.
    QuotaUnit string
    The quota unit.
    Reason string
    The reason of the quota application.
    Status string
    The status of the quota application.
    applicationId String
    The first ID of the resource.
    approveValue String
    The approve value.
    auditReason String
    The audit reason.
    desireValue Double
    The desire value of the quota application.
    dimensions List<GetQuotaApplicationsApplicationDimension>
    The quota dimensions.
    effectiveTime String
    The effective time.
    expireTime String
    The expire time.
    id String
    The ID of the Application Info.
    noticeType Integer
    The notice type.
    productCode String
    The product code.
    quotaActionCode String
    The ID of quota action..
    quotaDescription String
    The description of the quota.
    quotaName String
    The name of the quota.
    quotaUnit String
    The quota unit.
    reason String
    The reason of the quota application.
    status String
    The status of the quota application.
    applicationId string
    The first ID of the resource.
    approveValue string
    The approve value.
    auditReason string
    The audit reason.
    desireValue number
    The desire value of the quota application.
    dimensions GetQuotaApplicationsApplicationDimension[]
    The quota dimensions.
    effectiveTime string
    The effective time.
    expireTime string
    The expire time.
    id string
    The ID of the Application Info.
    noticeType number
    The notice type.
    productCode string
    The product code.
    quotaActionCode string
    The ID of quota action..
    quotaDescription string
    The description of the quota.
    quotaName string
    The name of the quota.
    quotaUnit string
    The quota unit.
    reason string
    The reason of the quota application.
    status string
    The status of the quota application.
    application_id str
    The first ID of the resource.
    approve_value str
    The approve value.
    audit_reason str
    The audit reason.
    desire_value float
    The desire value of the quota application.
    dimensions Sequence[GetQuotaApplicationsApplicationDimension]
    The quota dimensions.
    effective_time str
    The effective time.
    expire_time str
    The expire time.
    id str
    The ID of the Application Info.
    notice_type int
    The notice type.
    product_code str
    The product code.
    quota_action_code str
    The ID of quota action..
    quota_description str
    The description of the quota.
    quota_name str
    The name of the quota.
    quota_unit str
    The quota unit.
    reason str
    The reason of the quota application.
    status str
    The status of the quota application.
    applicationId String
    The first ID of the resource.
    approveValue String
    The approve value.
    auditReason String
    The audit reason.
    desireValue Number
    The desire value of the quota application.
    dimensions List<Property Map>
    The quota dimensions.
    effectiveTime String
    The effective time.
    expireTime String
    The expire time.
    id String
    The ID of the Application Info.
    noticeType Number
    The notice type.
    productCode String
    The product code.
    quotaActionCode String
    The ID of quota action..
    quotaDescription String
    The description of the quota.
    quotaName String
    The name of the quota.
    quotaUnit String
    The quota unit.
    reason String
    The reason of the quota application.
    status String
    The status of the quota application.

    GetQuotaApplicationsApplicationDimension

    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.

    GetQuotaApplicationsDimension

    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.

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi