getAlertContacts

This data source provides the Arms Alert Contacts of the current Alibaba Cloud user.

NOTE: Available in v1.129.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.arms.ArmsFunctions;
import com.pulumi.alicloud.arms.inputs.GetAlertContactsArgs;
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 ids = ArmsFunctions.getAlertContacts();
ctx.export("armsAlertContactId1", ids.applyValue(getAlertContactsResult -> getAlertContactsResult.contacts()[0].id()));
final var nameRegex = ArmsFunctions.getAlertContacts(GetAlertContactsArgs.builder()
.nameRegex("^my-AlertContact")
.build());
ctx.export("armsAlertContactId2", nameRegex.applyValue(getAlertContactsResult -> getAlertContactsResult.contacts()[0].id()));
}
}

Return

A collection of values returned by getAlertContacts.

Parameters

argument

A collection of arguments for invoking getAlertContacts.


suspend fun getAlertContacts(alertContactName: String? = null, email: String? = null, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, phoneNum: String? = null): GetAlertContactsResult

Return

A collection of values returned by getAlertContacts.

See also

Parameters

alertContactName

The name of the alert contact.

email

The email address of the alert contact.

ids

A list of Alert Contact IDs.

nameRegex

A regex string to filter results by Alert Contact name.

outputFile

File name where to save data source results (after running pulumi preview).

phoneNum

The mobile number of the alert contact.


Return

A collection of values returned by getAlertContacts.

See also

Parameters

argument

Builder for com.pulumi.alicloud.arms.kotlin.inputs.GetAlertContactsPlainArgs.