1. Packages
  2. Volcengine
  3. API Docs
  4. vmp
  5. getAlerts
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.vmp.getAlerts

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Use this data source to query detailed information of vmp alerts

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const default = volcengine.vmp.getAlerts({
        ids: ["9a4f84-0868efcb795c2ac4-73cefd4b3263****"],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    default = volcengine.vmp.get_alerts(ids=["9a4f84-0868efcb795c2ac4-73cefd4b3263****"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vmp"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vmp.GetAlerts(ctx, &vmp.GetAlertsArgs{
    			Ids: []string{
    				"9a4f84-0868efcb795c2ac4-73cefd4b3263****",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Volcengine.Vmp.GetAlerts.Invoke(new()
        {
            Ids = new[]
            {
                "9a4f84-0868efcb795c2ac4-73cefd4b3263****",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vmp.VmpFunctions;
    import com.pulumi.volcengine.vmp.inputs.GetAlertsArgs;
    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 default = VmpFunctions.getAlerts(GetAlertsArgs.builder()
                .ids("9a4f84-0868efcb795c2ac4-73cefd4b3263****")
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: volcengine:vmp:getAlerts
          Arguments:
            ids:
              - 9a4f84-0868efcb795c2ac4-73cefd4b3263****
    

    Using getAlerts

    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 getAlerts(args: GetAlertsArgs, opts?: InvokeOptions): Promise<GetAlertsResult>
    function getAlertsOutput(args: GetAlertsOutputArgs, opts?: InvokeOptions): Output<GetAlertsResult>
    def get_alerts(alerting_rule_ids: Optional[Sequence[str]] = None,
                   current_phase: Optional[str] = None,
                   desc: Optional[bool] = None,
                   ids: Optional[Sequence[str]] = None,
                   level: Optional[str] = None,
                   output_file: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetAlertsResult
    def get_alerts_output(alerting_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                   current_phase: Optional[pulumi.Input[str]] = None,
                   desc: Optional[pulumi.Input[bool]] = None,
                   ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                   level: Optional[pulumi.Input[str]] = None,
                   output_file: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetAlertsResult]
    func GetAlerts(ctx *Context, args *GetAlertsArgs, opts ...InvokeOption) (*GetAlertsResult, error)
    func GetAlertsOutput(ctx *Context, args *GetAlertsOutputArgs, opts ...InvokeOption) GetAlertsResultOutput

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

    public static class GetAlerts 
    {
        public static Task<GetAlertsResult> InvokeAsync(GetAlertsArgs args, InvokeOptions? opts = null)
        public static Output<GetAlertsResult> Invoke(GetAlertsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAlertsResult> getAlerts(GetAlertsArgs args, InvokeOptions options)
    public static Output<GetAlertsResult> getAlerts(GetAlertsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:vmp/getAlerts:getAlerts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AlertingRuleIds List<string>
    A list of alerting rule IDs.
    CurrentPhase string
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    Desc bool
    Whether to use descending sorting.
    Ids List<string>
    A list of vmp alert IDs.
    Level string
    The level of vmp alert. Valid values: P0, P1, P2.
    OutputFile string
    File name where to save data source results.
    AlertingRuleIds []string
    A list of alerting rule IDs.
    CurrentPhase string
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    Desc bool
    Whether to use descending sorting.
    Ids []string
    A list of vmp alert IDs.
    Level string
    The level of vmp alert. Valid values: P0, P1, P2.
    OutputFile string
    File name where to save data source results.
    alertingRuleIds List<String>
    A list of alerting rule IDs.
    currentPhase String
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    desc Boolean
    Whether to use descending sorting.
    ids List<String>
    A list of vmp alert IDs.
    level String
    The level of vmp alert. Valid values: P0, P1, P2.
    outputFile String
    File name where to save data source results.
    alertingRuleIds string[]
    A list of alerting rule IDs.
    currentPhase string
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    desc boolean
    Whether to use descending sorting.
    ids string[]
    A list of vmp alert IDs.
    level string
    The level of vmp alert. Valid values: P0, P1, P2.
    outputFile string
    File name where to save data source results.
    alerting_rule_ids Sequence[str]
    A list of alerting rule IDs.
    current_phase str
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    desc bool
    Whether to use descending sorting.
    ids Sequence[str]
    A list of vmp alert IDs.
    level str
    The level of vmp alert. Valid values: P0, P1, P2.
    output_file str
    File name where to save data source results.
    alertingRuleIds List<String>
    A list of alerting rule IDs.
    currentPhase String
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    desc Boolean
    Whether to use descending sorting.
    ids List<String>
    A list of vmp alert IDs.
    level String
    The level of vmp alert. Valid values: P0, P1, P2.
    outputFile String
    File name where to save data source results.

    getAlerts Result

    The following output properties are available:

    Alerts List<GetAlertsAlert>
    The collection of query.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    AlertingRuleIds List<string>
    CurrentPhase string
    The status of the vmp alert.
    Desc bool
    Ids List<string>
    Level string
    The level of the vmp alerting rule.
    OutputFile string
    Alerts []GetAlertsAlert
    The collection of query.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    AlertingRuleIds []string
    CurrentPhase string
    The status of the vmp alert.
    Desc bool
    Ids []string
    Level string
    The level of the vmp alerting rule.
    OutputFile string
    alerts List<GetAlertsAlert>
    The collection of query.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Integer
    The total count of query.
    alertingRuleIds List<String>
    currentPhase String
    The status of the vmp alert.
    desc Boolean
    ids List<String>
    level String
    The level of the vmp alerting rule.
    outputFile String
    alerts GetAlertsAlert[]
    The collection of query.
    id string
    The provider-assigned unique ID for this managed resource.
    totalCount number
    The total count of query.
    alertingRuleIds string[]
    currentPhase string
    The status of the vmp alert.
    desc boolean
    ids string[]
    level string
    The level of the vmp alerting rule.
    outputFile string
    alerts Sequence[GetAlertsAlert]
    The collection of query.
    id str
    The provider-assigned unique ID for this managed resource.
    total_count int
    The total count of query.
    alerting_rule_ids Sequence[str]
    current_phase str
    The status of the vmp alert.
    desc bool
    ids Sequence[str]
    level str
    The level of the vmp alerting rule.
    output_file str
    alerts List<Property Map>
    The collection of query.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Number
    The total count of query.
    alertingRuleIds List<String>
    currentPhase String
    The status of the vmp alert.
    desc Boolean
    ids List<String>
    level String
    The level of the vmp alerting rule.
    outputFile String

    Supporting Types

    GetAlertsAlert

    AlertingRuleId string
    The id of the vmp alerting rule.
    AlertingRuleQueries List<GetAlertsAlertAlertingRuleQuery>
    The alerting query of the vmp alerting rule.
    AlertingRuleType string
    The type of the vmp alerting rule.
    CurrentLevel string
    The current level of the vmp alert.
    CurrentPhase string
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    Id string
    The id of the vmp alert.
    InitialAlertTimestamp string
    The start time of the vmp alert. Format: RFC3339.
    LastAlertTimestamp string
    The last time of the vmp alert. Format: RFC3339.
    Levels List<GetAlertsAlertLevel>
    The alerting levels of the vmp alert.
    ResolveAlertTimestamp string
    The end time of the vmp alert. Format: RFC3339.
    Resources List<GetAlertsAlertResource>
    The alerting resource of the vmp alert.
    AlertingRuleId string
    The id of the vmp alerting rule.
    AlertingRuleQueries []GetAlertsAlertAlertingRuleQuery
    The alerting query of the vmp alerting rule.
    AlertingRuleType string
    The type of the vmp alerting rule.
    CurrentLevel string
    The current level of the vmp alert.
    CurrentPhase string
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    Id string
    The id of the vmp alert.
    InitialAlertTimestamp string
    The start time of the vmp alert. Format: RFC3339.
    LastAlertTimestamp string
    The last time of the vmp alert. Format: RFC3339.
    Levels []GetAlertsAlertLevel
    The alerting levels of the vmp alert.
    ResolveAlertTimestamp string
    The end time of the vmp alert. Format: RFC3339.
    Resources []GetAlertsAlertResource
    The alerting resource of the vmp alert.
    alertingRuleId String
    The id of the vmp alerting rule.
    alertingRuleQueries List<GetAlertsAlertAlertingRuleQuery>
    The alerting query of the vmp alerting rule.
    alertingRuleType String
    The type of the vmp alerting rule.
    currentLevel String
    The current level of the vmp alert.
    currentPhase String
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    id String
    The id of the vmp alert.
    initialAlertTimestamp String
    The start time of the vmp alert. Format: RFC3339.
    lastAlertTimestamp String
    The last time of the vmp alert. Format: RFC3339.
    levels List<GetAlertsAlertLevel>
    The alerting levels of the vmp alert.
    resolveAlertTimestamp String
    The end time of the vmp alert. Format: RFC3339.
    resources List<GetAlertsAlertResource>
    The alerting resource of the vmp alert.
    alertingRuleId string
    The id of the vmp alerting rule.
    alertingRuleQueries GetAlertsAlertAlertingRuleQuery[]
    The alerting query of the vmp alerting rule.
    alertingRuleType string
    The type of the vmp alerting rule.
    currentLevel string
    The current level of the vmp alert.
    currentPhase string
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    id string
    The id of the vmp alert.
    initialAlertTimestamp string
    The start time of the vmp alert. Format: RFC3339.
    lastAlertTimestamp string
    The last time of the vmp alert. Format: RFC3339.
    levels GetAlertsAlertLevel[]
    The alerting levels of the vmp alert.
    resolveAlertTimestamp string
    The end time of the vmp alert. Format: RFC3339.
    resources GetAlertsAlertResource[]
    The alerting resource of the vmp alert.
    alerting_rule_id str
    The id of the vmp alerting rule.
    alerting_rule_queries Sequence[GetAlertsAlertAlertingRuleQuery]
    The alerting query of the vmp alerting rule.
    alerting_rule_type str
    The type of the vmp alerting rule.
    current_level str
    The current level of the vmp alert.
    current_phase str
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    id str
    The id of the vmp alert.
    initial_alert_timestamp str
    The start time of the vmp alert. Format: RFC3339.
    last_alert_timestamp str
    The last time of the vmp alert. Format: RFC3339.
    levels Sequence[GetAlertsAlertLevel]
    The alerting levels of the vmp alert.
    resolve_alert_timestamp str
    The end time of the vmp alert. Format: RFC3339.
    resources Sequence[GetAlertsAlertResource]
    The alerting resource of the vmp alert.
    alertingRuleId String
    The id of the vmp alerting rule.
    alertingRuleQueries List<Property Map>
    The alerting query of the vmp alerting rule.
    alertingRuleType String
    The type of the vmp alerting rule.
    currentLevel String
    The current level of the vmp alert.
    currentPhase String
    The status of vmp alert. Valid values: Pending, Active, Resolved, Disabled.
    id String
    The id of the vmp alert.
    initialAlertTimestamp String
    The start time of the vmp alert. Format: RFC3339.
    lastAlertTimestamp String
    The last time of the vmp alert. Format: RFC3339.
    levels List<Property Map>
    The alerting levels of the vmp alert.
    resolveAlertTimestamp String
    The end time of the vmp alert. Format: RFC3339.
    resources List<Property Map>
    The alerting resource of the vmp alert.

    GetAlertsAlertAlertingRuleQuery

    PromQl string
    The prom ql of query.
    WorkspaceId string
    The id of the workspace.
    PromQl string
    The prom ql of query.
    WorkspaceId string
    The id of the workspace.
    promQl String
    The prom ql of query.
    workspaceId String
    The id of the workspace.
    promQl string
    The prom ql of query.
    workspaceId string
    The id of the workspace.
    prom_ql str
    The prom ql of query.
    workspace_id str
    The id of the workspace.
    promQl String
    The prom ql of query.
    workspaceId String
    The id of the workspace.

    GetAlertsAlertLevel

    Comparator string
    The comparator of the vmp alerting rule.
    For string
    The duration of the alerting rule.
    Level string
    The level of vmp alert. Valid values: P0, P1, P2.
    Threshold double
    The threshold of the vmp alerting rule.
    Comparator string
    The comparator of the vmp alerting rule.
    For string
    The duration of the alerting rule.
    Level string
    The level of vmp alert. Valid values: P0, P1, P2.
    Threshold float64
    The threshold of the vmp alerting rule.
    comparator String
    The comparator of the vmp alerting rule.
    for_ String
    The duration of the alerting rule.
    level String
    The level of vmp alert. Valid values: P0, P1, P2.
    threshold Double
    The threshold of the vmp alerting rule.
    comparator string
    The comparator of the vmp alerting rule.
    for string
    The duration of the alerting rule.
    level string
    The level of vmp alert. Valid values: P0, P1, P2.
    threshold number
    The threshold of the vmp alerting rule.
    comparator str
    The comparator of the vmp alerting rule.
    for_ str
    The duration of the alerting rule.
    level str
    The level of vmp alert. Valid values: P0, P1, P2.
    threshold float
    The threshold of the vmp alerting rule.
    comparator String
    The comparator of the vmp alerting rule.
    for String
    The duration of the alerting rule.
    level String
    The level of vmp alert. Valid values: P0, P1, P2.
    threshold Number
    The threshold of the vmp alerting rule.

    GetAlertsAlertResource

    Labels List<GetAlertsAlertResourceLabel>
    The labels of alerting resource.
    Labels []GetAlertsAlertResourceLabel
    The labels of alerting resource.
    labels List<GetAlertsAlertResourceLabel>
    The labels of alerting resource.
    labels GetAlertsAlertResourceLabel[]
    The labels of alerting resource.
    labels Sequence[GetAlertsAlertResourceLabel]
    The labels of alerting resource.
    labels List<Property Map>
    The labels of alerting resource.

    GetAlertsAlertResourceLabel

    Key string
    The key of the label.
    Value string
    The value of the label.
    Key string
    The key of the label.
    Value string
    The value of the label.
    key String
    The key of the label.
    value String
    The value of the label.
    key string
    The key of the label.
    value string
    The value of the label.
    key str
    The key of the label.
    value str
    The value of the label.
    key String
    The key of the label.
    value String
    The value of the label.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine