alicloud logo
Alibaba Cloud v3.38.0, Jun 2 23

alicloud.arms.AlertContactGroup

Explore with Pulumi AI

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 in v1.131.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var exampleAlertContact = new AliCloud.Arms.AlertContact("exampleAlertContact", 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("exampleAlertContactGroup", new()
    {
        AlertContactGroupName = "example_value",
        ContactIds = new[]
        {
            exampleAlertContact.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 {
		exampleAlertContact, err := arms.NewAlertContact(ctx, "exampleAlertContact", &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, "exampleAlertContactGroup", &arms.AlertContactGroupArgs{
			AlertContactGroupName: pulumi.String("example_value"),
			ContactIds: pulumi.StringArray{
				exampleAlertContact.ID(),
			},
		})
		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.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 exampleAlertContact = new AlertContact("exampleAlertContact", 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(exampleAlertContact.id())
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example_alert_contact = alicloud.arms.AlertContact("exampleAlertContact",
    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("exampleAlertContactGroup",
    alert_contact_group_name="example_value",
    contact_ids=[example_alert_contact.id])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const exampleAlertContact = new alicloud.arms.AlertContact("exampleAlertContact", {
    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("exampleAlertContactGroup", {
    alertContactGroupName: "example_value",
    contactIds: [exampleAlertContact.id],
});
resources:
  exampleAlertContact:
    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
    properties:
      alertContactGroupName: example_value
      contactIds:
        - ${exampleAlertContact.id}

Create AlertContactGroup Resource

new AlertContactGroup(name: string, args: AlertContactGroupArgs, opts?: CustomResourceOptions);
@overload
def AlertContactGroup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      alert_contact_group_name: Optional[str] = None,
                      contact_ids: Optional[Sequence[str]] = None)
@overload
def AlertContactGroup(resource_name: str,
                      args: AlertContactGroupArgs,
                      opts: Optional[ResourceOptions] = 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.

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.

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>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.