1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. quotas
  5. getQuotaAlarms
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.quotas.getQuotaAlarms

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

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

    NOTE: Available in v1.116.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.quotas.getQuotaAlarms({
        ids: ["5VR90-421F886-81E9-xxx"],
        nameRegex: "tf-testAcc",
    });
    export const firstQuotasQuotaAlarmId = example.then(example => example.alarms?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.quotas.get_quota_alarms(ids=["5VR90-421F886-81E9-xxx"],
        name_regex="tf-testAcc")
    pulumi.export("firstQuotasQuotaAlarmId", example.alarms[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.GetQuotaAlarms(ctx, &quotas.GetQuotaAlarmsArgs{
    			Ids: []string{
    				"5VR90-421F886-81E9-xxx",
    			},
    			NameRegex: pulumi.StringRef("tf-testAcc"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstQuotasQuotaAlarmId", example.Alarms[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.GetQuotaAlarms.Invoke(new()
        {
            Ids = new[]
            {
                "5VR90-421F886-81E9-xxx",
            },
            NameRegex = "tf-testAcc",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstQuotasQuotaAlarmId"] = example.Apply(getQuotaAlarmsResult => getQuotaAlarmsResult.Alarms[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.GetQuotaAlarmsArgs;
    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.getQuotaAlarms(GetQuotaAlarmsArgs.builder()
                .ids("5VR90-421F886-81E9-xxx")
                .nameRegex("tf-testAcc")
                .build());
    
            ctx.export("firstQuotasQuotaAlarmId", example.applyValue(getQuotaAlarmsResult -> getQuotaAlarmsResult.alarms()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:quotas:getQuotaAlarms
          Arguments:
            ids:
              - 5VR90-421F886-81E9-xxx
            nameRegex: tf-testAcc
    outputs:
      firstQuotasQuotaAlarmId: ${example.alarms[0].id}
    

    Using getQuotaAlarms

    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 getQuotaAlarms(args: GetQuotaAlarmsArgs, opts?: InvokeOptions): Promise<GetQuotaAlarmsResult>
    function getQuotaAlarmsOutput(args: GetQuotaAlarmsOutputArgs, opts?: InvokeOptions): Output<GetQuotaAlarmsResult>
    def get_quota_alarms(enable_details: Optional[bool] = None,
                         ids: Optional[Sequence[str]] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         product_code: Optional[str] = None,
                         quota_action_code: Optional[str] = None,
                         quota_alarm_name: Optional[str] = None,
                         quota_dimensions: Optional[Sequence[GetQuotaAlarmsQuotaDimension]] = None,
                         opts: Optional[InvokeOptions] = None) -> GetQuotaAlarmsResult
    def get_quota_alarms_output(enable_details: Optional[pulumi.Input[bool]] = None,
                         ids: Optional[pulumi.Input[Sequence[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_alarm_name: Optional[pulumi.Input[str]] = None,
                         quota_dimensions: Optional[pulumi.Input[Sequence[pulumi.Input[GetQuotaAlarmsQuotaDimensionArgs]]]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetQuotaAlarmsResult]
    func GetQuotaAlarms(ctx *Context, args *GetQuotaAlarmsArgs, opts ...InvokeOption) (*GetQuotaAlarmsResult, error)
    func GetQuotaAlarmsOutput(ctx *Context, args *GetQuotaAlarmsOutputArgs, opts ...InvokeOption) GetQuotaAlarmsResultOutput

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

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

    The following arguments are supported:

    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids List<string>
    A list of Quota Alarm IDs.
    NameRegex string
    A regex string to filter results by Quota Alarm name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ProductCode string
    The Product Code.
    QuotaActionCode string
    The Quota Action Code.
    QuotaAlarmName string
    The name of Quota Alarm.
    QuotaDimensions List<Pulumi.AliCloud.Quotas.Inputs.GetQuotaAlarmsQuotaDimension>
    The Quota Dimensions.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids []string
    A list of Quota Alarm IDs.
    NameRegex string
    A regex string to filter results by Quota Alarm name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ProductCode string
    The Product Code.
    QuotaActionCode string
    The Quota Action Code.
    QuotaAlarmName string
    The name of Quota Alarm.
    QuotaDimensions []GetQuotaAlarmsQuotaDimension
    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 Quota Alarm IDs.
    nameRegex String
    A regex string to filter results by Quota Alarm name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    productCode String
    The Product Code.
    quotaActionCode String
    The Quota Action Code.
    quotaAlarmName String
    The name of Quota Alarm.
    quotaDimensions List<GetQuotaAlarmsQuotaDimension>
    The Quota Dimensions.
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids string[]
    A list of Quota Alarm IDs.
    nameRegex string
    A regex string to filter results by Quota Alarm name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    productCode string
    The Product Code.
    quotaActionCode string
    The Quota Action Code.
    quotaAlarmName string
    The name of Quota Alarm.
    quotaDimensions GetQuotaAlarmsQuotaDimension[]
    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 Quota Alarm IDs.
    name_regex str
    A regex string to filter results by Quota Alarm name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    product_code str
    The Product Code.
    quota_action_code str
    The Quota Action Code.
    quota_alarm_name str
    The name of Quota Alarm.
    quota_dimensions Sequence[GetQuotaAlarmsQuotaDimension]
    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 Quota Alarm IDs.
    nameRegex String
    A regex string to filter results by Quota Alarm name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    productCode String
    The Product Code.
    quotaActionCode String
    The Quota Action Code.
    quotaAlarmName String
    The name of Quota Alarm.
    quotaDimensions List<Property Map>
    The Quota Dimensions.

    getQuotaAlarms Result

    The following output properties are available:

    Alarms []GetQuotaAlarmsAlarm
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    EnableDetails bool
    NameRegex string
    OutputFile string
    ProductCode string
    QuotaActionCode string
    QuotaAlarmName string
    QuotaDimensions []GetQuotaAlarmsQuotaDimension
    alarms List<GetQuotaAlarmsAlarm>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    enableDetails Boolean
    nameRegex String
    outputFile String
    productCode String
    quotaActionCode String
    quotaAlarmName String
    quotaDimensions List<GetQuotaAlarmsQuotaDimension>
    alarms GetQuotaAlarmsAlarm[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    enableDetails boolean
    nameRegex string
    outputFile string
    productCode string
    quotaActionCode string
    quotaAlarmName string
    quotaDimensions GetQuotaAlarmsQuotaDimension[]
    alarms List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    enableDetails Boolean
    nameRegex String
    outputFile String
    productCode String
    quotaActionCode String
    quotaAlarmName String
    quotaDimensions List<Property Map>

    Supporting Types

    GetQuotaAlarmsAlarm

    AlarmId string
    The first ID of the resource.
    Id string
    The ID of the Quota Alarm.
    ProductCode string
    The Product Code.
    QuotaActionCode string
    The Quota Action Code.
    QuotaAlarmName string
    The name of Quota Alarm.
    QuotaDimensions List<Pulumi.AliCloud.Quotas.Inputs.GetQuotaAlarmsAlarmQuotaDimension>
    The Quota Dimensions.
    Threshold double
    The threshold of Quota Alarm.
    ThresholdPercent double
    The threshold percent of Quota Alarm.
    WebHook string
    The WebHook of Quota Alarm.
    AlarmId string
    The first ID of the resource.
    Id string
    The ID of the Quota Alarm.
    ProductCode string
    The Product Code.
    QuotaActionCode string
    The Quota Action Code.
    QuotaAlarmName string
    The name of Quota Alarm.
    QuotaDimensions []GetQuotaAlarmsAlarmQuotaDimension
    The Quota Dimensions.
    Threshold float64
    The threshold of Quota Alarm.
    ThresholdPercent float64
    The threshold percent of Quota Alarm.
    WebHook string
    The WebHook of Quota Alarm.
    alarmId String
    The first ID of the resource.
    id String
    The ID of the Quota Alarm.
    productCode String
    The Product Code.
    quotaActionCode String
    The Quota Action Code.
    quotaAlarmName String
    The name of Quota Alarm.
    quotaDimensions List<GetQuotaAlarmsAlarmQuotaDimension>
    The Quota Dimensions.
    threshold Double
    The threshold of Quota Alarm.
    thresholdPercent Double
    The threshold percent of Quota Alarm.
    webHook String
    The WebHook of Quota Alarm.
    alarmId string
    The first ID of the resource.
    id string
    The ID of the Quota Alarm.
    productCode string
    The Product Code.
    quotaActionCode string
    The Quota Action Code.
    quotaAlarmName string
    The name of Quota Alarm.
    quotaDimensions GetQuotaAlarmsAlarmQuotaDimension[]
    The Quota Dimensions.
    threshold number
    The threshold of Quota Alarm.
    thresholdPercent number
    The threshold percent of Quota Alarm.
    webHook string
    The WebHook of Quota Alarm.
    alarm_id str
    The first ID of the resource.
    id str
    The ID of the Quota Alarm.
    product_code str
    The Product Code.
    quota_action_code str
    The Quota Action Code.
    quota_alarm_name str
    The name of Quota Alarm.
    quota_dimensions Sequence[GetQuotaAlarmsAlarmQuotaDimension]
    The Quota Dimensions.
    threshold float
    The threshold of Quota Alarm.
    threshold_percent float
    The threshold percent of Quota Alarm.
    web_hook str
    The WebHook of Quota Alarm.
    alarmId String
    The first ID of the resource.
    id String
    The ID of the Quota Alarm.
    productCode String
    The Product Code.
    quotaActionCode String
    The Quota Action Code.
    quotaAlarmName String
    The name of Quota Alarm.
    quotaDimensions List<Property Map>
    The Quota Dimensions.
    threshold Number
    The threshold of Quota Alarm.
    thresholdPercent Number
    The threshold percent of Quota Alarm.
    webHook String
    The WebHook of Quota Alarm.

    GetQuotaAlarmsAlarmQuotaDimension

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

    GetQuotaAlarmsQuotaDimension

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi