AlertResource

class AlertResource : KotlinCustomResource

Using this resource can init SLS Alert resources automatically. For information about SLS Alert and how to use it, see SLS Alert Overview

NOTE: Available since v1.219.0.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const exampleUser = new alicloud.log.AlertResource("example_user", {
type: "user",
lang: "cn",
});
import pulumi
import pulumi_alicloud as alicloud
example_user = alicloud.log.AlertResource("example_user",
type="user",
lang="cn")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var exampleUser = new AliCloud.Log.AlertResource("example_user", new()
{
Type = "user",
Lang = "cn",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := log.NewAlertResource(ctx, "example_user", &log.AlertResourceArgs{
Type: pulumi.String("user"),
Lang: pulumi.String("cn"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.log.AlertResource;
import com.pulumi.alicloud.log.AlertResourceArgs;
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 exampleUser = new AlertResource("exampleUser", AlertResourceArgs.builder()
.type("user")
.lang("cn")
.build());
}
}
resources:
exampleUser:
type: alicloud:log:AlertResource
name: example_user
properties:
type: user
lang: cn

Import

Log alert resource can be imported using the id, e.g.

$ pulumi import alicloud:log/alertResource:AlertResource example alert_resource:project:tf-project

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val lang: Output<String>?

The lang of alert center resource when type is user.

Link copied to clipboard
val project: Output<String>?

The project of alert resource when type is project.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: Output<String>

The type of alert resources, must be user or project, 'user' for init aliyuncloud account's alert center resource, including project named sls-alert-{uid}-{region} and some dashboards; 'project' for init project's alert resource, including logstore named internal-alert-history and alert dashboard.

Link copied to clipboard
val urn: Output<String>