getAlertResource

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

NOTE: Available in v1.161.0+

Example Usage

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()
.lang("cn")
.type("user")
.build());
final var exampleProject = LogFunctions.getAlertResource(GetAlertResourceArgs.builder()
.project("test-alert-tf")
.type("project")
.build());
}
}

Return

A collection of values returned by getAlertResource.

Parameters

argument

A collection of arguments for invoking getAlertResource.


suspend fun getAlertResource(lang: String? = null, project: String? = null, type: String): GetAlertResourceResult

Return

A collection of values returned by getAlertResource.

See also

Parameters

lang

The lang of alert center resource when type is user.

project

The project of alert resource when type is project.

type

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.


Return

A collection of values returned by getAlertResource.

See also

Parameters

argument

Builder for com.pulumi.alicloud.log.kotlin.inputs.GetAlertResourcePlainArgs.