1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cms
  5. getAlarmContacts
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cms.getAlarmContacts

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

Provides a list of alarm contact owned by an Alibaba Cloud account.

NOTE: Available in v1.99.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

export = async () => {
    const example = await alicloud.cms.getAlarmContacts({
        ids: ["tf-testAccCmsAlarmContact"],
    });
    return {
        "first-contact": _this.contacts,
    };
}
Copy
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.cms.get_alarm_contacts(ids=["tf-testAccCmsAlarmContact"])
pulumi.export("first-contact", this["contacts"])
Copy
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.GetAlarmContacts(ctx, &cms.GetAlarmContactsArgs{
			Ids: []string{
				"tf-testAccCmsAlarmContact",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("first-contact", this.Contacts)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = AliCloud.Cms.GetAlarmContacts.Invoke(new()
    {
        Ids = new[]
        {
            "tf-testAccCmsAlarmContact",
        },
    });

    return new Dictionary<string, object?>
    {
        ["first-contact"] = @this.Contacts,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cms.CmsFunctions;
import com.pulumi.alicloud.cms.inputs.GetAlarmContactsArgs;
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) {
        final var example = CmsFunctions.getAlarmContacts(GetAlarmContactsArgs.builder()
            .ids("tf-testAccCmsAlarmContact")
            .build());

        ctx.export("first-contact", this_.contacts());
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:cms:getAlarmContacts
      arguments:
        ids:
          - tf-testAccCmsAlarmContact
outputs:
  first-contact: ${this.contacts}
Copy

Using getAlarmContacts

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAlarmContacts(args: GetAlarmContactsArgs, opts?: InvokeOptions): Promise<GetAlarmContactsResult>
function getAlarmContactsOutput(args: GetAlarmContactsOutputArgs, opts?: InvokeOptions): Output<GetAlarmContactsResult>
Copy
def get_alarm_contacts(chanel_type: Optional[str] = None,
                       chanel_value: Optional[str] = None,
                       ids: Optional[Sequence[str]] = None,
                       name_regex: Optional[str] = None,
                       output_file: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAlarmContactsResult
def get_alarm_contacts_output(chanel_type: Optional[pulumi.Input[str]] = None,
                       chanel_value: Optional[pulumi.Input[str]] = None,
                       ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       name_regex: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAlarmContactsResult]
Copy
func GetAlarmContacts(ctx *Context, args *GetAlarmContactsArgs, opts ...InvokeOption) (*GetAlarmContactsResult, error)
func GetAlarmContactsOutput(ctx *Context, args *GetAlarmContactsOutputArgs, opts ...InvokeOption) GetAlarmContactsResultOutput
Copy

> Note: This function is named GetAlarmContacts in the Go SDK.

public static class GetAlarmContacts 
{
    public static Task<GetAlarmContactsResult> InvokeAsync(GetAlarmContactsArgs args, InvokeOptions? opts = null)
    public static Output<GetAlarmContactsResult> Invoke(GetAlarmContactsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAlarmContactsResult> getAlarmContacts(GetAlarmContactsArgs args, InvokeOptions options)
public static Output<GetAlarmContactsResult> getAlarmContacts(GetAlarmContactsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cms/getAlarmContacts:getAlarmContacts
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ChanelType Changes to this property will trigger replacement. string
The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.
ChanelValue Changes to this property will trigger replacement. string
The alarm notification target.
Ids Changes to this property will trigger replacement. List<string>
A list of alarm contact IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by alarm contact name.
OutputFile string

File name where to save data source results (after running pulumi preview).

NOTE: Specify at least one of the following alarm notification targets: phone number, email address, webhook URL of the DingTalk chatbot, and TradeManager ID.

ChanelType Changes to this property will trigger replacement. string
The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.
ChanelValue Changes to this property will trigger replacement. string
The alarm notification target.
Ids Changes to this property will trigger replacement. []string
A list of alarm contact IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by alarm contact name.
OutputFile string

File name where to save data source results (after running pulumi preview).

NOTE: Specify at least one of the following alarm notification targets: phone number, email address, webhook URL of the DingTalk chatbot, and TradeManager ID.

chanelType Changes to this property will trigger replacement. String
The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.
chanelValue Changes to this property will trigger replacement. String
The alarm notification target.
ids Changes to this property will trigger replacement. List<String>
A list of alarm contact IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by alarm contact name.
outputFile String

File name where to save data source results (after running pulumi preview).

NOTE: Specify at least one of the following alarm notification targets: phone number, email address, webhook URL of the DingTalk chatbot, and TradeManager ID.

chanelType Changes to this property will trigger replacement. string
The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.
chanelValue Changes to this property will trigger replacement. string
The alarm notification target.
ids Changes to this property will trigger replacement. string[]
A list of alarm contact IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by alarm contact name.
outputFile string

File name where to save data source results (after running pulumi preview).

NOTE: Specify at least one of the following alarm notification targets: phone number, email address, webhook URL of the DingTalk chatbot, and TradeManager ID.

chanel_type Changes to this property will trigger replacement. str
The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.
chanel_value Changes to this property will trigger replacement. str
The alarm notification target.
ids Changes to this property will trigger replacement. Sequence[str]
A list of alarm contact IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by alarm contact name.
output_file str

File name where to save data source results (after running pulumi preview).

NOTE: Specify at least one of the following alarm notification targets: phone number, email address, webhook URL of the DingTalk chatbot, and TradeManager ID.

chanelType Changes to this property will trigger replacement. String
The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.
chanelValue Changes to this property will trigger replacement. String
The alarm notification target.
ids Changes to this property will trigger replacement. List<String>
A list of alarm contact IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by alarm contact name.
outputFile String

File name where to save data source results (after running pulumi preview).

NOTE: Specify at least one of the following alarm notification targets: phone number, email address, webhook URL of the DingTalk chatbot, and TradeManager ID.

getAlarmContacts Result

The following output properties are available:

Contacts List<Pulumi.AliCloud.Cms.Outputs.GetAlarmContactsContact>
A list of alarm contacts. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of alarm contact IDs.
Names List<string>
A list of alarm contact names.
ChanelType string
ChanelValue string
NameRegex string
OutputFile string
Contacts []GetAlarmContactsContact
A list of alarm contacts. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of alarm contact IDs.
Names []string
A list of alarm contact names.
ChanelType string
ChanelValue string
NameRegex string
OutputFile string
contacts List<GetAlarmContactsContact>
A list of alarm contacts. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of alarm contact IDs.
names List<String>
A list of alarm contact names.
chanelType String
chanelValue String
nameRegex String
outputFile String
contacts GetAlarmContactsContact[]
A list of alarm contacts. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of alarm contact IDs.
names string[]
A list of alarm contact names.
chanelType string
chanelValue string
nameRegex string
outputFile string
contacts Sequence[GetAlarmContactsContact]
A list of alarm contacts. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of alarm contact IDs.
names Sequence[str]
A list of alarm contact names.
chanel_type str
chanel_value str
name_regex str
output_file str
contacts List<Property Map>
A list of alarm contacts. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of alarm contact IDs.
names List<String>
A list of alarm contact names.
chanelType String
chanelValue String
nameRegex String
outputFile String

Supporting Types

GetAlarmContactsContact

AlarmContactName This property is required. string
The name of the alarm contact.
ChannelsAliim This property is required. string
The TradeManager ID of the alarm contact.
ChannelsDingWebHook This property is required. string
The webhook URL of the DingTalk chatbot.
ChannelsMail This property is required. string
The email address of the alarm contact.
ChannelsSms This property is required. string
The phone number of the alarm contact.
ChannelsStateAliim This property is required. string
Indicates whether the TradeManager ID is valid.
ChannelsStateDingWebHook This property is required. string
Indicates whether the DingTalk chatbot is normal.
ChannelsStateMail This property is required. string
The status of the email address.
ChannelsStatusSms This property is required. string
The status of the phone number.

  • Lang - The language type of the alarm.
ContactGroups This property is required. List<string>
The alert groups to which the alarm contact is added.
Describe This property is required. string
The description of the alarm contact.
Id This property is required. string
The ID of the alarm contact.
Lang This property is required. string
AlarmContactName This property is required. string
The name of the alarm contact.
ChannelsAliim This property is required. string
The TradeManager ID of the alarm contact.
ChannelsDingWebHook This property is required. string
The webhook URL of the DingTalk chatbot.
ChannelsMail This property is required. string
The email address of the alarm contact.
ChannelsSms This property is required. string
The phone number of the alarm contact.
ChannelsStateAliim This property is required. string
Indicates whether the TradeManager ID is valid.
ChannelsStateDingWebHook This property is required. string
Indicates whether the DingTalk chatbot is normal.
ChannelsStateMail This property is required. string
The status of the email address.
ChannelsStatusSms This property is required. string
The status of the phone number.

  • Lang - The language type of the alarm.
ContactGroups This property is required. []string
The alert groups to which the alarm contact is added.
Describe This property is required. string
The description of the alarm contact.
Id This property is required. string
The ID of the alarm contact.
Lang This property is required. string
alarmContactName This property is required. String
The name of the alarm contact.
channelsAliim This property is required. String
The TradeManager ID of the alarm contact.
channelsDingWebHook This property is required. String
The webhook URL of the DingTalk chatbot.
channelsMail This property is required. String
The email address of the alarm contact.
channelsSms This property is required. String
The phone number of the alarm contact.
channelsStateAliim This property is required. String
Indicates whether the TradeManager ID is valid.
channelsStateDingWebHook This property is required. String
Indicates whether the DingTalk chatbot is normal.
channelsStateMail This property is required. String
The status of the email address.
channelsStatusSms This property is required. String
The status of the phone number.

  • Lang - The language type of the alarm.
contactGroups This property is required. List<String>
The alert groups to which the alarm contact is added.
describe This property is required. String
The description of the alarm contact.
id This property is required. String
The ID of the alarm contact.
lang This property is required. String
alarmContactName This property is required. string
The name of the alarm contact.
channelsAliim This property is required. string
The TradeManager ID of the alarm contact.
channelsDingWebHook This property is required. string
The webhook URL of the DingTalk chatbot.
channelsMail This property is required. string
The email address of the alarm contact.
channelsSms This property is required. string
The phone number of the alarm contact.
channelsStateAliim This property is required. string
Indicates whether the TradeManager ID is valid.
channelsStateDingWebHook This property is required. string
Indicates whether the DingTalk chatbot is normal.
channelsStateMail This property is required. string
The status of the email address.
channelsStatusSms This property is required. string
The status of the phone number.

  • Lang - The language type of the alarm.
contactGroups This property is required. string[]
The alert groups to which the alarm contact is added.
describe This property is required. string
The description of the alarm contact.
id This property is required. string
The ID of the alarm contact.
lang This property is required. string
alarm_contact_name This property is required. str
The name of the alarm contact.
channels_aliim This property is required. str
The TradeManager ID of the alarm contact.
channels_ding_web_hook This property is required. str
The webhook URL of the DingTalk chatbot.
channels_mail This property is required. str
The email address of the alarm contact.
channels_sms This property is required. str
The phone number of the alarm contact.
channels_state_aliim This property is required. str
Indicates whether the TradeManager ID is valid.
channels_state_ding_web_hook This property is required. str
Indicates whether the DingTalk chatbot is normal.
channels_state_mail This property is required. str
The status of the email address.
channels_status_sms This property is required. str
The status of the phone number.

  • Lang - The language type of the alarm.
contact_groups This property is required. Sequence[str]
The alert groups to which the alarm contact is added.
describe This property is required. str
The description of the alarm contact.
id This property is required. str
The ID of the alarm contact.
lang This property is required. str
alarmContactName This property is required. String
The name of the alarm contact.
channelsAliim This property is required. String
The TradeManager ID of the alarm contact.
channelsDingWebHook This property is required. String
The webhook URL of the DingTalk chatbot.
channelsMail This property is required. String
The email address of the alarm contact.
channelsSms This property is required. String
The phone number of the alarm contact.
channelsStateAliim This property is required. String
Indicates whether the TradeManager ID is valid.
channelsStateDingWebHook This property is required. String
Indicates whether the DingTalk chatbot is normal.
channelsStateMail This property is required. String
The status of the email address.
channelsStatusSms This property is required. String
The status of the phone number.

  • Lang - The language type of the alarm.
contactGroups This property is required. List<String>
The alert groups to which the alarm contact is added.
describe This property is required. String
The description of the alarm contact.
id This property is required. String
The ID of the alarm contact.
lang This property is required. String

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi