1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. arms
  5. AlertContact
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.arms.AlertContact

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Application Real-Time Monitoring Service (ARMS) Alert Contact resource.

    For information about Application Real-Time Monitoring Service (ARMS) Alert Contact and how to use it, see What is Alert Contact.

    NOTE: Available since v1.129.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = new alicloud.arms.AlertContact("example", {
        alertContactName: "example_value",
        dingRobotWebhookUrl: "https://oapi.dingtalk.com/robot/send?access_token=91f2f6****",
        email: "someone@example.com",
        phoneNum: "1381111****",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.arms.AlertContact("example",
        alert_contact_name="example_value",
        ding_robot_webhook_url="https://oapi.dingtalk.com/robot/send?access_token=91f2f6****",
        email="someone@example.com",
        phone_num="1381111****")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/arms"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := arms.NewAlertContact(ctx, "example", &arms.AlertContactArgs{
    			AlertContactName:    pulumi.String("example_value"),
    			DingRobotWebhookUrl: pulumi.String("https://oapi.dingtalk.com/robot/send?access_token=91f2f6****"),
    			Email:               pulumi.String("someone@example.com"),
    			PhoneNum:            pulumi.String("1381111****"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AliCloud.Arms.AlertContact("example", new()
        {
            AlertContactName = "example_value",
            DingRobotWebhookUrl = "https://oapi.dingtalk.com/robot/send?access_token=91f2f6****",
            Email = "someone@example.com",
            PhoneNum = "1381111****",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.arms.AlertContact;
    import com.pulumi.alicloud.arms.AlertContactArgs;
    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 AlertContact("example", AlertContactArgs.builder()        
                .alertContactName("example_value")
                .dingRobotWebhookUrl("https://oapi.dingtalk.com/robot/send?access_token=91f2f6****")
                .email("someone@example.com")
                .phoneNum("1381111****")
                .build());
    
        }
    }
    
    resources:
      example:
        type: alicloud:arms:AlertContact
        properties:
          alertContactName: example_value
          dingRobotWebhookUrl: https://oapi.dingtalk.com/robot/send?access_token=91f2f6****
          email: someone@example.com
          phoneNum: 1381111****
    

    Create AlertContact Resource

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

    Constructor syntax

    new AlertContact(name: string, args?: AlertContactArgs, opts?: CustomResourceOptions);
    @overload
    def AlertContact(resource_name: str,
                     args: Optional[AlertContactArgs] = None,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def AlertContact(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     alert_contact_name: Optional[str] = None,
                     ding_robot_webhook_url: Optional[str] = None,
                     email: Optional[str] = None,
                     phone_num: Optional[str] = None,
                     system_noc: Optional[bool] = None)
    func NewAlertContact(ctx *Context, name string, args *AlertContactArgs, opts ...ResourceOption) (*AlertContact, error)
    public AlertContact(string name, AlertContactArgs? args = null, CustomResourceOptions? opts = null)
    public AlertContact(String name, AlertContactArgs args)
    public AlertContact(String name, AlertContactArgs args, CustomResourceOptions options)
    
    type: alicloud:arms:AlertContact
    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 AlertContactArgs
    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 AlertContactArgs
    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 AlertContactArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertContactArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertContactArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var alertContactResource = new AliCloud.Arms.AlertContact("alertContactResource", new()
    {
        AlertContactName = "string",
        DingRobotWebhookUrl = "string",
        Email = "string",
        PhoneNum = "string",
        SystemNoc = false,
    });
    
    example, err := arms.NewAlertContact(ctx, "alertContactResource", &arms.AlertContactArgs{
    	AlertContactName:    pulumi.String("string"),
    	DingRobotWebhookUrl: pulumi.String("string"),
    	Email:               pulumi.String("string"),
    	PhoneNum:            pulumi.String("string"),
    	SystemNoc:           pulumi.Bool(false),
    })
    
    var alertContactResource = new AlertContact("alertContactResource", AlertContactArgs.builder()        
        .alertContactName("string")
        .dingRobotWebhookUrl("string")
        .email("string")
        .phoneNum("string")
        .systemNoc(false)
        .build());
    
    alert_contact_resource = alicloud.arms.AlertContact("alertContactResource",
        alert_contact_name="string",
        ding_robot_webhook_url="string",
        email="string",
        phone_num="string",
        system_noc=False)
    
    const alertContactResource = new alicloud.arms.AlertContact("alertContactResource", {
        alertContactName: "string",
        dingRobotWebhookUrl: "string",
        email: "string",
        phoneNum: "string",
        systemNoc: false,
    });
    
    type: alicloud:arms:AlertContact
    properties:
        alertContactName: string
        dingRobotWebhookUrl: string
        email: string
        phoneNum: string
        systemNoc: false
    

    AlertContact 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 AlertContact resource accepts the following input properties:

    AlertContactName string
    The name of the alert contact.
    DingRobotWebhookUrl string
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    Email string
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    PhoneNum string
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    SystemNoc bool
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    AlertContactName string
    The name of the alert contact.
    DingRobotWebhookUrl string
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    Email string
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    PhoneNum string
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    SystemNoc bool
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    alertContactName String
    The name of the alert contact.
    dingRobotWebhookUrl String
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    email String
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    phoneNum String
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    systemNoc Boolean
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    alertContactName string
    The name of the alert contact.
    dingRobotWebhookUrl string
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    email string
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    phoneNum string
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    systemNoc boolean
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    alert_contact_name str
    The name of the alert contact.
    ding_robot_webhook_url str
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    email str
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    phone_num str
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    system_noc bool
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    alertContactName String
    The name of the alert contact.
    dingRobotWebhookUrl String
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    email String
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    phoneNum String
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    systemNoc Boolean
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AlertContact 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 AlertContact Resource

    Get an existing AlertContact 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?: AlertContactState, opts?: CustomResourceOptions): AlertContact
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alert_contact_name: Optional[str] = None,
            ding_robot_webhook_url: Optional[str] = None,
            email: Optional[str] = None,
            phone_num: Optional[str] = None,
            system_noc: Optional[bool] = None) -> AlertContact
    func GetAlertContact(ctx *Context, name string, id IDInput, state *AlertContactState, opts ...ResourceOption) (*AlertContact, error)
    public static AlertContact Get(string name, Input<string> id, AlertContactState? state, CustomResourceOptions? opts = null)
    public static AlertContact get(String name, Output<String> id, AlertContactState 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:
    AlertContactName string
    The name of the alert contact.
    DingRobotWebhookUrl string
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    Email string
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    PhoneNum string
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    SystemNoc bool
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    AlertContactName string
    The name of the alert contact.
    DingRobotWebhookUrl string
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    Email string
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    PhoneNum string
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    SystemNoc bool
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    alertContactName String
    The name of the alert contact.
    dingRobotWebhookUrl String
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    email String
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    phoneNum String
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    systemNoc Boolean
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    alertContactName string
    The name of the alert contact.
    dingRobotWebhookUrl string
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    email string
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    phoneNum string
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    systemNoc boolean
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    alert_contact_name str
    The name of the alert contact.
    ding_robot_webhook_url str
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    email str
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    phone_num str
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    system_noc bool
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.
    alertContactName String
    The name of the alert contact.
    dingRobotWebhookUrl String
    The webhook URL of the DingTalk chatbot. For more information about how to obtain the URL, see Configure a DingTalk chatbot to send alert notifications: https://www.alibabacloud.com/help/en/doc-detail/106247.htm. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    email String
    The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    phoneNum String
    The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
    systemNoc Boolean
    Specifies whether the alert contact receives system notifications. Valid values: true: receives system notifications. false: does not receive system notifications.

    Import

    Application Real-Time Monitoring Service (ARMS) Alert Contact can be imported using the id, e.g.

    $ pulumi import alicloud:arms/alertContact:AlertContact example <id>
    

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi