logzio 1.26.0 published on Tuesday, Nov 4, 2025 by logzio
logzio.getUnifiedAlert
# 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 dictionaryThe following arguments are supported:
getUnifiedAlert Result
The following output properties are available:
- Created
At double - Unix timestamp of creation.
- Dashboard
Id string - Dashboard UID.
- Description string
- Alert description.
- Enabled bool
- Whether the alert is enabled.
- Folder
Id string - Folder UID.
- Id string
- Log
Alerts List<GetUnified Alert Log Alert> - Log alert configuration with all nested attributes as documented in the resource.
- Metric
Alerts List<GetUnified Alert Metric Alert> - Metric alert configuration with all nested attributes as documented in the resource.
- Panel
Id string - Panel ID.
- Rca bool
- Whether RCA is enabled.
- Rca
Notification List<double>Endpoint Ids - RCA notification endpoint IDs.
- Runbook string
- Runbook text.
- List<string>
- List of tags.
- Type string
- Alert type (
LOG_ALERTorMETRIC_ALERT). - Updated
At double - Unix timestamp of last update.
- Use
Alert boolNotification Endpoints For Rca - Whether to use alert endpoints for RCA.
- Alert
Id string - The unique alert identifier.
- Title string
- Alert name.
- Created
At float64 - Unix timestamp of creation.
- Dashboard
Id string - Dashboard UID.
- Description string
- Alert description.
- Enabled bool
- Whether the alert is enabled.
- Folder
Id string - Folder UID.
- Id string
- Log
Alerts []GetUnified Alert Log Alert - Log alert configuration with all nested attributes as documented in the resource.
- Metric
Alerts []GetUnified Alert Metric Alert - Metric alert configuration with all nested attributes as documented in the resource.
- Panel
Id string - Panel ID.
- Rca bool
- Whether RCA is enabled.
- Rca
Notification []float64Endpoint Ids - RCA notification endpoint IDs.
- Runbook string
- Runbook text.
- []string
- List of tags.
- Type string
- Alert type (
LOG_ALERTorMETRIC_ALERT). - Updated
At float64 - Unix timestamp of last update.
- Use
Alert boolNotification Endpoints For Rca - Whether to use alert endpoints for RCA.
- Alert
Id string - The unique alert identifier.
- Title string
- Alert name.
- created
At Double - Unix timestamp of creation.
- dashboard
Id String - Dashboard UID.
- description String
- Alert description.
- enabled Boolean
- Whether the alert is enabled.
- folder
Id String - Folder UID.
- id String
- log
Alerts List<GetUnified Alert Log Alert> - Log alert configuration with all nested attributes as documented in the resource.
- metric
Alerts List<GetUnified Alert Metric Alert> - Metric alert configuration with all nested attributes as documented in the resource.
- panel
Id String - Panel ID.
- rca Boolean
- Whether RCA is enabled.
- rca
Notification List<Double>Endpoint Ids - RCA notification endpoint IDs.
- runbook String
- Runbook text.
- List<String>
- List of tags.
- type String
- Alert type (
LOG_ALERTorMETRIC_ALERT). - updated
At Double - Unix timestamp of last update.
- use
Alert BooleanNotification Endpoints For Rca - Whether to use alert endpoints for RCA.
- alert
Id String - The unique alert identifier.
- title String
- Alert name.
- created
At number - Unix timestamp of creation.
- dashboard
Id string - Dashboard UID.
- description string
- Alert description.
- enabled boolean
- Whether the alert is enabled.
- folder
Id string - Folder UID.
- id string
- log
Alerts GetUnified Alert Log Alert[] - Log alert configuration with all nested attributes as documented in the resource.
- metric
Alerts GetUnified Alert Metric Alert[] - Metric alert configuration with all nested attributes as documented in the resource.
- panel
Id string - Panel ID.
- rca boolean
- Whether RCA is enabled.
- rca
Notification number[]Endpoint Ids - RCA notification endpoint IDs.
- runbook string
- Runbook text.
- string[]
- List of tags.
- type string
- Alert type (
LOG_ALERTorMETRIC_ALERT). - updated
At number - Unix timestamp of last update.
- use
Alert booleanNotification Endpoints For Rca - Whether to use alert endpoints for RCA.
- alert
Id 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[GetUnified Alert Log Alert] - Log alert configuration with all nested attributes as documented in the resource.
- metric_
alerts Sequence[GetUnified Alert Metric Alert] - 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_ Sequence[float]endpoint_ ids - RCA notification endpoint IDs.
- runbook str
- Runbook text.
- Sequence[str]
- List of tags.
- type str
- Alert type (
LOG_ALERTorMETRIC_ALERT). - updated_
at float - Unix timestamp of last update.
- use_
alert_ boolnotification_ endpoints_ for_ rca - Whether to use alert endpoints for RCA.
- alert_
id str - The unique alert identifier.
- title str
- Alert name.
- created
At Number - Unix timestamp of creation.
- dashboard
Id String - Dashboard UID.
- description String
- Alert description.
- enabled Boolean
- Whether the alert is enabled.
- folder
Id String - Folder UID.
- id String
- log
Alerts List<Property Map> - Log alert configuration with all nested attributes as documented in the resource.
- metric
Alerts List<Property Map> - Metric alert configuration with all nested attributes as documented in the resource.
- panel
Id String - Panel ID.
- rca Boolean
- Whether RCA is enabled.
- rca
Notification List<Number>Endpoint Ids - RCA notification endpoint IDs.
- runbook String
- Runbook text.
- List<String>
- List of tags.
- type String
- Alert type (
LOG_ALERTorMETRIC_ALERT). - updated
At Number - Unix timestamp of last update.
- use
Alert BooleanNotification Endpoints For Rca - Whether to use alert endpoints for RCA.
- alert
Id String - The unique alert identifier.
- title String
- Alert name.
Supporting Types
GetUnifiedAlertLogAlert
GetUnifiedAlertLogAlertCorrelation
- Correlation
Operators List<string> - Joins
List<Immutable
Dictionary<string, string>>
- Correlation
Operators []string - Joins []map[string]string
- correlation
Operators List<String> - joins List<Map<String,String>>
- correlation
Operators string[] - joins {[key: string]: string}[]
- correlation_
operators Sequence[str] - joins Sequence[Mapping[str, str]]
- correlation
Operators List<String> - joins List<Map<String>>
GetUnifiedAlertLogAlertOutput
- Recipients
List<Get
Unified Alert Log Alert Output Recipient> - Suppress
Notifications doubleMinutes - Type string
- Alert type. Must be either
LOG_ALERTorMETRIC_ALERT.
- Recipients
[]Get
Unified Alert Log Alert Output Recipient - Suppress
Notifications float64Minutes - Type string
- Alert type. Must be either
LOG_ALERTorMETRIC_ALERT.
- recipients
List<Get
Unified Alert Log Alert Output Recipient> - suppress
Notifications DoubleMinutes - type String
- Alert type. Must be either
LOG_ALERTorMETRIC_ALERT.
- recipients
Get
Unified Alert Log Alert Output Recipient[] - suppress
Notifications numberMinutes - type string
- Alert type. Must be either
LOG_ALERTorMETRIC_ALERT.
- recipients
Sequence[Get
Unified Alert Log Alert Output Recipient] - suppress_
notifications_ floatminutes - type str
- Alert type. Must be either
LOG_ALERTorMETRIC_ALERT.
- recipients List<Property Map>
- suppress
Notifications NumberMinutes - type String
- Alert type. Must be either
LOG_ALERTorMETRIC_ALERT.
GetUnifiedAlertLogAlertOutputRecipient
- Emails List<string>
- Notification
Endpoint List<double>Ids
- Emails []string
- Notification
Endpoint []float64Ids
- emails List<String>
- notification
Endpoint List<Double>Ids
- emails string[]
- notification
Endpoint number[]Ids
- emails Sequence[str]
- notification_
endpoint_ Sequence[float]ids
- emails List<String>
- notification
Endpoint List<Number>Ids
GetUnifiedAlertLogAlertSchedule
- Cron
Expression string - Timezone string
- Cron
Expression string - Timezone string
- cron
Expression String - timezone String
- cron
Expression string - timezone string
- cron_
expression str - timezone str
- cron
Expression String - timezone String
GetUnifiedAlertLogAlertSubComponent
GetUnifiedAlertLogAlertSubComponentOutput
GetUnifiedAlertLogAlertSubComponentOutputColumn
- field_
name str - regex str
- sort str
GetUnifiedAlertLogAlertSubComponentQueryDefinition
- Account
Ids List<double>To Query Ons - Aggregations
List<Get
Unified Alert Log Alert Sub Component Query Definition Aggregation> - Filters string
- Group
Bies List<string> - Query string
- Should
Query boolOn All Accounts
- Account
Ids []float64To Query Ons - Aggregations
[]Get
Unified Alert Log Alert Sub Component Query Definition Aggregation - Filters string
- Group
Bies []string - Query string
- Should
Query boolOn All Accounts
- account
Ids List<Double>To Query Ons - aggregations
List<Get
Unified Alert Log Alert Sub Component Query Definition Aggregation> - filters String
- group
Bies List<String> - query String
- should
Query BooleanOn All Accounts
- account
Ids number[]To Query Ons - aggregations
Get
Unified Alert Log Alert Sub Component Query Definition Aggregation[] - filters string
- group
Bies string[] - query string
- should
Query booleanOn All Accounts
- account_
ids_ Sequence[float]to_ query_ ons - aggregations
Sequence[Get
Unified Alert Log Alert Sub Component Query Definition Aggregation] - filters str
- group_
bies Sequence[str] - query str
- should_
query_ boolon_ all_ accounts
- account
Ids List<Number>To Query Ons - aggregations List<Property Map>
- filters String
- group
Bies List<String> - query String
- should
Query BooleanOn All Accounts
GetUnifiedAlertLogAlertSubComponentQueryDefinitionAggregation
- Aggregation
Type string - Field
To stringAggregate On - Value
To stringAggregate On
- Aggregation
Type string - Field
To stringAggregate On - Value
To stringAggregate On
- aggregation
Type String - field
To StringAggregate On - value
To StringAggregate On
- aggregation
Type string - field
To stringAggregate On - value
To stringAggregate On
- aggregation
Type String - field
To StringAggregate On - value
To StringAggregate On
GetUnifiedAlertLogAlertSubComponentTrigger
GetUnifiedAlertLogAlertSubComponentTriggerSeverityThresholdTier
GetUnifiedAlertMetricAlert
GetUnifiedAlertMetricAlertQuery
GetUnifiedAlertMetricAlertQueryQueryDefinition
- Datasource
Uid string - Promql
Query string
- Datasource
Uid string - Promql
Query string
- datasource
Uid String - promql
Query String
- datasource
Uid string - promql
Query string
- datasource_
uid str - promql_
query str
- datasource
Uid String - promql
Query String
GetUnifiedAlertMetricAlertRecipient
- Emails List<string>
- Notification
Endpoint List<double>Ids
- Emails []string
- Notification
Endpoint []float64Ids
- emails List<String>
- notification
Endpoint List<Double>Ids
- emails string[]
- notification
Endpoint number[]Ids
- emails Sequence[str]
- notification_
endpoint_ Sequence[float]ids
- emails List<String>
- notification
Endpoint List<Number>Ids
GetUnifiedAlertMetricAlertTrigger
- Math
Expression string - Max
Threshold double - Metric
Operator string - Min
Threshold double - Search
Timeframe doubleMinutes - Trigger
Type string
- Math
Expression string - Max
Threshold float64 - Metric
Operator string - Min
Threshold float64 - Search
Timeframe float64Minutes - Trigger
Type string
- math
Expression String - max
Threshold Double - metric
Operator String - min
Threshold Double - search
Timeframe DoubleMinutes - trigger
Type String
- math
Expression string - max
Threshold number - metric
Operator string - min
Threshold number - search
Timeframe numberMinutes - trigger
Type string
- math_
expression str - max_
threshold float - metric_
operator str - min_
threshold float - search_
timeframe_ floatminutes - trigger_
type str
- math
Expression String - max
Threshold Number - metric
Operator String - min
Threshold Number - search
Timeframe NumberMinutes - trigger
Type String
Package Details
- Repository
- logzio logzio/terraform-provider-logzio
- License
- Notes
- This Pulumi package is based on the
logzioTerraform Provider.
