Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getAlarmContacts

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

NOTE: Available in v1.99.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AliCloud.Cms.GetAlarmContacts.InvokeAsync(new AliCloud.Cms.GetAlarmContactsArgs
        {
            Ids = 
            {
                "tf-testAccCmsAlarmContact",
            },
        }));
        this.First_contact = data.Alicloud_cms_alarm_contacts.This.Contacts;
    }

    [Output("first-contact")]
    public Output<string> First_contact { get; set; }
}
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", data.Alicloud_cms_alarm_contacts.This.Contacts)
		return nil
	})
}
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", data.alicloud_cms_alarm_contacts().this().contacts());
    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.cms.get_alarm_contacts(ids=["tf-testAccCmsAlarmContact"])
pulumi.export("first-contact", data["alicloud_cms_alarm_contacts"]["this"]["contacts"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

export = async () => {
    const example = await alicloud.cms.getAlarmContacts({
        ids: ["tf-testAccCmsAlarmContact"],
    });
    const first_contact = data.alicloud_cms_alarm_contacts["this"].contacts;
    return {
        "first-contact": first_contact,
    };
}
variables:
  example:
    Fn::Invoke:
      Function: alicloud:cms:getAlarmContacts
      Arguments:
        ids:
          - tf-testAccCmsAlarmContact
outputs:
  first-contact: ${data.alicloud_cms_alarm_contacts.this.contacts}

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>
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]
func GetAlarmContacts(ctx *Context, args *GetAlarmContactsArgs, opts ...InvokeOption) (*GetAlarmContactsResult, error)
func GetAlarmContactsOutput(ctx *Context, args *GetAlarmContactsOutputArgs, opts ...InvokeOption) GetAlarmContactsResultOutput

> 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)
}
public static CompletableFuture<GetAlarmContactsResult> getAlarmContacts(GetAlarmContactsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:cms/getAlarmContacts:getAlarmContacts
  arguments:
    # arguments dictionary

The following arguments are supported:

ChanelType string

The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.

ChanelValue string

The alarm notification target.

Ids List<string>

A list of alarm contact IDs.

NameRegex string

A regex string to filter results by alarm contact name.

OutputFile string
ChanelType string

The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.

ChanelValue string

The alarm notification target.

Ids []string

A list of alarm contact IDs.

NameRegex string

A regex string to filter results by alarm contact name.

OutputFile string
chanelType String

The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.

chanelValue String

The alarm notification target.

ids List<String>

A list of alarm contact IDs.

nameRegex String

A regex string to filter results by alarm contact name.

outputFile String
chanelType string

The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.

chanelValue string

The alarm notification target.

ids string[]

A list of alarm contact IDs.

nameRegex string

A regex string to filter results by alarm contact name.

outputFile string
chanel_type str

The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.

chanel_value str

The alarm notification target.

ids Sequence[str]

A list of alarm contact IDs.

name_regex str

A regex string to filter results by alarm contact name.

output_file str
chanelType String

The alarm notification method. Alarm notifications can be sent by using Email or DingWebHook.

chanelValue String

The alarm notification target.

ids List<String>

A list of alarm contact IDs.

nameRegex String

A regex string to filter results by alarm contact name.

outputFile String

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 string

The name 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.

ChannelsSms string

The phone number of the alarm contact.

ChannelsStateAliim string

Indicates whether the TradeManager ID is valid.

ChannelsStateDingWebHook string

Indicates whether the DingTalk chatbot is normal.

ChannelsStateMail string

The status of the email address.

ChannelsStatusSms string

The status of the phone number.

ContactGroups List<string>

The alert groups to which the alarm contact is added.

Describe string

The description of the alarm contact.

Id string

The ID of the alarm contact.

Lang string
AlarmContactName string

The name 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.

ChannelsSms string

The phone number of the alarm contact.

ChannelsStateAliim string

Indicates whether the TradeManager ID is valid.

ChannelsStateDingWebHook string

Indicates whether the DingTalk chatbot is normal.

ChannelsStateMail string

The status of the email address.

ChannelsStatusSms string

The status of the phone number.

ContactGroups []string

The alert groups to which the alarm contact is added.

Describe string

The description of the alarm contact.

Id string

The ID of the alarm contact.

Lang string
alarmContactName String

The name 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.

channelsSms String

The phone number of the alarm contact.

channelsStateAliim String

Indicates whether the TradeManager ID is valid.

channelsStateDingWebHook String

Indicates whether the DingTalk chatbot is normal.

channelsStateMail String

The status of the email address.

channelsStatusSms String

The status of the phone number.

contactGroups List<String>

The alert groups to which the alarm contact is added.

describe String

The description of the alarm contact.

id String

The ID of the alarm contact.

lang String
alarmContactName string

The name 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.

channelsSms string

The phone number of the alarm contact.

channelsStateAliim string

Indicates whether the TradeManager ID is valid.

channelsStateDingWebHook string

Indicates whether the DingTalk chatbot is normal.

channelsStateMail string

The status of the email address.

channelsStatusSms string

The status of the phone number.

contactGroups string[]

The alert groups to which the alarm contact is added.

describe string

The description of the alarm contact.

id string

The ID of the alarm contact.

lang string
alarm_contact_name str

The name 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.

channels_sms str

The phone number of the alarm contact.

channels_state_aliim str

Indicates whether the TradeManager ID is valid.

channels_state_ding_web_hook str

Indicates whether the DingTalk chatbot is normal.

channels_state_mail str

The status of the email address.

channels_status_sms str

The status of the phone number.

contact_groups Sequence[str]

The alert groups to which the alarm contact is added.

describe str

The description of the alarm contact.

id str

The ID of the alarm contact.

lang str
alarmContactName String

The name 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.

channelsSms String

The phone number of the alarm contact.

channelsStateAliim String

Indicates whether the TradeManager ID is valid.

channelsStateDingWebHook String

Indicates whether the DingTalk chatbot is normal.

channelsStateMail String

The status of the email address.

channelsStatusSms String

The status of the phone number.

contactGroups List<String>

The alert groups to which the alarm contact is added.

describe String

The description of the alarm contact.

id String

The ID of the alarm contact.

lang String

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.