1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cms
  5. AlarmContact
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.cms.AlarmContact

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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",
    });
    
    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")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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 string
    The unique name of the resource.
    args AlarmContactArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args AlarmContactArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlarmContactArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    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"),
    })
    
    var alarmContactResource = new AlarmContact("alarmContactResource", AlarmContactArgs.builder()
        .alarmContactName("string")
        .describe("string")
        .channelsAliim("string")
        .channelsDingWebHook("string")
        .channelsMail("string")
        .channelsSms("string")
        .lang("string")
        .build());
    
    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")
    
    const alarmContactResource = new alicloud.cms.AlarmContact("alarmContactResource", {
        alarmContactName: "string",
        describe: "string",
        channelsAliim: "string",
        channelsDingWebHook: "string",
        channelsMail: "string",
        channelsSms: "string",
        lang: "string",
    });
    
    type: alicloud:cms:AlarmContact
    properties:
        alarmContactName: string
        channelsAliim: string
        channelsDingWebHook: string
        channelsMail: string
        channelsSms: string
        describe: string
        lang: string
    

    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 string
    The name of the alarm contact. The length should between 2 and 40 characters.
    Describe 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 string
    The name of the alarm contact. The length should between 2 and 40 characters.
    Describe 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 String
    The name of the alarm contact. The length should between 2 and 40 characters.
    describe 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 string
    The name of the alarm contact. The length should between 2 and 40 characters.
    describe 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 str
    The name of the alarm contact. The length should between 2 and 40 characters.
    describe 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 String
    The name of the alarm contact. The length should between 2 and 40 characters.
    describe 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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 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 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 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 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 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 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
    

    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi