1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cms
  5. AlarmContact
Alibaba Cloud v3.44.0 published on Thursday, Sep 28, 2023 by Pulumi

alicloud.cms.AlarmContact

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.44.0 published on Thursday, Sep 28, 2023 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

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // If you use this template, 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.
        var example = new AliCloud.Cms.AlarmContact("example", new()
        {
            AlarmContactName = "terraform-example",
            ChannelsMail = "terraform@test.com",
            Describe = "For example",
        });
    
    });
    
    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 {
    		_, err := cms.NewAlarmContact(ctx, "example", &cms.AlarmContactArgs{
    			AlarmContactName: pulumi.String("terraform-example"),
    			ChannelsMail:     pulumi.String("terraform@test.com"),
    			Describe:         pulumi.String("For example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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) {
            var example = new AlarmContact("example", AlarmContactArgs.builder()        
                .alarmContactName("terraform-example")
                .channelsMail("terraform@test.com")
                .describe("For example")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    # If you use this template, 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.
    example = alicloud.cms.AlarmContact("example",
        alarm_contact_name="terraform-example",
        channels_mail="terraform@test.com",
        describe="For example")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    // If you use this template, 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.
    const example = new alicloud.cms.AlarmContact("example", {
        alarmContactName: "terraform-example",
        channelsMail: "terraform@test.com",
        describe: "For example",
    });
    
    resources:
      # If you use this template, 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.
      example:
        type: alicloud:cms:AlarmContact
        properties:
          alarmContactName: terraform-example
          channelsMail: terraform@test.com
          describe: For example
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // If you use this template, you can ignore the diff of the alarm contact information by `lifestyle`. We recommend the above usage and activate the link in time.
        var example = new AliCloud.Cms.AlarmContact("example", new()
        {
            AlarmContactName = "tf-example",
            Describe = "For example",
            ChannelsMail = "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 {
    		_, 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
    	})
    }
    
    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) {
            var example = new AlarmContact("example", AlarmContactArgs.builder()        
                .alarmContactName("tf-example")
                .describe("For example")
                .channelsMail("terraform@test.com")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    # If you use this template, you can ignore the diff of the alarm contact information by `lifestyle`. We recommend the above usage and activate the link in time.
    example = alicloud.cms.AlarmContact("example",
        alarm_contact_name="tf-example",
        describe="For example",
        channels_mail="terraform@test.com")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    // If you use this template, you can ignore the diff of the alarm contact information by `lifestyle`. We recommend the above usage and activate the link in time.
    const example = new alicloud.cms.AlarmContact("example", {
        alarmContactName: "tf-example",
        describe: "For example",
        channelsMail: "terraform@test.com",
    });
    
    resources:
      # If you use this template, you can ignore the diff of the alarm contact information by `lifestyle`. We recommend the above usage and activate the link in time.
      example:
        type: alicloud:cms:AlarmContact
        properties:
          alarmContactName: tf-example
          describe: For example
          channelsMail: terraform@test.com
    

    Create AlarmContact Resource

    new AlarmContact(name: string, args: AlarmContactArgs, opts?: CustomResourceOptions);
    @overload
    def AlarmContact(resource_name: 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)
    @overload
    def AlarmContact(resource_name: str,
                     args: AlarmContactArgs,
                     opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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
    

    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.44.0 published on Thursday, Sep 28, 2023 by Pulumi