1. Packages
  2. Splight
  3. API Docs
  4. Alert
splight v0.1.24 published on Friday, Jun 28, 2024 by splightplatform

splight.Alert

Explore with Pulumi AI

splight logo
splight v0.1.24 published on Friday, Jun 28, 2024 by splightplatform

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as splight from "@splightplatform/pulumi-splight";
    
    const alertTest = new splight.Alert("alertTest", {
        description: "Created with Terraform",
        type: "rate",
        rateUnit: "minute",
        rateValue: 10,
        timeWindow: 600,
        thresholds: [{
            value: 4,
            status: "no_alert",
            statusText: "CustomStatusText",
        }],
        severity: "sev8",
        operator: "gt",
        aggregation: "avg",
        targetVariable: "A",
        alertItems: [
            {
                refId: "A",
                type: "QUERY",
                expressionPlain: "",
                queryPlain: JSON.stringify([{
                    $match: {
                        asset: "1234-1234-1234-1234",
                        attribute: "1234-1234-1234-1234",
                    },
                }]),
            },
            {
                refId: "B",
                type: "QUERY",
                expressionPlain: "",
                queryPlain: JSON.stringify([{
                    $match: {
                        asset: "1234-1234-1234-1234",
                        attribute: "1234-1234-1234-1234",
                    },
                }]),
            },
        ],
        relatedAssets: ["1234-1234-1234-1234"],
    });
    
    import pulumi
    import json
    import pulumi_splight as splight
    
    alert_test = splight.Alert("alertTest",
        description="Created with Terraform",
        type="rate",
        rate_unit="minute",
        rate_value=10,
        time_window=600,
        thresholds=[splight.AlertThresholdArgs(
            value=4,
            status="no_alert",
            status_text="CustomStatusText",
        )],
        severity="sev8",
        operator="gt",
        aggregation="avg",
        target_variable="A",
        alert_items=[
            splight.AlertAlertItemArgs(
                ref_id="A",
                type="QUERY",
                expression_plain="",
                query_plain=json.dumps([{
                    "$match": {
                        "asset": "1234-1234-1234-1234",
                        "attribute": "1234-1234-1234-1234",
                    },
                }]),
            ),
            splight.AlertAlertItemArgs(
                ref_id="B",
                type="QUERY",
                expression_plain="",
                query_plain=json.dumps([{
                    "$match": {
                        "asset": "1234-1234-1234-1234",
                        "attribute": "1234-1234-1234-1234",
                    },
                }]),
            ),
        ],
        related_assets=["1234-1234-1234-1234"])
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/splightplatform/pulumi-splight/sdk/go/splight"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal([]map[string]interface{}{
    			map[string]interface{}{
    				"$match": map[string]interface{}{
    					"asset":     "1234-1234-1234-1234",
    					"attribute": "1234-1234-1234-1234",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		tmpJSON1, err := json.Marshal([]map[string]interface{}{
    			map[string]interface{}{
    				"$match": map[string]interface{}{
    					"asset":     "1234-1234-1234-1234",
    					"attribute": "1234-1234-1234-1234",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json1 := string(tmpJSON1)
    		_, err = splight.NewAlert(ctx, "alertTest", &splight.AlertArgs{
    			Description: pulumi.String("Created with Terraform"),
    			Type:        pulumi.String("rate"),
    			RateUnit:    pulumi.String("minute"),
    			RateValue:   pulumi.Int(10),
    			TimeWindow:  pulumi.Int(600),
    			Thresholds: splight.AlertThresholdArray{
    				&splight.AlertThresholdArgs{
    					Value:      pulumi.Float64(4),
    					Status:     pulumi.String("no_alert"),
    					StatusText: pulumi.String("CustomStatusText"),
    				},
    			},
    			Severity:       pulumi.String("sev8"),
    			Operator:       pulumi.String("gt"),
    			Aggregation:    pulumi.String("avg"),
    			TargetVariable: pulumi.String("A"),
    			AlertItems: splight.AlertAlertItemArray{
    				&splight.AlertAlertItemArgs{
    					RefId:           pulumi.String("A"),
    					Type:            pulumi.String("QUERY"),
    					ExpressionPlain: pulumi.String(""),
    					QueryPlain:      pulumi.String(json0),
    				},
    				&splight.AlertAlertItemArgs{
    					RefId:           pulumi.String("B"),
    					Type:            pulumi.String("QUERY"),
    					ExpressionPlain: pulumi.String(""),
    					QueryPlain:      pulumi.String(json1),
    				},
    			},
    			RelatedAssets: pulumi.StringArray{
    				pulumi.String("1234-1234-1234-1234"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Splight = Splight.Splight;
    
    return await Deployment.RunAsync(() => 
    {
        var alertTest = new Splight.Alert("alertTest", new()
        {
            Description = "Created with Terraform",
            Type = "rate",
            RateUnit = "minute",
            RateValue = 10,
            TimeWindow = 600,
            Thresholds = new[]
            {
                new Splight.Inputs.AlertThresholdArgs
                {
                    Value = 4,
                    Status = "no_alert",
                    StatusText = "CustomStatusText",
                },
            },
            Severity = "sev8",
            Operator = "gt",
            Aggregation = "avg",
            TargetVariable = "A",
            AlertItems = new[]
            {
                new Splight.Inputs.AlertAlertItemArgs
                {
                    RefId = "A",
                    Type = "QUERY",
                    ExpressionPlain = "",
                    QueryPlain = JsonSerializer.Serialize(new[]
                    {
                        new Dictionary<string, object?>
                        {
                            ["$match"] = new Dictionary<string, object?>
                            {
                                ["asset"] = "1234-1234-1234-1234",
                                ["attribute"] = "1234-1234-1234-1234",
                            },
                        },
                    }),
                },
                new Splight.Inputs.AlertAlertItemArgs
                {
                    RefId = "B",
                    Type = "QUERY",
                    ExpressionPlain = "",
                    QueryPlain = JsonSerializer.Serialize(new[]
                    {
                        new Dictionary<string, object?>
                        {
                            ["$match"] = new Dictionary<string, object?>
                            {
                                ["asset"] = "1234-1234-1234-1234",
                                ["attribute"] = "1234-1234-1234-1234",
                            },
                        },
                    }),
                },
            },
            RelatedAssets = new[]
            {
                "1234-1234-1234-1234",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.splight.Alert;
    import com.pulumi.splight.AlertArgs;
    import com.pulumi.splight.inputs.AlertThresholdArgs;
    import com.pulumi.splight.inputs.AlertAlertItemArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            var alertTest = new Alert("alertTest", AlertArgs.builder()
                .description("Created with Terraform")
                .type("rate")
                .rateUnit("minute")
                .rateValue(10)
                .timeWindow(600)
                .thresholds(AlertThresholdArgs.builder()
                    .value(4)
                    .status("no_alert")
                    .statusText("CustomStatusText")
                    .build())
                .severity("sev8")
                .operator("gt")
                .aggregation("avg")
                .targetVariable("A")
                .alertItems(            
                    AlertAlertItemArgs.builder()
                        .refId("A")
                        .type("QUERY")
                        .expressionPlain("")
                        .queryPlain(serializeJson(
                            jsonArray(jsonObject(
                                jsonProperty("$match", jsonObject(
                                    jsonProperty("asset", "1234-1234-1234-1234"),
                                    jsonProperty("attribute", "1234-1234-1234-1234")
                                ))
                            ))))
                        .build(),
                    AlertAlertItemArgs.builder()
                        .refId("B")
                        .type("QUERY")
                        .expressionPlain("")
                        .queryPlain(serializeJson(
                            jsonArray(jsonObject(
                                jsonProperty("$match", jsonObject(
                                    jsonProperty("asset", "1234-1234-1234-1234"),
                                    jsonProperty("attribute", "1234-1234-1234-1234")
                                ))
                            ))))
                        .build())
                .relatedAssets("1234-1234-1234-1234")
                .build());
    
        }
    }
    
    resources:
      alertTest:
        type: splight:Alert
        properties:
          description: Created with Terraform
          type: rate
          rateUnit: minute
          rateValue: 10
          timeWindow: 600
          thresholds:
            - value: 4
              status: no_alert
              statusText: CustomStatusText
          severity: sev8
          operator: gt
          aggregation: avg
          targetVariable: A
          alertItems:
            - refId: A
              type: QUERY
              expressionPlain:
              queryPlain:
                fn::toJSON:
                  - $match:
                      asset: 1234-1234-1234-1234
                      attribute: 1234-1234-1234-1234
            - refId: B
              type: QUERY
              expressionPlain:
              queryPlain:
                fn::toJSON:
                  - $match:
                      asset: 1234-1234-1234-1234
                      attribute: 1234-1234-1234-1234
          relatedAssets:
            - 1234-1234-1234-1234
    

    Create Alert Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Alert(name: string, args: AlertArgs, opts?: CustomResourceOptions);
    @overload
    def Alert(resource_name: str,
              args: AlertArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Alert(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              operator: Optional[str] = None,
              alert_items: Optional[Sequence[AlertAlertItemArgs]] = None,
              type: Optional[str] = None,
              time_window: Optional[int] = None,
              aggregation: Optional[str] = None,
              thresholds: Optional[Sequence[AlertThresholdArgs]] = None,
              target_variable: Optional[str] = None,
              severity: Optional[str] = None,
              description: Optional[str] = None,
              cron_hours: Optional[int] = None,
              name: Optional[str] = None,
              rate_unit: Optional[str] = None,
              rate_value: Optional[int] = None,
              related_assets: Optional[Sequence[str]] = None,
              cron_year: Optional[int] = None,
              cron_month: Optional[int] = None,
              cron_minutes: Optional[int] = None,
              cron_dow: Optional[int] = None,
              cron_dom: Optional[int] = None)
    func NewAlert(ctx *Context, name string, args AlertArgs, opts ...ResourceOption) (*Alert, error)
    public Alert(string name, AlertArgs args, CustomResourceOptions? opts = null)
    public Alert(String name, AlertArgs args)
    public Alert(String name, AlertArgs args, CustomResourceOptions options)
    
    type: splight:Alert
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AlertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AlertArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AlertArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var alertResource = new Splight.Alert("alertResource", new()
    {
        Operator = "string",
        AlertItems = new[]
        {
            new Splight.Inputs.AlertAlertItemArgs
            {
                ExpressionPlain = "string",
                QueryPlain = "string",
                RefId = "string",
                Type = "string",
            },
        },
        Type = "string",
        TimeWindow = 0,
        Aggregation = "string",
        Thresholds = new[]
        {
            new Splight.Inputs.AlertThresholdArgs
            {
                Status = "string",
                Value = 0,
                StatusText = "string",
            },
        },
        TargetVariable = "string",
        Severity = "string",
        Description = "string",
        CronHours = 0,
        Name = "string",
        RateUnit = "string",
        RateValue = 0,
        RelatedAssets = new[]
        {
            "string",
        },
        CronYear = 0,
        CronMonth = 0,
        CronMinutes = 0,
        CronDow = 0,
        CronDom = 0,
    });
    
    example, err := splight.NewAlert(ctx, "alertResource", &splight.AlertArgs{
    	Operator: pulumi.String("string"),
    	AlertItems: splight.AlertAlertItemArray{
    		&splight.AlertAlertItemArgs{
    			ExpressionPlain: pulumi.String("string"),
    			QueryPlain:      pulumi.String("string"),
    			RefId:           pulumi.String("string"),
    			Type:            pulumi.String("string"),
    		},
    	},
    	Type:        pulumi.String("string"),
    	TimeWindow:  pulumi.Int(0),
    	Aggregation: pulumi.String("string"),
    	Thresholds: splight.AlertThresholdArray{
    		&splight.AlertThresholdArgs{
    			Status:     pulumi.String("string"),
    			Value:      pulumi.Float64(0),
    			StatusText: pulumi.String("string"),
    		},
    	},
    	TargetVariable: pulumi.String("string"),
    	Severity:       pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	CronHours:      pulumi.Int(0),
    	Name:           pulumi.String("string"),
    	RateUnit:       pulumi.String("string"),
    	RateValue:      pulumi.Int(0),
    	RelatedAssets: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	CronYear:    pulumi.Int(0),
    	CronMonth:   pulumi.Int(0),
    	CronMinutes: pulumi.Int(0),
    	CronDow:     pulumi.Int(0),
    	CronDom:     pulumi.Int(0),
    })
    
    var alertResource = new Alert("alertResource", AlertArgs.builder()
        .operator("string")
        .alertItems(AlertAlertItemArgs.builder()
            .expressionPlain("string")
            .queryPlain("string")
            .refId("string")
            .type("string")
            .build())
        .type("string")
        .timeWindow(0)
        .aggregation("string")
        .thresholds(AlertThresholdArgs.builder()
            .status("string")
            .value(0)
            .statusText("string")
            .build())
        .targetVariable("string")
        .severity("string")
        .description("string")
        .cronHours(0)
        .name("string")
        .rateUnit("string")
        .rateValue(0)
        .relatedAssets("string")
        .cronYear(0)
        .cronMonth(0)
        .cronMinutes(0)
        .cronDow(0)
        .cronDom(0)
        .build());
    
    alert_resource = splight.Alert("alertResource",
        operator="string",
        alert_items=[splight.AlertAlertItemArgs(
            expression_plain="string",
            query_plain="string",
            ref_id="string",
            type="string",
        )],
        type="string",
        time_window=0,
        aggregation="string",
        thresholds=[splight.AlertThresholdArgs(
            status="string",
            value=0,
            status_text="string",
        )],
        target_variable="string",
        severity="string",
        description="string",
        cron_hours=0,
        name="string",
        rate_unit="string",
        rate_value=0,
        related_assets=["string"],
        cron_year=0,
        cron_month=0,
        cron_minutes=0,
        cron_dow=0,
        cron_dom=0)
    
    const alertResource = new splight.Alert("alertResource", {
        operator: "string",
        alertItems: [{
            expressionPlain: "string",
            queryPlain: "string",
            refId: "string",
            type: "string",
        }],
        type: "string",
        timeWindow: 0,
        aggregation: "string",
        thresholds: [{
            status: "string",
            value: 0,
            statusText: "string",
        }],
        targetVariable: "string",
        severity: "string",
        description: "string",
        cronHours: 0,
        name: "string",
        rateUnit: "string",
        rateValue: 0,
        relatedAssets: ["string"],
        cronYear: 0,
        cronMonth: 0,
        cronMinutes: 0,
        cronDow: 0,
        cronDom: 0,
    });
    
    type: splight:Alert
    properties:
        aggregation: string
        alertItems:
            - expressionPlain: string
              queryPlain: string
              refId: string
              type: string
        cronDom: 0
        cronDow: 0
        cronHours: 0
        cronMinutes: 0
        cronMonth: 0
        cronYear: 0
        description: string
        name: string
        operator: string
        rateUnit: string
        rateValue: 0
        relatedAssets:
            - string
        severity: string
        targetVariable: string
        thresholds:
            - status: string
              statusText: string
              value: 0
        timeWindow: 0
        type: string
    

    Alert Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Alert resource accepts the following input properties:

    Aggregation string
    aggregation to be applied to reads before comparisson
    AlertItems List<Splight.Splight.Inputs.AlertAlertItem>
    variables to be calculated for a complex comparisson.
    Description string
    The description of the resource
    Operator string
    operator to be used to compare the read value with the threshold value
    Severity string
    [sev1,...,sev8] severity for the alert
    TargetVariable string
    variable to be used to compare with thresholds
    Thresholds List<Splight.Splight.Inputs.AlertThreshold>
    TimeWindow int
    window to fetch data from. Data out of that window will not be considered for evaluation
    Type string
    [cron|rate] type for the cron
    CronDom int
    schedule value for cron
    CronDow int
    schedule value for cron
    CronHours int
    schedule value for cron
    CronMinutes int
    schedule value for cron
    CronMonth int
    schedule value for cron
    CronYear int
    schedule value for cron
    Name string
    The name of the resource
    RateUnit string
    [day|hour|minute] schedule unit
    RateValue int
    schedule value
    RelatedAssets List<string>
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    Aggregation string
    aggregation to be applied to reads before comparisson
    AlertItems []AlertAlertItemArgs
    variables to be calculated for a complex comparisson.
    Description string
    The description of the resource
    Operator string
    operator to be used to compare the read value with the threshold value
    Severity string
    [sev1,...,sev8] severity for the alert
    TargetVariable string
    variable to be used to compare with thresholds
    Thresholds []AlertThresholdArgs
    TimeWindow int
    window to fetch data from. Data out of that window will not be considered for evaluation
    Type string
    [cron|rate] type for the cron
    CronDom int
    schedule value for cron
    CronDow int
    schedule value for cron
    CronHours int
    schedule value for cron
    CronMinutes int
    schedule value for cron
    CronMonth int
    schedule value for cron
    CronYear int
    schedule value for cron
    Name string
    The name of the resource
    RateUnit string
    [day|hour|minute] schedule unit
    RateValue int
    schedule value
    RelatedAssets []string
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    aggregation String
    aggregation to be applied to reads before comparisson
    alertItems List<AlertAlertItem>
    variables to be calculated for a complex comparisson.
    description String
    The description of the resource
    operator String
    operator to be used to compare the read value with the threshold value
    severity String
    [sev1,...,sev8] severity for the alert
    targetVariable String
    variable to be used to compare with thresholds
    thresholds List<AlertThreshold>
    timeWindow Integer
    window to fetch data from. Data out of that window will not be considered for evaluation
    type String
    [cron|rate] type for the cron
    cronDom Integer
    schedule value for cron
    cronDow Integer
    schedule value for cron
    cronHours Integer
    schedule value for cron
    cronMinutes Integer
    schedule value for cron
    cronMonth Integer
    schedule value for cron
    cronYear Integer
    schedule value for cron
    name String
    The name of the resource
    rateUnit String
    [day|hour|minute] schedule unit
    rateValue Integer
    schedule value
    relatedAssets List<String>
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    aggregation string
    aggregation to be applied to reads before comparisson
    alertItems AlertAlertItem[]
    variables to be calculated for a complex comparisson.
    description string
    The description of the resource
    operator string
    operator to be used to compare the read value with the threshold value
    severity string
    [sev1,...,sev8] severity for the alert
    targetVariable string
    variable to be used to compare with thresholds
    thresholds AlertThreshold[]
    timeWindow number
    window to fetch data from. Data out of that window will not be considered for evaluation
    type string
    [cron|rate] type for the cron
    cronDom number
    schedule value for cron
    cronDow number
    schedule value for cron
    cronHours number
    schedule value for cron
    cronMinutes number
    schedule value for cron
    cronMonth number
    schedule value for cron
    cronYear number
    schedule value for cron
    name string
    The name of the resource
    rateUnit string
    [day|hour|minute] schedule unit
    rateValue number
    schedule value
    relatedAssets string[]
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    aggregation str
    aggregation to be applied to reads before comparisson
    alert_items Sequence[AlertAlertItemArgs]
    variables to be calculated for a complex comparisson.
    description str
    The description of the resource
    operator str
    operator to be used to compare the read value with the threshold value
    severity str
    [sev1,...,sev8] severity for the alert
    target_variable str
    variable to be used to compare with thresholds
    thresholds Sequence[AlertThresholdArgs]
    time_window int
    window to fetch data from. Data out of that window will not be considered for evaluation
    type str
    [cron|rate] type for the cron
    cron_dom int
    schedule value for cron
    cron_dow int
    schedule value for cron
    cron_hours int
    schedule value for cron
    cron_minutes int
    schedule value for cron
    cron_month int
    schedule value for cron
    cron_year int
    schedule value for cron
    name str
    The name of the resource
    rate_unit str
    [day|hour|minute] schedule unit
    rate_value int
    schedule value
    related_assets Sequence[str]
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    aggregation String
    aggregation to be applied to reads before comparisson
    alertItems List<Property Map>
    variables to be calculated for a complex comparisson.
    description String
    The description of the resource
    operator String
    operator to be used to compare the read value with the threshold value
    severity String
    [sev1,...,sev8] severity for the alert
    targetVariable String
    variable to be used to compare with thresholds
    thresholds List<Property Map>
    timeWindow Number
    window to fetch data from. Data out of that window will not be considered for evaluation
    type String
    [cron|rate] type for the cron
    cronDom Number
    schedule value for cron
    cronDow Number
    schedule value for cron
    cronHours Number
    schedule value for cron
    cronMinutes Number
    schedule value for cron
    cronMonth Number
    schedule value for cron
    cronYear Number
    schedule value for cron
    name String
    The name of the resource
    rateUnit String
    [day|hour|minute] schedule unit
    rateValue Number
    schedule value
    relatedAssets List<String>
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Alert resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Alert Resource

    Get an existing Alert resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AlertState, opts?: CustomResourceOptions): Alert
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aggregation: Optional[str] = None,
            alert_items: Optional[Sequence[AlertAlertItemArgs]] = None,
            cron_dom: Optional[int] = None,
            cron_dow: Optional[int] = None,
            cron_hours: Optional[int] = None,
            cron_minutes: Optional[int] = None,
            cron_month: Optional[int] = None,
            cron_year: Optional[int] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            operator: Optional[str] = None,
            rate_unit: Optional[str] = None,
            rate_value: Optional[int] = None,
            related_assets: Optional[Sequence[str]] = None,
            severity: Optional[str] = None,
            target_variable: Optional[str] = None,
            thresholds: Optional[Sequence[AlertThresholdArgs]] = None,
            time_window: Optional[int] = None,
            type: Optional[str] = None) -> Alert
    func GetAlert(ctx *Context, name string, id IDInput, state *AlertState, opts ...ResourceOption) (*Alert, error)
    public static Alert Get(string name, Input<string> id, AlertState? state, CustomResourceOptions? opts = null)
    public static Alert get(String name, Output<String> id, AlertState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Aggregation string
    aggregation to be applied to reads before comparisson
    AlertItems List<Splight.Splight.Inputs.AlertAlertItem>
    variables to be calculated for a complex comparisson.
    CronDom int
    schedule value for cron
    CronDow int
    schedule value for cron
    CronHours int
    schedule value for cron
    CronMinutes int
    schedule value for cron
    CronMonth int
    schedule value for cron
    CronYear int
    schedule value for cron
    Description string
    The description of the resource
    Name string
    The name of the resource
    Operator string
    operator to be used to compare the read value with the threshold value
    RateUnit string
    [day|hour|minute] schedule unit
    RateValue int
    schedule value
    RelatedAssets List<string>
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    Severity string
    [sev1,...,sev8] severity for the alert
    TargetVariable string
    variable to be used to compare with thresholds
    Thresholds List<Splight.Splight.Inputs.AlertThreshold>
    TimeWindow int
    window to fetch data from. Data out of that window will not be considered for evaluation
    Type string
    [cron|rate] type for the cron
    Aggregation string
    aggregation to be applied to reads before comparisson
    AlertItems []AlertAlertItemArgs
    variables to be calculated for a complex comparisson.
    CronDom int
    schedule value for cron
    CronDow int
    schedule value for cron
    CronHours int
    schedule value for cron
    CronMinutes int
    schedule value for cron
    CronMonth int
    schedule value for cron
    CronYear int
    schedule value for cron
    Description string
    The description of the resource
    Name string
    The name of the resource
    Operator string
    operator to be used to compare the read value with the threshold value
    RateUnit string
    [day|hour|minute] schedule unit
    RateValue int
    schedule value
    RelatedAssets []string
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    Severity string
    [sev1,...,sev8] severity for the alert
    TargetVariable string
    variable to be used to compare with thresholds
    Thresholds []AlertThresholdArgs
    TimeWindow int
    window to fetch data from. Data out of that window will not be considered for evaluation
    Type string
    [cron|rate] type for the cron
    aggregation String
    aggregation to be applied to reads before comparisson
    alertItems List<AlertAlertItem>
    variables to be calculated for a complex comparisson.
    cronDom Integer
    schedule value for cron
    cronDow Integer
    schedule value for cron
    cronHours Integer
    schedule value for cron
    cronMinutes Integer
    schedule value for cron
    cronMonth Integer
    schedule value for cron
    cronYear Integer
    schedule value for cron
    description String
    The description of the resource
    name String
    The name of the resource
    operator String
    operator to be used to compare the read value with the threshold value
    rateUnit String
    [day|hour|minute] schedule unit
    rateValue Integer
    schedule value
    relatedAssets List<String>
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    severity String
    [sev1,...,sev8] severity for the alert
    targetVariable String
    variable to be used to compare with thresholds
    thresholds List<AlertThreshold>
    timeWindow Integer
    window to fetch data from. Data out of that window will not be considered for evaluation
    type String
    [cron|rate] type for the cron
    aggregation string
    aggregation to be applied to reads before comparisson
    alertItems AlertAlertItem[]
    variables to be calculated for a complex comparisson.
    cronDom number
    schedule value for cron
    cronDow number
    schedule value for cron
    cronHours number
    schedule value for cron
    cronMinutes number
    schedule value for cron
    cronMonth number
    schedule value for cron
    cronYear number
    schedule value for cron
    description string
    The description of the resource
    name string
    The name of the resource
    operator string
    operator to be used to compare the read value with the threshold value
    rateUnit string
    [day|hour|minute] schedule unit
    rateValue number
    schedule value
    relatedAssets string[]
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    severity string
    [sev1,...,sev8] severity for the alert
    targetVariable string
    variable to be used to compare with thresholds
    thresholds AlertThreshold[]
    timeWindow number
    window to fetch data from. Data out of that window will not be considered for evaluation
    type string
    [cron|rate] type for the cron
    aggregation str
    aggregation to be applied to reads before comparisson
    alert_items Sequence[AlertAlertItemArgs]
    variables to be calculated for a complex comparisson.
    cron_dom int
    schedule value for cron
    cron_dow int
    schedule value for cron
    cron_hours int
    schedule value for cron
    cron_minutes int
    schedule value for cron
    cron_month int
    schedule value for cron
    cron_year int
    schedule value for cron
    description str
    The description of the resource
    name str
    The name of the resource
    operator str
    operator to be used to compare the read value with the threshold value
    rate_unit str
    [day|hour|minute] schedule unit
    rate_value int
    schedule value
    related_assets Sequence[str]
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    severity str
    [sev1,...,sev8] severity for the alert
    target_variable str
    variable to be used to compare with thresholds
    thresholds Sequence[AlertThresholdArgs]
    time_window int
    window to fetch data from. Data out of that window will not be considered for evaluation
    type str
    [cron|rate] type for the cron
    aggregation String
    aggregation to be applied to reads before comparisson
    alertItems List<Property Map>
    variables to be calculated for a complex comparisson.
    cronDom Number
    schedule value for cron
    cronDow Number
    schedule value for cron
    cronHours Number
    schedule value for cron
    cronMinutes Number
    schedule value for cron
    cronMonth Number
    schedule value for cron
    cronYear Number
    schedule value for cron
    description String
    The description of the resource
    name String
    The name of the resource
    operator String
    operator to be used to compare the read value with the threshold value
    rateUnit String
    [day|hour|minute] schedule unit
    rateValue Number
    schedule value
    relatedAssets List<String>
    related assets to be linked. In case one of these alerts triggers it will be reflected on each of these assets.
    severity String
    [sev1,...,sev8] severity for the alert
    targetVariable String
    variable to be used to compare with thresholds
    thresholds List<Property Map>
    timeWindow Number
    window to fetch data from. Data out of that window will not be considered for evaluation
    type String
    [cron|rate] type for the cron

    Supporting Types

    AlertAlertItem, AlertAlertItemArgs

    ExpressionPlain string
    QueryPlain string
    RefId string
    Type string
    ExpressionPlain string
    QueryPlain string
    RefId string
    Type string
    expressionPlain String
    queryPlain String
    refId String
    type String
    expressionPlain string
    queryPlain string
    refId string
    type string
    expressionPlain String
    queryPlain String
    refId String
    type String

    AlertThreshold, AlertThresholdArgs

    Status string
    [alert|warning|no_alert] status value for the threshold
    Value double
    value to be considered to compare
    StatusText string
    optional custom value to be displayed in the platform.
    Status string
    [alert|warning|no_alert] status value for the threshold
    Value float64
    value to be considered to compare
    StatusText string
    optional custom value to be displayed in the platform.
    status String
    [alert|warning|no_alert] status value for the threshold
    value Double
    value to be considered to compare
    statusText String
    optional custom value to be displayed in the platform.
    status string
    [alert|warning|no_alert] status value for the threshold
    value number
    value to be considered to compare
    statusText string
    optional custom value to be displayed in the platform.
    status str
    [alert|warning|no_alert] status value for the threshold
    value float
    value to be considered to compare
    status_text str
    optional custom value to be displayed in the platform.
    status String
    [alert|warning|no_alert] status value for the threshold
    value Number
    value to be considered to compare
    statusText String
    optional custom value to be displayed in the platform.

    Import

    $ pulumi import splight:index/alert:Alert [options] splight_alert.<name> <alert_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    splight splightplatform/pulumi-splight
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the splight Terraform Provider.
    splight logo
    splight v0.1.24 published on Friday, Jun 28, 2024 by splightplatform