get Alert Resource
Using this data source can init SLS Alert resources automatically. For information about SLS Alert and how to use it, see SLS Alert Overview
DEPRECATED: This resource has been deprecated from version
1.219.0
. Please use new resource alicloud_log_alert_resource. NOTE: Available since v1.161.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const exampleUser = alicloud.log.getAlertResource({
type: "user",
lang: "cn",
});
import pulumi
import pulumi_alicloud as alicloud
example_user = alicloud.log.get_alert_resource(type="user",
lang="cn")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var exampleUser = AliCloud.Log.GetAlertResource.Invoke(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.LookupAlertResource(ctx, &log.LookupAlertResourceArgs{
Type: "user",
Lang: pulumi.StringRef("cn"),
}, nil)
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.LogFunctions;
import com.pulumi.alicloud.log.inputs.GetAlertResourceArgs;
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 exampleUser = LogFunctions.getAlertResource(GetAlertResourceArgs.builder()
.type("user")
.lang("cn")
.build());
}
}
variables:
exampleUser:
fn::invoke:
function: alicloud:log:getAlertResource
arguments:
type: user
lang: cn
Return
A collection of values returned by getAlertResource.
Parameters
A collection of arguments for invoking getAlertResource.
Return
A collection of values returned by getAlertResource.
Parameters
The lang of alert center resource when type is user.
The project of alert resource when type is project.
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.
See also
Return
A collection of values returned by getAlertResource.
Parameters
Builder for com.pulumi.alicloud.log.kotlin.inputs.GetAlertResourcePlainArgs.