arms

package
v3.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertContact

type AlertContact struct {
	pulumi.CustomResourceState

	// The name of the alert contact.
	AlertContactName pulumi.StringPtrOutput `pulumi:"alertContactName"`
	// 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.
	DingRobotWebhookUrl pulumi.StringPtrOutput `pulumi:"dingRobotWebhookUrl"`
	// The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
	Email pulumi.StringPtrOutput `pulumi:"email"`
	// The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
	PhoneNum pulumi.StringPtrOutput `pulumi:"phoneNum"`
	// Specifies whether the alert contact receives system notifications. Valid values:  true: receives system notifications. false: does not receive system notifications.
	SystemNoc pulumi.BoolPtrOutput `pulumi:"systemNoc"`
}

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](https://www.alibabacloud.com/help/en/doc-detail/42953.htm).

> **NOTE:** Available in v1.129.0+.

## Example Usage

Basic Usage

```go 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
	})
}

```

## Import

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

```sh

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

```

func GetAlertContact

func GetAlertContact(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AlertContactState, opts ...pulumi.ResourceOption) (*AlertContact, error)

GetAlertContact gets an existing AlertContact resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAlertContact

func NewAlertContact(ctx *pulumi.Context,
	name string, args *AlertContactArgs, opts ...pulumi.ResourceOption) (*AlertContact, error)

NewAlertContact registers a new resource with the given unique name, arguments, and options.

func (*AlertContact) ElementType

func (*AlertContact) ElementType() reflect.Type

func (*AlertContact) ToAlertContactOutput

func (i *AlertContact) ToAlertContactOutput() AlertContactOutput

func (*AlertContact) ToAlertContactOutputWithContext

func (i *AlertContact) ToAlertContactOutputWithContext(ctx context.Context) AlertContactOutput

func (*AlertContact) ToAlertContactPtrOutput

func (i *AlertContact) ToAlertContactPtrOutput() AlertContactPtrOutput

func (*AlertContact) ToAlertContactPtrOutputWithContext

func (i *AlertContact) ToAlertContactPtrOutputWithContext(ctx context.Context) AlertContactPtrOutput

type AlertContactArgs

type AlertContactArgs struct {
	// The name of the alert contact.
	AlertContactName pulumi.StringPtrInput
	// 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.
	DingRobotWebhookUrl pulumi.StringPtrInput
	// The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
	Email pulumi.StringPtrInput
	// The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
	PhoneNum pulumi.StringPtrInput
	// Specifies whether the alert contact receives system notifications. Valid values:  true: receives system notifications. false: does not receive system notifications.
	SystemNoc pulumi.BoolPtrInput
}

The set of arguments for constructing a AlertContact resource.

func (AlertContactArgs) ElementType

func (AlertContactArgs) ElementType() reflect.Type

type AlertContactArray

type AlertContactArray []AlertContactInput

func (AlertContactArray) ElementType

func (AlertContactArray) ElementType() reflect.Type

func (AlertContactArray) ToAlertContactArrayOutput

func (i AlertContactArray) ToAlertContactArrayOutput() AlertContactArrayOutput

func (AlertContactArray) ToAlertContactArrayOutputWithContext

func (i AlertContactArray) ToAlertContactArrayOutputWithContext(ctx context.Context) AlertContactArrayOutput

type AlertContactArrayInput

type AlertContactArrayInput interface {
	pulumi.Input

	ToAlertContactArrayOutput() AlertContactArrayOutput
	ToAlertContactArrayOutputWithContext(context.Context) AlertContactArrayOutput
}

AlertContactArrayInput is an input type that accepts AlertContactArray and AlertContactArrayOutput values. You can construct a concrete instance of `AlertContactArrayInput` via:

AlertContactArray{ AlertContactArgs{...} }

type AlertContactArrayOutput

type AlertContactArrayOutput struct{ *pulumi.OutputState }

func (AlertContactArrayOutput) ElementType

func (AlertContactArrayOutput) ElementType() reflect.Type

func (AlertContactArrayOutput) Index

func (AlertContactArrayOutput) ToAlertContactArrayOutput

func (o AlertContactArrayOutput) ToAlertContactArrayOutput() AlertContactArrayOutput

func (AlertContactArrayOutput) ToAlertContactArrayOutputWithContext

func (o AlertContactArrayOutput) ToAlertContactArrayOutputWithContext(ctx context.Context) AlertContactArrayOutput

type AlertContactInput

type AlertContactInput interface {
	pulumi.Input

	ToAlertContactOutput() AlertContactOutput
	ToAlertContactOutputWithContext(ctx context.Context) AlertContactOutput
}

type AlertContactMap

type AlertContactMap map[string]AlertContactInput

func (AlertContactMap) ElementType

func (AlertContactMap) ElementType() reflect.Type

func (AlertContactMap) ToAlertContactMapOutput

func (i AlertContactMap) ToAlertContactMapOutput() AlertContactMapOutput

func (AlertContactMap) ToAlertContactMapOutputWithContext

func (i AlertContactMap) ToAlertContactMapOutputWithContext(ctx context.Context) AlertContactMapOutput

type AlertContactMapInput

type AlertContactMapInput interface {
	pulumi.Input

	ToAlertContactMapOutput() AlertContactMapOutput
	ToAlertContactMapOutputWithContext(context.Context) AlertContactMapOutput
}

AlertContactMapInput is an input type that accepts AlertContactMap and AlertContactMapOutput values. You can construct a concrete instance of `AlertContactMapInput` via:

AlertContactMap{ "key": AlertContactArgs{...} }

type AlertContactMapOutput

type AlertContactMapOutput struct{ *pulumi.OutputState }

func (AlertContactMapOutput) ElementType

func (AlertContactMapOutput) ElementType() reflect.Type

func (AlertContactMapOutput) MapIndex

func (AlertContactMapOutput) ToAlertContactMapOutput

func (o AlertContactMapOutput) ToAlertContactMapOutput() AlertContactMapOutput

func (AlertContactMapOutput) ToAlertContactMapOutputWithContext

func (o AlertContactMapOutput) ToAlertContactMapOutputWithContext(ctx context.Context) AlertContactMapOutput

type AlertContactOutput

type AlertContactOutput struct {
	*pulumi.OutputState
}

func (AlertContactOutput) ElementType

func (AlertContactOutput) ElementType() reflect.Type

func (AlertContactOutput) ToAlertContactOutput

func (o AlertContactOutput) ToAlertContactOutput() AlertContactOutput

func (AlertContactOutput) ToAlertContactOutputWithContext

func (o AlertContactOutput) ToAlertContactOutputWithContext(ctx context.Context) AlertContactOutput

func (AlertContactOutput) ToAlertContactPtrOutput

func (o AlertContactOutput) ToAlertContactPtrOutput() AlertContactPtrOutput

func (AlertContactOutput) ToAlertContactPtrOutputWithContext

func (o AlertContactOutput) ToAlertContactPtrOutputWithContext(ctx context.Context) AlertContactPtrOutput

type AlertContactPtrInput

type AlertContactPtrInput interface {
	pulumi.Input

	ToAlertContactPtrOutput() AlertContactPtrOutput
	ToAlertContactPtrOutputWithContext(ctx context.Context) AlertContactPtrOutput
}

type AlertContactPtrOutput

type AlertContactPtrOutput struct {
	*pulumi.OutputState
}

func (AlertContactPtrOutput) ElementType

func (AlertContactPtrOutput) ElementType() reflect.Type

func (AlertContactPtrOutput) ToAlertContactPtrOutput

func (o AlertContactPtrOutput) ToAlertContactPtrOutput() AlertContactPtrOutput

func (AlertContactPtrOutput) ToAlertContactPtrOutputWithContext

func (o AlertContactPtrOutput) ToAlertContactPtrOutputWithContext(ctx context.Context) AlertContactPtrOutput

type AlertContactState

type AlertContactState struct {
	// The name of the alert contact.
	AlertContactName pulumi.StringPtrInput
	// 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.
	DingRobotWebhookUrl pulumi.StringPtrInput
	// The email address of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
	Email pulumi.StringPtrInput
	// The mobile number of the alert contact. You must specify at least one of the following parameters: PhoneNum, Email, and DingRobotWebhookUrl.
	PhoneNum pulumi.StringPtrInput
	// Specifies whether the alert contact receives system notifications. Valid values:  true: receives system notifications. false: does not receive system notifications.
	SystemNoc pulumi.BoolPtrInput
}

func (AlertContactState) ElementType

func (AlertContactState) ElementType() reflect.Type

type GetAlertContactsArgs

type GetAlertContactsArgs struct {
	// The name of the alert contact.
	AlertContactName *string `pulumi:"alertContactName"`
	// The email address of the alert contact.
	Email *string `pulumi:"email"`
	// A list of Alert Contact IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to filter results by Alert Contact name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// The mobile number of the alert contact.
	PhoneNum *string `pulumi:"phoneNum"`
}

A collection of arguments for invoking getAlertContacts.

type GetAlertContactsContact

type GetAlertContactsContact struct {
	// Contact ID.
	AlertContactId string `pulumi:"alertContactId"`
	// The name of the alert contact.
	AlertContactName string `pulumi:"alertContactName"`
	// The Creation Time Timestamp.
	CreateTime string `pulumi:"createTime"`
	// The webhook URL of the DingTalk chatbot.
	DingRobotWebhookUrl string `pulumi:"dingRobotWebhookUrl"`
	// The email address of the alert contact.
	Email string `pulumi:"email"`
	// The ID of the Alert Contact.
	Id string `pulumi:"id"`
	// The mobile number of the alert contact.
	PhoneNum string `pulumi:"phoneNum"`
	// Specifies whether the alert contact receives system notifications.
	SystemNoc bool `pulumi:"systemNoc"`
	// Webhook Information.
	Webhook string `pulumi:"webhook"`
}

type GetAlertContactsContactArgs

type GetAlertContactsContactArgs struct {
	// Contact ID.
	AlertContactId pulumi.StringInput `pulumi:"alertContactId"`
	// The name of the alert contact.
	AlertContactName pulumi.StringInput `pulumi:"alertContactName"`
	// The Creation Time Timestamp.
	CreateTime pulumi.StringInput `pulumi:"createTime"`
	// The webhook URL of the DingTalk chatbot.
	DingRobotWebhookUrl pulumi.StringInput `pulumi:"dingRobotWebhookUrl"`
	// The email address of the alert contact.
	Email pulumi.StringInput `pulumi:"email"`
	// The ID of the Alert Contact.
	Id pulumi.StringInput `pulumi:"id"`
	// The mobile number of the alert contact.
	PhoneNum pulumi.StringInput `pulumi:"phoneNum"`
	// Specifies whether the alert contact receives system notifications.
	SystemNoc pulumi.BoolInput `pulumi:"systemNoc"`
	// Webhook Information.
	Webhook pulumi.StringInput `pulumi:"webhook"`
}

func (GetAlertContactsContactArgs) ElementType

func (GetAlertContactsContactArgs) ToGetAlertContactsContactOutput

func (i GetAlertContactsContactArgs) ToGetAlertContactsContactOutput() GetAlertContactsContactOutput

func (GetAlertContactsContactArgs) ToGetAlertContactsContactOutputWithContext

func (i GetAlertContactsContactArgs) ToGetAlertContactsContactOutputWithContext(ctx context.Context) GetAlertContactsContactOutput

type GetAlertContactsContactArray

type GetAlertContactsContactArray []GetAlertContactsContactInput

func (GetAlertContactsContactArray) ElementType

func (GetAlertContactsContactArray) ToGetAlertContactsContactArrayOutput

func (i GetAlertContactsContactArray) ToGetAlertContactsContactArrayOutput() GetAlertContactsContactArrayOutput

func (GetAlertContactsContactArray) ToGetAlertContactsContactArrayOutputWithContext

func (i GetAlertContactsContactArray) ToGetAlertContactsContactArrayOutputWithContext(ctx context.Context) GetAlertContactsContactArrayOutput

type GetAlertContactsContactArrayInput

type GetAlertContactsContactArrayInput interface {
	pulumi.Input

	ToGetAlertContactsContactArrayOutput() GetAlertContactsContactArrayOutput
	ToGetAlertContactsContactArrayOutputWithContext(context.Context) GetAlertContactsContactArrayOutput
}

GetAlertContactsContactArrayInput is an input type that accepts GetAlertContactsContactArray and GetAlertContactsContactArrayOutput values. You can construct a concrete instance of `GetAlertContactsContactArrayInput` via:

GetAlertContactsContactArray{ GetAlertContactsContactArgs{...} }

type GetAlertContactsContactArrayOutput

type GetAlertContactsContactArrayOutput struct{ *pulumi.OutputState }

func (GetAlertContactsContactArrayOutput) ElementType

func (GetAlertContactsContactArrayOutput) Index

func (GetAlertContactsContactArrayOutput) ToGetAlertContactsContactArrayOutput

func (o GetAlertContactsContactArrayOutput) ToGetAlertContactsContactArrayOutput() GetAlertContactsContactArrayOutput

func (GetAlertContactsContactArrayOutput) ToGetAlertContactsContactArrayOutputWithContext

func (o GetAlertContactsContactArrayOutput) ToGetAlertContactsContactArrayOutputWithContext(ctx context.Context) GetAlertContactsContactArrayOutput

type GetAlertContactsContactInput

type GetAlertContactsContactInput interface {
	pulumi.Input

	ToGetAlertContactsContactOutput() GetAlertContactsContactOutput
	ToGetAlertContactsContactOutputWithContext(context.Context) GetAlertContactsContactOutput
}

GetAlertContactsContactInput is an input type that accepts GetAlertContactsContactArgs and GetAlertContactsContactOutput values. You can construct a concrete instance of `GetAlertContactsContactInput` via:

GetAlertContactsContactArgs{...}

type GetAlertContactsContactOutput

type GetAlertContactsContactOutput struct{ *pulumi.OutputState }

func (GetAlertContactsContactOutput) AlertContactId

Contact ID.

func (GetAlertContactsContactOutput) AlertContactName

func (o GetAlertContactsContactOutput) AlertContactName() pulumi.StringOutput

The name of the alert contact.

func (GetAlertContactsContactOutput) CreateTime

The Creation Time Timestamp.

func (GetAlertContactsContactOutput) DingRobotWebhookUrl

func (o GetAlertContactsContactOutput) DingRobotWebhookUrl() pulumi.StringOutput

The webhook URL of the DingTalk chatbot.

func (GetAlertContactsContactOutput) ElementType

func (GetAlertContactsContactOutput) Email

The email address of the alert contact.

func (GetAlertContactsContactOutput) Id

The ID of the Alert Contact.

func (GetAlertContactsContactOutput) PhoneNum

The mobile number of the alert contact.

func (GetAlertContactsContactOutput) SystemNoc

Specifies whether the alert contact receives system notifications.

func (GetAlertContactsContactOutput) ToGetAlertContactsContactOutput

func (o GetAlertContactsContactOutput) ToGetAlertContactsContactOutput() GetAlertContactsContactOutput

func (GetAlertContactsContactOutput) ToGetAlertContactsContactOutputWithContext

func (o GetAlertContactsContactOutput) ToGetAlertContactsContactOutputWithContext(ctx context.Context) GetAlertContactsContactOutput

func (GetAlertContactsContactOutput) Webhook

Webhook Information.

type GetAlertContactsResult

type GetAlertContactsResult struct {
	AlertContactName *string                   `pulumi:"alertContactName"`
	Contacts         []GetAlertContactsContact `pulumi:"contacts"`
	Email            *string                   `pulumi:"email"`
	// The provider-assigned unique ID for this managed resource.
	Id         string   `pulumi:"id"`
	Ids        []string `pulumi:"ids"`
	NameRegex  *string  `pulumi:"nameRegex"`
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	PhoneNum   *string  `pulumi:"phoneNum"`
}

A collection of values returned by getAlertContacts.

func GetAlertContacts

func GetAlertContacts(ctx *pulumi.Context, args *GetAlertContactsArgs, opts ...pulumi.InvokeOption) (*GetAlertContactsResult, error)

This data source provides the Arms Alert Contacts of the current Alibaba Cloud user.

> **NOTE:** Available in v1.129.0+.

## Example Usage

Basic Usage

```go 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 {
		ids, err := arms.GetAlertContacts(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("armsAlertContactId1", ids.Contacts[0].Id)
		opt0 := "^my-AlertContact"
		nameRegex, err := arms.GetAlertContacts(ctx, &arms.GetAlertContactsArgs{
			NameRegex: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("armsAlertContactId2", nameRegex.Contacts[0].Id)
		return nil
	})
}

```

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL