Alert Resource
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",
});
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
example_user = alicloud.log.AlertResource("example_user",
type="user",
lang="cn")
Content copied to clipboard
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
resources:
exampleUser:
type: alicloud:log:AlertResource
name: example_user
properties:
type: user
lang: cn
Content copied to clipboard
Import
Log alert resource can be imported using the id, e.g.
$ pulumi import alicloud:log/alertResource:AlertResource example alert_resource:project:tf-project
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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.