com.pulumi.alicloud.cms.kotlin.AlarmContactArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-alicloud-kotlin Show documentation
Show all versions of pulumi-alicloud-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.alicloud.cms.kotlin
import com.pulumi.alicloud.cms.AlarmContactArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Creates or modifies an alarm contact. For information about alarm contact and how to use it, see [What is alarm contact](https://www.alibabacloud.com/help/en/cloudmonitor/latest/putcontact).
* > **NOTE:** Available since v1.99.0.
* ## Example Usage
* Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as alicloud from "@pulumi/alicloud";
* // You need to activate the link before you can return to the alarm contact information, otherwise diff will appear in terraform. So please confirm the activation link as soon as possible. Besides, you can ignore the diff of the alarm contact information by `lifestyle`.
* const example = new alicloud.cms.AlarmContact("example", {
* alarmContactName: "tf-example",
* describe: "For example",
* channelsMail: "[email protected]",
* });
* ```
* ```python
* import pulumi
* import pulumi_alicloud as alicloud
* # You need to activate the link before you can return to the alarm contact information, otherwise diff will appear in terraform. So please confirm the activation link as soon as possible. Besides, you can ignore the diff of the alarm contact information by `lifestyle`.
* example = alicloud.cms.AlarmContact("example",
* alarm_contact_name="tf-example",
* describe="For example",
* channels_mail="[email protected]")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AliCloud = Pulumi.AliCloud;
* return await Deployment.RunAsync(() =>
* {
* // You need to activate the link before you can return to the alarm contact information, otherwise diff will appear in terraform. So please confirm the activation link as soon as possible. Besides, you can ignore the diff of the alarm contact information by `lifestyle`.
* var example = new AliCloud.Cms.AlarmContact("example", new()
* {
* AlarmContactName = "tf-example",
* Describe = "For example",
* ChannelsMail = "[email protected]",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* // You need to activate the link before you can return to the alarm contact information, otherwise diff will appear in terraform. So please confirm the activation link as soon as possible. Besides, you can ignore the diff of the alarm contact information by `lifestyle`.
* _, err := cms.NewAlarmContact(ctx, "example", &cms.AlarmContactArgs{
* AlarmContactName: pulumi.String("tf-example"),
* Describe: pulumi.String("For example"),
* ChannelsMail: pulumi.String("[email protected]"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.alicloud.cms.AlarmContact;
* import com.pulumi.alicloud.cms.AlarmContactArgs;
* 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) {
* // You need to activate the link before you can return to the alarm contact information, otherwise diff will appear in terraform. So please confirm the activation link as soon as possible. Besides, you can ignore the diff of the alarm contact information by `lifestyle`.
* var example = new AlarmContact("example", AlarmContactArgs.builder()
* .alarmContactName("tf-example")
* .describe("For example")
* .channelsMail("[email protected]")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* # You need to activate the link before you can return to the alarm contact information, otherwise diff will appear in terraform. So please confirm the activation link as soon as possible. Besides, you can ignore the diff of the alarm contact information by `lifestyle`.
* example:
* type: alicloud:cms:AlarmContact
* properties:
* alarmContactName: tf-example
* describe: For example
* channelsMail: [email protected]
* ```
*
* ## Import
* Alarm contact can be imported using the id, e.g.
* ```sh
* $ pulumi import alicloud:cms/alarmContact:AlarmContact example abc12345
* ```
* @property alarmContactName The name of the alarm contact. The length should between 2 and 40 characters.
* @property channelsAliim The TradeManager ID of the alarm contact.
* @property channelsDingWebHook The webhook URL of the DingTalk chatbot.
* @property channelsMail The email address of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
* @property channelsSms The phone number of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
* @property describe The description of the alarm contact.
* @property lang The language type of the alarm. Valid values: `en`, `zh-cn`.
* > **NOTE:** Specify at least one of the following alarm notification targets: `channels_aliim`, `channels_ding_web_hook`, `channels_mail`, `channels_sms`.
*/
public data class AlarmContactArgs(
public val alarmContactName: Output? = null,
public val channelsAliim: Output? = null,
public val channelsDingWebHook: Output? = null,
public val channelsMail: Output? = null,
public val channelsSms: Output? = null,
public val describe: Output? = null,
public val lang: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.alicloud.cms.AlarmContactArgs =
com.pulumi.alicloud.cms.AlarmContactArgs.builder()
.alarmContactName(alarmContactName?.applyValue({ args0 -> args0 }))
.channelsAliim(channelsAliim?.applyValue({ args0 -> args0 }))
.channelsDingWebHook(channelsDingWebHook?.applyValue({ args0 -> args0 }))
.channelsMail(channelsMail?.applyValue({ args0 -> args0 }))
.channelsSms(channelsSms?.applyValue({ args0 -> args0 }))
.describe(describe?.applyValue({ args0 -> args0 }))
.lang(lang?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AlarmContactArgs].
*/
@PulumiTagMarker
public class AlarmContactArgsBuilder internal constructor() {
private var alarmContactName: Output? = null
private var channelsAliim: Output? = null
private var channelsDingWebHook: Output? = null
private var channelsMail: Output? = null
private var channelsSms: Output? = null
private var describe: Output? = null
private var lang: Output? = null
/**
* @param value The name of the alarm contact. The length should between 2 and 40 characters.
*/
@JvmName("ddcallclmdogvhgb")
public suspend fun alarmContactName(`value`: Output) {
this.alarmContactName = value
}
/**
* @param value The TradeManager ID of the alarm contact.
*/
@JvmName("kcxgtcokfrbwhmql")
public suspend fun channelsAliim(`value`: Output) {
this.channelsAliim = value
}
/**
* @param value The webhook URL of the DingTalk chatbot.
*/
@JvmName("aufghyuycpuloeth")
public suspend fun channelsDingWebHook(`value`: Output) {
this.channelsDingWebHook = value
}
/**
* @param value The email address of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
*/
@JvmName("ardetqyntmupsnam")
public suspend fun channelsMail(`value`: Output) {
this.channelsMail = value
}
/**
* @param value The phone number of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
*/
@JvmName("wfrnhwqgljbsmrbw")
public suspend fun channelsSms(`value`: Output) {
this.channelsSms = value
}
/**
* @param value The description of the alarm contact.
*/
@JvmName("lgpfinaqfdocimeu")
public suspend fun describe(`value`: Output) {
this.describe = value
}
/**
* @param value The language type of the alarm. Valid values: `en`, `zh-cn`.
* > **NOTE:** Specify at least one of the following alarm notification targets: `channels_aliim`, `channels_ding_web_hook`, `channels_mail`, `channels_sms`.
*/
@JvmName("wgxjbrknoaffnqaa")
public suspend fun lang(`value`: Output) {
this.lang = value
}
/**
* @param value The name of the alarm contact. The length should between 2 and 40 characters.
*/
@JvmName("thwqdnadcryeiaqw")
public suspend fun alarmContactName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.alarmContactName = mapped
}
/**
* @param value The TradeManager ID of the alarm contact.
*/
@JvmName("ngspgqjxdyymynit")
public suspend fun channelsAliim(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.channelsAliim = mapped
}
/**
* @param value The webhook URL of the DingTalk chatbot.
*/
@JvmName("kpxpvcukodlcqejb")
public suspend fun channelsDingWebHook(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.channelsDingWebHook = mapped
}
/**
* @param value The email address of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
*/
@JvmName("ervfpybmweuruohl")
public suspend fun channelsMail(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.channelsMail = mapped
}
/**
* @param value The phone number of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
*/
@JvmName("yamxdvecttswatog")
public suspend fun channelsSms(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.channelsSms = mapped
}
/**
* @param value The description of the alarm contact.
*/
@JvmName("tcwfresmiiiprrjw")
public suspend fun describe(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.describe = mapped
}
/**
* @param value The language type of the alarm. Valid values: `en`, `zh-cn`.
* > **NOTE:** Specify at least one of the following alarm notification targets: `channels_aliim`, `channels_ding_web_hook`, `channels_mail`, `channels_sms`.
*/
@JvmName("jgnmxvtaikcmvios")
public suspend fun lang(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.lang = mapped
}
internal fun build(): AlarmContactArgs = AlarmContactArgs(
alarmContactName = alarmContactName,
channelsAliim = channelsAliim,
channelsDingWebHook = channelsDingWebHook,
channelsMail = channelsMail,
channelsSms = channelsSms,
describe = describe,
lang = lang,
)
}