1. Packages
  2. Alicloud Provider
  3. API Docs
  4. arms
  5. AlertContactGroup
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.arms.AlertContactGroup

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

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

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

    NOTE: Available since v1.131.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****",
    });
    const exampleAlertContactGroup = new alicloud.arms.AlertContactGroup("example", {
        alertContactGroupName: "example_value",
        contactIds: [example.id],
    });
    
    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****")
    example_alert_contact_group = alicloud.arms.AlertContactGroup("example",
        alert_contact_group_name="example_value",
        contact_ids=[example.id])
    
    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 {
    		example, 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
    		}
    		_, err = arms.NewAlertContactGroup(ctx, "example", &arms.AlertContactGroupArgs{
    			AlertContactGroupName: pulumi.String("example_value"),
    			ContactIds: pulumi.StringArray{
    				example.ID(),
    			},
    		})
    		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****",
        });
    
        var exampleAlertContactGroup = new AliCloud.Arms.AlertContactGroup("example", new()
        {
            AlertContactGroupName = "example_value",
            ContactIds = new[]
            {
                example.Id,
            },
        });
    
    });
    
    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 com.pulumi.alicloud.arms.AlertContactGroup;
    import com.pulumi.alicloud.arms.AlertContactGroupArgs;
    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());
    
            var exampleAlertContactGroup = new AlertContactGroup("exampleAlertContactGroup", AlertContactGroupArgs.builder()
                .alertContactGroupName("example_value")
                .contactIds(example.id())
                .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****
      exampleAlertContactGroup:
        type: alicloud:arms:AlertContactGroup
        name: example
        properties:
          alertContactGroupName: example_value
          contactIds:
            - ${example.id}
    

    Create AlertContactGroup Resource

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

    Constructor syntax

    new AlertContactGroup(name: string, args: AlertContactGroupArgs, opts?: CustomResourceOptions);
    @overload
    def AlertContactGroup(resource_name: str,
                          args: AlertContactGroupArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def AlertContactGroup(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          alert_contact_group_name: Optional[str] = None,
                          contact_ids: Optional[Sequence[str]] = None)
    func NewAlertContactGroup(ctx *Context, name string, args AlertContactGroupArgs, opts ...ResourceOption) (*AlertContactGroup, error)
    public AlertContactGroup(string name, AlertContactGroupArgs args, CustomResourceOptions? opts = null)
    public AlertContactGroup(String name, AlertContactGroupArgs args)
    public AlertContactGroup(String name, AlertContactGroupArgs args, CustomResourceOptions options)
    
    type: alicloud:arms:AlertContactGroup
    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 AlertContactGroupArgs
    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 AlertContactGroupArgs
    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 AlertContactGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertContactGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertContactGroupArgs
    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 alertContactGroupResource = new AliCloud.Arms.AlertContactGroup("alertContactGroupResource", new()
    {
        AlertContactGroupName = "string",
        ContactIds = new[]
        {
            "string",
        },
    });
    
    example, err := arms.NewAlertContactGroup(ctx, "alertContactGroupResource", &arms.AlertContactGroupArgs{
    	AlertContactGroupName: pulumi.String("string"),
    	ContactIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var alertContactGroupResource = new AlertContactGroup("alertContactGroupResource", AlertContactGroupArgs.builder()
        .alertContactGroupName("string")
        .contactIds("string")
        .build());
    
    alert_contact_group_resource = alicloud.arms.AlertContactGroup("alertContactGroupResource",
        alert_contact_group_name="string",
        contact_ids=["string"])
    
    const alertContactGroupResource = new alicloud.arms.AlertContactGroup("alertContactGroupResource", {
        alertContactGroupName: "string",
        contactIds: ["string"],
    });
    
    type: alicloud:arms:AlertContactGroup
    properties:
        alertContactGroupName: string
        contactIds:
            - string
    

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

    AlertContactGroupName string
    The name of the resource.
    ContactIds List<string>
    The list id of alert contact.
    AlertContactGroupName string
    The name of the resource.
    ContactIds []string
    The list id of alert contact.
    alertContactGroupName String
    The name of the resource.
    contactIds List<String>
    The list id of alert contact.
    alertContactGroupName string
    The name of the resource.
    contactIds string[]
    The list id of alert contact.
    alert_contact_group_name str
    The name of the resource.
    contact_ids Sequence[str]
    The list id of alert contact.
    alertContactGroupName String
    The name of the resource.
    contactIds List<String>
    The list id of alert contact.

    Outputs

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

    Get an existing AlertContactGroup 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?: AlertContactGroupState, opts?: CustomResourceOptions): AlertContactGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alert_contact_group_name: Optional[str] = None,
            contact_ids: Optional[Sequence[str]] = None) -> AlertContactGroup
    func GetAlertContactGroup(ctx *Context, name string, id IDInput, state *AlertContactGroupState, opts ...ResourceOption) (*AlertContactGroup, error)
    public static AlertContactGroup Get(string name, Input<string> id, AlertContactGroupState? state, CustomResourceOptions? opts = null)
    public static AlertContactGroup get(String name, Output<String> id, AlertContactGroupState 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:
    AlertContactGroupName string
    The name of the resource.
    ContactIds List<string>
    The list id of alert contact.
    AlertContactGroupName string
    The name of the resource.
    ContactIds []string
    The list id of alert contact.
    alertContactGroupName String
    The name of the resource.
    contactIds List<String>
    The list id of alert contact.
    alertContactGroupName string
    The name of the resource.
    contactIds string[]
    The list id of alert contact.
    alert_contact_group_name str
    The name of the resource.
    contact_ids Sequence[str]
    The list id of alert contact.
    alertContactGroupName String
    The name of the resource.
    contactIds List<String>
    The list id of alert contact.

    Import

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

    $ pulumi import alicloud:arms/alertContactGroup:AlertContactGroup 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.62.1 published on Monday, Sep 16, 2024 by Pulumi