1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cms
  5. AlarmContact
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cms.AlarmContact

Explore with Pulumi AI

Creates or modifies an alarm contact. For information about alarm contact and how to use it, see What is alarm contact.

NOTE: Available since v1.99.0.

Example Usage

Basic Usage

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: "terraform@test.com",
});
Copy
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="terraform@test.com")
Copy
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("terraform@test.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 = "terraform@test.com",
    });

});
Copy
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("terraform@test.com")
            .build());

    }
}
Copy
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: terraform@test.com
Copy

Create AlarmContact Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AlarmContact(name: string, args: AlarmContactArgs, opts?: CustomResourceOptions);
@overload
def AlarmContact(resource_name: str,
                 args: AlarmContactArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def AlarmContact(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 alarm_contact_name: Optional[str] = None,
                 describe: Optional[str] = None,
                 channels_aliim: Optional[str] = None,
                 channels_ding_web_hook: Optional[str] = None,
                 channels_mail: Optional[str] = None,
                 channels_sms: Optional[str] = None,
                 lang: Optional[str] = None)
func NewAlarmContact(ctx *Context, name string, args AlarmContactArgs, opts ...ResourceOption) (*AlarmContact, error)
public AlarmContact(string name, AlarmContactArgs args, CustomResourceOptions? opts = null)
public AlarmContact(String name, AlarmContactArgs args)
public AlarmContact(String name, AlarmContactArgs args, CustomResourceOptions options)
type: alicloud:cms:AlarmContact
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AlarmContactArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AlarmContactArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AlarmContactArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AlarmContactArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AlarmContactArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var alarmContactResource = new AliCloud.Cms.AlarmContact("alarmContactResource", new()
{
    AlarmContactName = "string",
    Describe = "string",
    ChannelsAliim = "string",
    ChannelsDingWebHook = "string",
    ChannelsMail = "string",
    ChannelsSms = "string",
    Lang = "string",
});
Copy
example, err := cms.NewAlarmContact(ctx, "alarmContactResource", &cms.AlarmContactArgs{
	AlarmContactName:    pulumi.String("string"),
	Describe:            pulumi.String("string"),
	ChannelsAliim:       pulumi.String("string"),
	ChannelsDingWebHook: pulumi.String("string"),
	ChannelsMail:        pulumi.String("string"),
	ChannelsSms:         pulumi.String("string"),
	Lang:                pulumi.String("string"),
})
Copy
var alarmContactResource = new AlarmContact("alarmContactResource", AlarmContactArgs.builder()
    .alarmContactName("string")
    .describe("string")
    .channelsAliim("string")
    .channelsDingWebHook("string")
    .channelsMail("string")
    .channelsSms("string")
    .lang("string")
    .build());
Copy
alarm_contact_resource = alicloud.cms.AlarmContact("alarmContactResource",
    alarm_contact_name="string",
    describe="string",
    channels_aliim="string",
    channels_ding_web_hook="string",
    channels_mail="string",
    channels_sms="string",
    lang="string")
Copy
const alarmContactResource = new alicloud.cms.AlarmContact("alarmContactResource", {
    alarmContactName: "string",
    describe: "string",
    channelsAliim: "string",
    channelsDingWebHook: "string",
    channelsMail: "string",
    channelsSms: "string",
    lang: "string",
});
Copy
type: alicloud:cms:AlarmContact
properties:
    alarmContactName: string
    channelsAliim: string
    channelsDingWebHook: string
    channelsMail: string
    channelsSms: string
    describe: string
    lang: string
Copy

AlarmContact Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AlarmContact resource accepts the following input properties:

AlarmContactName
This property is required.
Changes to this property will trigger replacement.
string
The name of the alarm contact. The length should between 2 and 40 characters.
Describe This property is required. string
The description of the alarm contact.
ChannelsAliim string
The TradeManager ID of the alarm contact.
ChannelsDingWebHook string
The webhook URL of the DingTalk chatbot.
ChannelsMail string
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.
ChannelsSms string
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.
Lang string

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.

AlarmContactName
This property is required.
Changes to this property will trigger replacement.
string
The name of the alarm contact. The length should between 2 and 40 characters.
Describe This property is required. string
The description of the alarm contact.
ChannelsAliim string
The TradeManager ID of the alarm contact.
ChannelsDingWebHook string
The webhook URL of the DingTalk chatbot.
ChannelsMail string
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.
ChannelsSms string
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.
Lang string

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.

alarmContactName
This property is required.
Changes to this property will trigger replacement.
String
The name of the alarm contact. The length should between 2 and 40 characters.
describe This property is required. String
The description of the alarm contact.
channelsAliim String
The TradeManager ID of the alarm contact.
channelsDingWebHook String
The webhook URL of the DingTalk chatbot.
channelsMail String
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.
channelsSms String
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.
lang String

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.

alarmContactName
This property is required.
Changes to this property will trigger replacement.
string
The name of the alarm contact. The length should between 2 and 40 characters.
describe This property is required. string
The description of the alarm contact.
channelsAliim string
The TradeManager ID of the alarm contact.
channelsDingWebHook string
The webhook URL of the DingTalk chatbot.
channelsMail string
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.
channelsSms string
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.
lang string

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.

alarm_contact_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the alarm contact. The length should between 2 and 40 characters.
describe This property is required. str
The description of the alarm contact.
channels_aliim str
The TradeManager ID of the alarm contact.
channels_ding_web_hook str
The webhook URL of the DingTalk chatbot.
channels_mail str
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.
channels_sms str
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.
lang str

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.

alarmContactName
This property is required.
Changes to this property will trigger replacement.
String
The name of the alarm contact. The length should between 2 and 40 characters.
describe This property is required. String
The description of the alarm contact.
channelsAliim String
The TradeManager ID of the alarm contact.
channelsDingWebHook String
The webhook URL of the DingTalk chatbot.
channelsMail String
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.
channelsSms String
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.
lang String

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.

Outputs

All input properties are implicitly available as output properties. Additionally, the AlarmContact resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing AlarmContact Resource

Get an existing AlarmContact resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AlarmContactState, opts?: CustomResourceOptions): AlarmContact
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        alarm_contact_name: Optional[str] = None,
        channels_aliim: Optional[str] = None,
        channels_ding_web_hook: Optional[str] = None,
        channels_mail: Optional[str] = None,
        channels_sms: Optional[str] = None,
        describe: Optional[str] = None,
        lang: Optional[str] = None) -> AlarmContact
func GetAlarmContact(ctx *Context, name string, id IDInput, state *AlarmContactState, opts ...ResourceOption) (*AlarmContact, error)
public static AlarmContact Get(string name, Input<string> id, AlarmContactState? state, CustomResourceOptions? opts = null)
public static AlarmContact get(String name, Output<String> id, AlarmContactState state, CustomResourceOptions options)
resources:  _:    type: alicloud:cms:AlarmContact    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AlarmContactName Changes to this property will trigger replacement. string
The name of the alarm contact. The length should between 2 and 40 characters.
ChannelsAliim string
The TradeManager ID of the alarm contact.
ChannelsDingWebHook string
The webhook URL of the DingTalk chatbot.
ChannelsMail string
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.
ChannelsSms string
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.
Describe string
The description of the alarm contact.
Lang string

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.

AlarmContactName Changes to this property will trigger replacement. string
The name of the alarm contact. The length should between 2 and 40 characters.
ChannelsAliim string
The TradeManager ID of the alarm contact.
ChannelsDingWebHook string
The webhook URL of the DingTalk chatbot.
ChannelsMail string
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.
ChannelsSms string
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.
Describe string
The description of the alarm contact.
Lang string

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.

alarmContactName Changes to this property will trigger replacement. String
The name of the alarm contact. The length should between 2 and 40 characters.
channelsAliim String
The TradeManager ID of the alarm contact.
channelsDingWebHook String
The webhook URL of the DingTalk chatbot.
channelsMail String
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.
channelsSms String
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.
describe String
The description of the alarm contact.
lang String

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.

alarmContactName Changes to this property will trigger replacement. string
The name of the alarm contact. The length should between 2 and 40 characters.
channelsAliim string
The TradeManager ID of the alarm contact.
channelsDingWebHook string
The webhook URL of the DingTalk chatbot.
channelsMail string
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.
channelsSms string
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.
describe string
The description of the alarm contact.
lang string

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.

alarm_contact_name Changes to this property will trigger replacement. str
The name of the alarm contact. The length should between 2 and 40 characters.
channels_aliim str
The TradeManager ID of the alarm contact.
channels_ding_web_hook str
The webhook URL of the DingTalk chatbot.
channels_mail str
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.
channels_sms str
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.
describe str
The description of the alarm contact.
lang str

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.

alarmContactName Changes to this property will trigger replacement. String
The name of the alarm contact. The length should between 2 and 40 characters.
channelsAliim String
The TradeManager ID of the alarm contact.
channelsDingWebHook String
The webhook URL of the DingTalk chatbot.
channelsMail String
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.
channelsSms String
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.
describe String
The description of the alarm contact.
lang String

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.

Import

Alarm contact can be imported using the id, e.g.

$ pulumi import alicloud:cms/alarmContact:AlarmContact example abc12345
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.