1. Packages
  2. Logzio Provider
  3. API Docs
  4. getUnifiedAlert
logzio 1.26.0 published on Tuesday, Nov 4, 2025 by logzio

logzio.getUnifiedAlert

Start a Neo task
Explain and create a logzio.getUnifiedAlert resource
logzio logo
logzio 1.26.0 published on Tuesday, Nov 4, 2025 by logzio

    # Unified Alert Data Source

    Use this data source to access information about an existing Logz.io unified alert.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as logzio from "@pulumi/logzio";
    
    const logAlertById = logzio.getUnifiedAlert({
        type: "LOG_ALERT",
        alertId: "alert-123",
    });
    const metricAlertById = logzio.getUnifiedAlert({
        type: "METRIC_ALERT",
        alertId: "alert-456",
    });
    export const alertTitle = logAlertById.then(logAlertById => logAlertById.title);
    export const alertEnabled = logAlertById.then(logAlertById => logAlertById.enabled);
    
    import pulumi
    import pulumi_logzio as logzio
    
    log_alert_by_id = logzio.get_unified_alert(type="LOG_ALERT",
        alert_id="alert-123")
    metric_alert_by_id = logzio.get_unified_alert(type="METRIC_ALERT",
        alert_id="alert-456")
    pulumi.export("alertTitle", log_alert_by_id.title)
    pulumi.export("alertEnabled", log_alert_by_id.enabled)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logzio/logzio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		logAlertById, err := logzio.LookupUnifiedAlert(ctx, &logzio.LookupUnifiedAlertArgs{
    			Type:    "LOG_ALERT",
    			AlertId: pulumi.StringRef("alert-123"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = logzio.LookupUnifiedAlert(ctx, &logzio.LookupUnifiedAlertArgs{
    			Type:    "METRIC_ALERT",
    			AlertId: pulumi.StringRef("alert-456"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("alertTitle", logAlertById.Title)
    		ctx.Export("alertEnabled", logAlertById.Enabled)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logzio = Pulumi.Logzio;
    
    return await Deployment.RunAsync(() => 
    {
        var logAlertById = Logzio.GetUnifiedAlert.Invoke(new()
        {
            Type = "LOG_ALERT",
            AlertId = "alert-123",
        });
    
        var metricAlertById = Logzio.GetUnifiedAlert.Invoke(new()
        {
            Type = "METRIC_ALERT",
            AlertId = "alert-456",
        });
    
        return new Dictionary<string, object?>
        {
            ["alertTitle"] = logAlertById.Apply(getUnifiedAlertResult => getUnifiedAlertResult.Title),
            ["alertEnabled"] = logAlertById.Apply(getUnifiedAlertResult => getUnifiedAlertResult.Enabled),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logzio.LogzioFunctions;
    import com.pulumi.logzio.inputs.GetUnifiedAlertArgs;
    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 logAlertById = LogzioFunctions.getUnifiedAlert(GetUnifiedAlertArgs.builder()
                .type("LOG_ALERT")
                .alertId("alert-123")
                .build());
    
            final var metricAlertById = LogzioFunctions.getUnifiedAlert(GetUnifiedAlertArgs.builder()
                .type("METRIC_ALERT")
                .alertId("alert-456")
                .build());
    
            ctx.export("alertTitle", logAlertById.applyValue(getUnifiedAlertResult -> getUnifiedAlertResult.title()));
            ctx.export("alertEnabled", logAlertById.applyValue(getUnifiedAlertResult -> getUnifiedAlertResult.enabled()));
        }
    }
    
    variables:
      logAlertById:
        fn::invoke:
          function: logzio:getUnifiedAlert
          arguments:
            type: LOG_ALERT
            alertId: alert-123
      metricAlertById:
        fn::invoke:
          function: logzio:getUnifiedAlert
          arguments:
            type: METRIC_ALERT
            alertId: alert-456
    outputs:
      # Use the data source outputs
      alertTitle: ${logAlertById.title}
      alertEnabled: ${logAlertById.enabled}
    

    Using getUnifiedAlert

    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 getUnifiedAlert(args: GetUnifiedAlertArgs, opts?: InvokeOptions): Promise<GetUnifiedAlertResult>
    function getUnifiedAlertOutput(args: GetUnifiedAlertOutputArgs, opts?: InvokeOptions): Output<GetUnifiedAlertResult>
    def get_unified_alert(alert_id: Optional[str] = None,
                          id: Optional[str] = None,
                          title: Optional[str] = None,
                          type: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetUnifiedAlertResult
    def get_unified_alert_output(alert_id: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          title: Optional[pulumi.Input[str]] = None,
                          type: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetUnifiedAlertResult]
    func LookupUnifiedAlert(ctx *Context, args *LookupUnifiedAlertArgs, opts ...InvokeOption) (*LookupUnifiedAlertResult, error)
    func LookupUnifiedAlertOutput(ctx *Context, args *LookupUnifiedAlertOutputArgs, opts ...InvokeOption) LookupUnifiedAlertResultOutput

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

    public static class GetUnifiedAlert 
    {
        public static Task<GetUnifiedAlertResult> InvokeAsync(GetUnifiedAlertArgs args, InvokeOptions? opts = null)
        public static Output<GetUnifiedAlertResult> Invoke(GetUnifiedAlertInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUnifiedAlertResult> getUnifiedAlert(GetUnifiedAlertArgs args, InvokeOptions options)
    public static Output<GetUnifiedAlertResult> getUnifiedAlert(GetUnifiedAlertArgs args, InvokeOptions options)
    
    fn::invoke:
      function: logzio:index/getUnifiedAlert:getUnifiedAlert
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Type string
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    AlertId string

    The unique alert identifier.

    Note: Lookup by title is not currently supported. Use alert_id to retrieve specific alerts.

    Id string
    Title string
    Alert name.
    Type string
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    AlertId string

    The unique alert identifier.

    Note: Lookup by title is not currently supported. Use alert_id to retrieve specific alerts.

    Id string
    Title string
    Alert name.
    type String
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    alertId String

    The unique alert identifier.

    Note: Lookup by title is not currently supported. Use alert_id to retrieve specific alerts.

    id String
    title String
    Alert name.
    type string
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    alertId string

    The unique alert identifier.

    Note: Lookup by title is not currently supported. Use alert_id to retrieve specific alerts.

    id string
    title string
    Alert name.
    type str
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    alert_id str

    The unique alert identifier.

    Note: Lookup by title is not currently supported. Use alert_id to retrieve specific alerts.

    id str
    title str
    Alert name.
    type String
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    alertId String

    The unique alert identifier.

    Note: Lookup by title is not currently supported. Use alert_id to retrieve specific alerts.

    id String
    title String
    Alert name.

    getUnifiedAlert Result

    The following output properties are available:

    CreatedAt double
    Unix timestamp of creation.
    DashboardId string
    Dashboard UID.
    Description string
    Alert description.
    Enabled bool
    Whether the alert is enabled.
    FolderId string
    Folder UID.
    Id string
    LogAlerts List<GetUnifiedAlertLogAlert>
    Log alert configuration with all nested attributes as documented in the resource.
    MetricAlerts List<GetUnifiedAlertMetricAlert>
    Metric alert configuration with all nested attributes as documented in the resource.
    PanelId string
    Panel ID.
    Rca bool
    Whether RCA is enabled.
    RcaNotificationEndpointIds List<double>
    RCA notification endpoint IDs.
    Runbook string
    Runbook text.
    Tags List<string>
    List of tags.
    Type string
    Alert type (LOG_ALERT or METRIC_ALERT).
    UpdatedAt double
    Unix timestamp of last update.
    UseAlertNotificationEndpointsForRca bool
    Whether to use alert endpoints for RCA.
    AlertId string
    The unique alert identifier.
    Title string
    Alert name.
    CreatedAt float64
    Unix timestamp of creation.
    DashboardId string
    Dashboard UID.
    Description string
    Alert description.
    Enabled bool
    Whether the alert is enabled.
    FolderId string
    Folder UID.
    Id string
    LogAlerts []GetUnifiedAlertLogAlert
    Log alert configuration with all nested attributes as documented in the resource.
    MetricAlerts []GetUnifiedAlertMetricAlert
    Metric alert configuration with all nested attributes as documented in the resource.
    PanelId string
    Panel ID.
    Rca bool
    Whether RCA is enabled.
    RcaNotificationEndpointIds []float64
    RCA notification endpoint IDs.
    Runbook string
    Runbook text.
    Tags []string
    List of tags.
    Type string
    Alert type (LOG_ALERT or METRIC_ALERT).
    UpdatedAt float64
    Unix timestamp of last update.
    UseAlertNotificationEndpointsForRca bool
    Whether to use alert endpoints for RCA.
    AlertId string
    The unique alert identifier.
    Title string
    Alert name.
    createdAt Double
    Unix timestamp of creation.
    dashboardId String
    Dashboard UID.
    description String
    Alert description.
    enabled Boolean
    Whether the alert is enabled.
    folderId String
    Folder UID.
    id String
    logAlerts List<GetUnifiedAlertLogAlert>
    Log alert configuration with all nested attributes as documented in the resource.
    metricAlerts List<GetUnifiedAlertMetricAlert>
    Metric alert configuration with all nested attributes as documented in the resource.
    panelId String
    Panel ID.
    rca Boolean
    Whether RCA is enabled.
    rcaNotificationEndpointIds List<Double>
    RCA notification endpoint IDs.
    runbook String
    Runbook text.
    tags List<String>
    List of tags.
    type String
    Alert type (LOG_ALERT or METRIC_ALERT).
    updatedAt Double
    Unix timestamp of last update.
    useAlertNotificationEndpointsForRca Boolean
    Whether to use alert endpoints for RCA.
    alertId String
    The unique alert identifier.
    title String
    Alert name.
    createdAt number
    Unix timestamp of creation.
    dashboardId string
    Dashboard UID.
    description string
    Alert description.
    enabled boolean
    Whether the alert is enabled.
    folderId string
    Folder UID.
    id string
    logAlerts GetUnifiedAlertLogAlert[]
    Log alert configuration with all nested attributes as documented in the resource.
    metricAlerts GetUnifiedAlertMetricAlert[]
    Metric alert configuration with all nested attributes as documented in the resource.
    panelId string
    Panel ID.
    rca boolean
    Whether RCA is enabled.
    rcaNotificationEndpointIds number[]
    RCA notification endpoint IDs.
    runbook string
    Runbook text.
    tags string[]
    List of tags.
    type string
    Alert type (LOG_ALERT or METRIC_ALERT).
    updatedAt number
    Unix timestamp of last update.
    useAlertNotificationEndpointsForRca boolean
    Whether to use alert endpoints for RCA.
    alertId string
    The unique alert identifier.
    title string
    Alert name.
    created_at float
    Unix timestamp of creation.
    dashboard_id str
    Dashboard UID.
    description str
    Alert description.
    enabled bool
    Whether the alert is enabled.
    folder_id str
    Folder UID.
    id str
    log_alerts Sequence[GetUnifiedAlertLogAlert]
    Log alert configuration with all nested attributes as documented in the resource.
    metric_alerts Sequence[GetUnifiedAlertMetricAlert]
    Metric alert configuration with all nested attributes as documented in the resource.
    panel_id str
    Panel ID.
    rca bool
    Whether RCA is enabled.
    rca_notification_endpoint_ids Sequence[float]
    RCA notification endpoint IDs.
    runbook str
    Runbook text.
    tags Sequence[str]
    List of tags.
    type str
    Alert type (LOG_ALERT or METRIC_ALERT).
    updated_at float
    Unix timestamp of last update.
    use_alert_notification_endpoints_for_rca bool
    Whether to use alert endpoints for RCA.
    alert_id str
    The unique alert identifier.
    title str
    Alert name.
    createdAt Number
    Unix timestamp of creation.
    dashboardId String
    Dashboard UID.
    description String
    Alert description.
    enabled Boolean
    Whether the alert is enabled.
    folderId String
    Folder UID.
    id String
    logAlerts List<Property Map>
    Log alert configuration with all nested attributes as documented in the resource.
    metricAlerts List<Property Map>
    Metric alert configuration with all nested attributes as documented in the resource.
    panelId String
    Panel ID.
    rca Boolean
    Whether RCA is enabled.
    rcaNotificationEndpointIds List<Number>
    RCA notification endpoint IDs.
    runbook String
    Runbook text.
    tags List<String>
    List of tags.
    type String
    Alert type (LOG_ALERT or METRIC_ALERT).
    updatedAt Number
    Unix timestamp of last update.
    useAlertNotificationEndpointsForRca Boolean
    Whether to use alert endpoints for RCA.
    alertId String
    The unique alert identifier.
    title String
    Alert name.

    Supporting Types

    GetUnifiedAlertLogAlert

    GetUnifiedAlertLogAlertCorrelation

    CorrelationOperators List<string>
    Joins List<ImmutableDictionary<string, string>>
    CorrelationOperators []string
    Joins []map[string]string
    correlationOperators List<String>
    joins List<Map<String,String>>
    correlationOperators string[]
    joins {[key: string]: string}[]
    correlation_operators Sequence[str]
    joins Sequence[Mapping[str, str]]
    correlationOperators List<String>
    joins List<Map<String>>

    GetUnifiedAlertLogAlertOutput

    Recipients List<GetUnifiedAlertLogAlertOutputRecipient>
    SuppressNotificationsMinutes double
    Type string
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    Recipients []GetUnifiedAlertLogAlertOutputRecipient
    SuppressNotificationsMinutes float64
    Type string
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    recipients List<GetUnifiedAlertLogAlertOutputRecipient>
    suppressNotificationsMinutes Double
    type String
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    recipients GetUnifiedAlertLogAlertOutputRecipient[]
    suppressNotificationsMinutes number
    type string
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    recipients Sequence[GetUnifiedAlertLogAlertOutputRecipient]
    suppress_notifications_minutes float
    type str
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.
    recipients List<Property Map>
    suppressNotificationsMinutes Number
    type String
    Alert type. Must be either LOG_ALERT or METRIC_ALERT.

    GetUnifiedAlertLogAlertOutputRecipient

    Emails List<string>
    NotificationEndpointIds List<double>
    emails List<String>
    notificationEndpointIds List<Double>
    emails Sequence[str]
    notification_endpoint_ids Sequence[float]
    emails List<String>
    notificationEndpointIds List<Number>

    GetUnifiedAlertLogAlertSchedule

    GetUnifiedAlertLogAlertSubComponent

    GetUnifiedAlertLogAlertSubComponentOutput

    GetUnifiedAlertLogAlertSubComponentOutputColumn

    FieldName string
    Regex string
    Sort string
    FieldName string
    Regex string
    Sort string
    fieldName String
    regex String
    sort String
    fieldName string
    regex string
    sort string
    fieldName String
    regex String
    sort String

    GetUnifiedAlertLogAlertSubComponentQueryDefinition

    GetUnifiedAlertLogAlertSubComponentQueryDefinitionAggregation

    GetUnifiedAlertLogAlertSubComponentTrigger

    GetUnifiedAlertLogAlertSubComponentTriggerSeverityThresholdTier

    Severity string
    Threshold double
    Severity string
    Threshold float64
    severity String
    threshold Double
    severity string
    threshold number
    severity String
    threshold Number

    GetUnifiedAlertMetricAlert

    GetUnifiedAlertMetricAlertQuery

    GetUnifiedAlertMetricAlertQueryQueryDefinition

    GetUnifiedAlertMetricAlertRecipient

    Emails List<string>
    NotificationEndpointIds List<double>
    emails List<String>
    notificationEndpointIds List<Double>
    emails Sequence[str]
    notification_endpoint_ids Sequence[float]
    emails List<String>
    notificationEndpointIds List<Number>

    GetUnifiedAlertMetricAlertTrigger

    Package Details

    Repository
    logzio logzio/terraform-provider-logzio
    License
    Notes
    This Pulumi package is based on the logzio Terraform Provider.
    logzio logo
    logzio 1.26.0 published on Tuesday, Nov 4, 2025 by logzio
      Meet Neo: Your AI Platform Teammate