1. Packages
  2. Logzio Provider
  3. API Docs
  4. getUnifiedAlert
logzio 1.27.0 published on Thursday, Feb 19, 2026 by logzio
logzio logo
logzio 1.27.0 published on Thursday, Feb 19, 2026 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";
    
    // Lookup log alert by ID
    const logAlertById = logzio.getUnifiedAlert({
        type: "LOG_ALERT",
        alertId: "alert-123",
    });
    // Lookup metric alert by ID
    const metricAlertById = logzio.getUnifiedAlert({
        type: "METRIC_ALERT",
        alertId: "alert-456",
    });
    // Reference from a managed resource
    const fromResource = logzio.getUnifiedAlert({
        type: "LOG_ALERT",
        alertId: myLogAlert.alertId,
    });
    export const alertTitle = logAlertById.then(logAlertById => logAlertById.title);
    export const alertEnabled = logAlertById.then(logAlertById => logAlertById.enabled);
    export const metricSeverity = metricAlertById.then(metricAlertById => metricAlertById.alertConfigurations?.[0]?.severity);
    
    import pulumi
    import pulumi_logzio as logzio
    
    # Lookup log alert by ID
    log_alert_by_id = logzio.get_unified_alert(type="LOG_ALERT",
        alert_id="alert-123")
    # Lookup metric alert by ID
    metric_alert_by_id = logzio.get_unified_alert(type="METRIC_ALERT",
        alert_id="alert-456")
    # Reference from a managed resource
    from_resource = logzio.get_unified_alert(type="LOG_ALERT",
        alert_id=my_log_alert["alertId"])
    pulumi.export("alertTitle", log_alert_by_id.title)
    pulumi.export("alertEnabled", log_alert_by_id.enabled)
    pulumi.export("metricSeverity", metric_alert_by_id.alert_configurations[0].severity)
    
    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 {
    		// Lookup log alert by ID
    		logAlertById, err := logzio.LookupUnifiedAlert(ctx, &logzio.LookupUnifiedAlertArgs{
    			Type:    "LOG_ALERT",
    			AlertId: "alert-123",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Lookup metric alert by ID
    		metricAlertById, err := logzio.LookupUnifiedAlert(ctx, &logzio.LookupUnifiedAlertArgs{
    			Type:    "METRIC_ALERT",
    			AlertId: "alert-456",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Reference from a managed resource
    		_, err = logzio.LookupUnifiedAlert(ctx, &logzio.LookupUnifiedAlertArgs{
    			Type:    "LOG_ALERT",
    			AlertId: myLogAlert.AlertId,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("alertTitle", logAlertById.Title)
    		ctx.Export("alertEnabled", logAlertById.Enabled)
    		ctx.Export("metricSeverity", metricAlertById.AlertConfigurations[0].Severity)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logzio = Pulumi.Logzio;
    
    return await Deployment.RunAsync(() => 
    {
        // Lookup log alert by ID
        var logAlertById = Logzio.GetUnifiedAlert.Invoke(new()
        {
            Type = "LOG_ALERT",
            AlertId = "alert-123",
        });
    
        // Lookup metric alert by ID
        var metricAlertById = Logzio.GetUnifiedAlert.Invoke(new()
        {
            Type = "METRIC_ALERT",
            AlertId = "alert-456",
        });
    
        // Reference from a managed resource
        var fromResource = Logzio.GetUnifiedAlert.Invoke(new()
        {
            Type = "LOG_ALERT",
            AlertId = myLogAlert.AlertId,
        });
    
        return new Dictionary<string, object?>
        {
            ["alertTitle"] = logAlertById.Apply(getUnifiedAlertResult => getUnifiedAlertResult.Title),
            ["alertEnabled"] = logAlertById.Apply(getUnifiedAlertResult => getUnifiedAlertResult.Enabled),
            ["metricSeverity"] = metricAlertById.Apply(getUnifiedAlertResult => getUnifiedAlertResult.AlertConfigurations[0]?.Severity),
        };
    });
    
    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) {
            // Lookup log alert by ID
            final var logAlertById = LogzioFunctions.getUnifiedAlert(GetUnifiedAlertArgs.builder()
                .type("LOG_ALERT")
                .alertId("alert-123")
                .build());
    
            // Lookup metric alert by ID
            final var metricAlertById = LogzioFunctions.getUnifiedAlert(GetUnifiedAlertArgs.builder()
                .type("METRIC_ALERT")
                .alertId("alert-456")
                .build());
    
            // Reference from a managed resource
            final var fromResource = LogzioFunctions.getUnifiedAlert(GetUnifiedAlertArgs.builder()
                .type("LOG_ALERT")
                .alertId(myLogAlert.alertId())
                .build());
    
            ctx.export("alertTitle", logAlertById.title());
            ctx.export("alertEnabled", logAlertById.enabled());
            ctx.export("metricSeverity", metricAlertById.alertConfigurations()[0].severity());
        }
    }
    
    variables:
      # Lookup log alert by ID
      logAlertById:
        fn::invoke:
          function: logzio:getUnifiedAlert
          arguments:
            type: LOG_ALERT
            alertId: alert-123
      # Lookup metric alert by ID
      metricAlertById:
        fn::invoke:
          function: logzio:getUnifiedAlert
          arguments:
            type: METRIC_ALERT
            alertId: alert-456
      # Reference from a managed resource
      fromResource:
        fn::invoke:
          function: logzio:getUnifiedAlert
          arguments:
            type: LOG_ALERT
            alertId: ${myLogAlert.alertId}
    outputs:
      # Use the data source outputs
      alertTitle: ${logAlertById.title}
      alertEnabled: ${logAlertById.enabled}
      metricSeverity: ${metricAlertById.alertConfigurations[0].severity}
    

    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,
                          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,
                          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:

    AlertId string
    The unique alert identifier.
    Type string
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    Id string
    AlertId string
    The unique alert identifier.
    Type string
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    Id string
    alertId String
    The unique alert identifier.
    type String
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    id String
    alertId string
    The unique alert identifier.
    type string
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    id string
    alert_id str
    The unique alert identifier.
    type str
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    id str
    alertId String
    The unique alert identifier.
    type String
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    id String

    getUnifiedAlert Result

    The following output properties are available:

    AlertConfigurations List<GetUnifiedAlertAlertConfiguration>
    The alert configuration block. See the resource documentation for full details.
    AlertId string
    The unique alert identifier.
    CreatedAt double
    Unix timestamp of creation.
    CreatedBy string
    Email of the user who created the alert.
    Description string
    Alert description.
    Enabled bool
    Whether the alert is enabled.
    Id string
    LinkedPanels List<GetUnifiedAlertLinkedPanel>
    Dashboard panel link with folder_id, dashboard_id, panel_id.
    Rca bool
    Whether RCA is enabled.
    RcaNotificationEndpointIds List<double>
    RCA notification endpoint IDs.
    Recipients List<GetUnifiedAlertRecipient>
    Notification recipients with emails and notification_endpoint_ids.
    Runbook string
    Runbook text.
    Tags List<string>
    Set of tags.
    Title string
    Alert name.
    Type string
    UpdatedAt double
    Unix timestamp of last update.
    UpdatedBy string
    Email of the user who last updated the alert.
    UseAlertNotificationEndpointsForRca bool
    Whether to use alert endpoints for RCA.
    AlertConfigurations []GetUnifiedAlertAlertConfiguration
    The alert configuration block. See the resource documentation for full details.
    AlertId string
    The unique alert identifier.
    CreatedAt float64
    Unix timestamp of creation.
    CreatedBy string
    Email of the user who created the alert.
    Description string
    Alert description.
    Enabled bool
    Whether the alert is enabled.
    Id string
    LinkedPanels []GetUnifiedAlertLinkedPanel
    Dashboard panel link with folder_id, dashboard_id, panel_id.
    Rca bool
    Whether RCA is enabled.
    RcaNotificationEndpointIds []float64
    RCA notification endpoint IDs.
    Recipients []GetUnifiedAlertRecipient
    Notification recipients with emails and notification_endpoint_ids.
    Runbook string
    Runbook text.
    Tags []string
    Set of tags.
    Title string
    Alert name.
    Type string
    UpdatedAt float64
    Unix timestamp of last update.
    UpdatedBy string
    Email of the user who last updated the alert.
    UseAlertNotificationEndpointsForRca bool
    Whether to use alert endpoints for RCA.
    alertConfigurations List<GetUnifiedAlertAlertConfiguration>
    The alert configuration block. See the resource documentation for full details.
    alertId String
    The unique alert identifier.
    createdAt Double
    Unix timestamp of creation.
    createdBy String
    Email of the user who created the alert.
    description String
    Alert description.
    enabled Boolean
    Whether the alert is enabled.
    id String
    linkedPanels List<GetUnifiedAlertLinkedPanel>
    Dashboard panel link with folder_id, dashboard_id, panel_id.
    rca Boolean
    Whether RCA is enabled.
    rcaNotificationEndpointIds List<Double>
    RCA notification endpoint IDs.
    recipients List<GetUnifiedAlertRecipient>
    Notification recipients with emails and notification_endpoint_ids.
    runbook String
    Runbook text.
    tags List<String>
    Set of tags.
    title String
    Alert name.
    type String
    updatedAt Double
    Unix timestamp of last update.
    updatedBy String
    Email of the user who last updated the alert.
    useAlertNotificationEndpointsForRca Boolean
    Whether to use alert endpoints for RCA.
    alertConfigurations GetUnifiedAlertAlertConfiguration[]
    The alert configuration block. See the resource documentation for full details.
    alertId string
    The unique alert identifier.
    createdAt number
    Unix timestamp of creation.
    createdBy string
    Email of the user who created the alert.
    description string
    Alert description.
    enabled boolean
    Whether the alert is enabled.
    id string
    linkedPanels GetUnifiedAlertLinkedPanel[]
    Dashboard panel link with folder_id, dashboard_id, panel_id.
    rca boolean
    Whether RCA is enabled.
    rcaNotificationEndpointIds number[]
    RCA notification endpoint IDs.
    recipients GetUnifiedAlertRecipient[]
    Notification recipients with emails and notification_endpoint_ids.
    runbook string
    Runbook text.
    tags string[]
    Set of tags.
    title string
    Alert name.
    type string
    updatedAt number
    Unix timestamp of last update.
    updatedBy string
    Email of the user who last updated the alert.
    useAlertNotificationEndpointsForRca boolean
    Whether to use alert endpoints for RCA.
    alert_configurations Sequence[GetUnifiedAlertAlertConfiguration]
    The alert configuration block. See the resource documentation for full details.
    alert_id str
    The unique alert identifier.
    created_at float
    Unix timestamp of creation.
    created_by str
    Email of the user who created the alert.
    description str
    Alert description.
    enabled bool
    Whether the alert is enabled.
    id str
    linked_panels Sequence[GetUnifiedAlertLinkedPanel]
    Dashboard panel link with folder_id, dashboard_id, panel_id.
    rca bool
    Whether RCA is enabled.
    rca_notification_endpoint_ids Sequence[float]
    RCA notification endpoint IDs.
    recipients Sequence[GetUnifiedAlertRecipient]
    Notification recipients with emails and notification_endpoint_ids.
    runbook str
    Runbook text.
    tags Sequence[str]
    Set of tags.
    title str
    Alert name.
    type str
    updated_at float
    Unix timestamp of last update.
    updated_by str
    Email of the user who last updated the alert.
    use_alert_notification_endpoints_for_rca bool
    Whether to use alert endpoints for RCA.
    alertConfigurations List<Property Map>
    The alert configuration block. See the resource documentation for full details.
    alertId String
    The unique alert identifier.
    createdAt Number
    Unix timestamp of creation.
    createdBy String
    Email of the user who created the alert.
    description String
    Alert description.
    enabled Boolean
    Whether the alert is enabled.
    id String
    linkedPanels List<Property Map>
    Dashboard panel link with folder_id, dashboard_id, panel_id.
    rca Boolean
    Whether RCA is enabled.
    rcaNotificationEndpointIds List<Number>
    RCA notification endpoint IDs.
    recipients List<Property Map>
    Notification recipients with emails and notification_endpoint_ids.
    runbook String
    Runbook text.
    tags List<String>
    Set of tags.
    title String
    Alert name.
    type String
    updatedAt Number
    Unix timestamp of last update.
    updatedBy String
    Email of the user who last updated the alert.
    useAlertNotificationEndpointsForRca Boolean
    Whether to use alert endpoints for RCA.

    Supporting Types

    GetUnifiedAlertAlertConfiguration

    GetUnifiedAlertAlertConfigurationCorrelation

    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>>

    GetUnifiedAlertAlertConfigurationQuery

    GetUnifiedAlertAlertConfigurationQueryQueryDefinition

    AccountId double
    PromqlQuery string
    AccountId float64
    PromqlQuery string
    accountId Double
    promqlQuery String
    accountId number
    promqlQuery string
    accountId Number
    promqlQuery String

    GetUnifiedAlertAlertConfigurationSchedule

    GetUnifiedAlertAlertConfigurationSubComponent

    GetUnifiedAlertAlertConfigurationSubComponentOutput

    GetUnifiedAlertAlertConfigurationSubComponentOutputColumn

    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

    GetUnifiedAlertAlertConfigurationSubComponentQueryDefinition

    GetUnifiedAlertAlertConfigurationSubComponentQueryDefinitionAggregation

    GetUnifiedAlertAlertConfigurationSubComponentTrigger

    GetUnifiedAlertAlertConfigurationSubComponentTriggerSeverityThresholdTier

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

    GetUnifiedAlertAlertConfigurationTrigger

    Conditions List<GetUnifiedAlertAlertConfigurationTriggerCondition>
    Expression string
    Type string
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    Conditions []GetUnifiedAlertAlertConfigurationTriggerCondition
    Expression string
    Type string
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    conditions List<GetUnifiedAlertAlertConfigurationTriggerCondition>
    expression String
    type String
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    conditions GetUnifiedAlertAlertConfigurationTriggerCondition[]
    expression string
    type string
    Alert type. Must be LOG_ALERT or METRIC_ALERT.
    conditions List<Property Map>
    expression String
    type String
    Alert type. Must be LOG_ALERT or METRIC_ALERT.

    GetUnifiedAlertAlertConfigurationTriggerCondition

    From double
    OperatorType string
    Threshold double
    To double
    From float64
    OperatorType string
    Threshold float64
    To float64
    from Double
    operatorType String
    threshold Double
    to Double
    from number
    operatorType string
    threshold number
    to number
    from_ float
    operator_type str
    threshold float
    to float
    from Number
    operatorType String
    threshold Number
    to Number

    GetUnifiedAlertLinkedPanel

    DashboardId string
    FolderId string
    PanelId string
    DashboardId string
    FolderId string
    PanelId string
    dashboardId String
    folderId String
    panelId String
    dashboardId string
    folderId string
    panelId string
    dashboardId String
    folderId String
    panelId String

    GetUnifiedAlertRecipient

    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>

    Package Details

    Repository
    logzio logzio/terraform-provider-logzio
    License
    Notes
    This Pulumi package is based on the logzio Terraform Provider.
    logzio logo
    logzio 1.27.0 published on Thursday, Feb 19, 2026 by logzio
      Meet Neo: Your AI Platform Teammate