alicloud.arms.AlertRobot
Explore with Pulumi AI
Provides a Application Real-Time Monitoring Service (ARMS) Alert Robot resource.
For information about Application Real-Time Monitoring Service (ARMS) Alert Robot and how to use it, see What is Alert Robot.
NOTE: Available since v1.237.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const wechat = new alicloud.arms.AlertRobot("wechat", {
alertRobotName: "example_wechat",
robotType: "wechat",
robotAddr: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=1c704e23",
dailyNoc: true,
dailyNocTime: "09:30,17:00",
});
const dingding = new alicloud.arms.AlertRobot("dingding", {
alertRobotName: "example_dingding",
robotType: "dingding",
robotAddr: "https://oapi.dingtalk.com/robot/send?access_token=1c704e23",
dailyNoc: true,
dailyNocTime: "09:30,17:00",
});
const feishu = new alicloud.arms.AlertRobot("feishu", {
alertRobotName: "example_feishu",
robotType: "feishu",
robotAddr: "https://open.feishu.cn/open-apis/bot/v2/hook/a48efa01",
dailyNoc: true,
dailyNocTime: "09:30,17:00",
});
import pulumi
import pulumi_alicloud as alicloud
wechat = alicloud.arms.AlertRobot("wechat",
alert_robot_name="example_wechat",
robot_type="wechat",
robot_addr="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=1c704e23",
daily_noc=True,
daily_noc_time="09:30,17:00")
dingding = alicloud.arms.AlertRobot("dingding",
alert_robot_name="example_dingding",
robot_type="dingding",
robot_addr="https://oapi.dingtalk.com/robot/send?access_token=1c704e23",
daily_noc=True,
daily_noc_time="09:30,17:00")
feishu = alicloud.arms.AlertRobot("feishu",
alert_robot_name="example_feishu",
robot_type="feishu",
robot_addr="https://open.feishu.cn/open-apis/bot/v2/hook/a48efa01",
daily_noc=True,
daily_noc_time="09:30,17:00")
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.NewAlertRobot(ctx, "wechat", &arms.AlertRobotArgs{
AlertRobotName: pulumi.String("example_wechat"),
RobotType: pulumi.String("wechat"),
RobotAddr: pulumi.String("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=1c704e23"),
DailyNoc: pulumi.Bool(true),
DailyNocTime: pulumi.String("09:30,17:00"),
})
if err != nil {
return err
}
_, err = arms.NewAlertRobot(ctx, "dingding", &arms.AlertRobotArgs{
AlertRobotName: pulumi.String("example_dingding"),
RobotType: pulumi.String("dingding"),
RobotAddr: pulumi.String("https://oapi.dingtalk.com/robot/send?access_token=1c704e23"),
DailyNoc: pulumi.Bool(true),
DailyNocTime: pulumi.String("09:30,17:00"),
})
if err != nil {
return err
}
_, err = arms.NewAlertRobot(ctx, "feishu", &arms.AlertRobotArgs{
AlertRobotName: pulumi.String("example_feishu"),
RobotType: pulumi.String("feishu"),
RobotAddr: pulumi.String("https://open.feishu.cn/open-apis/bot/v2/hook/a48efa01"),
DailyNoc: pulumi.Bool(true),
DailyNocTime: pulumi.String("09:30,17:00"),
})
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 wechat = new AliCloud.Arms.AlertRobot("wechat", new()
{
AlertRobotName = "example_wechat",
RobotType = "wechat",
RobotAddr = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=1c704e23",
DailyNoc = true,
DailyNocTime = "09:30,17:00",
});
var dingding = new AliCloud.Arms.AlertRobot("dingding", new()
{
AlertRobotName = "example_dingding",
RobotType = "dingding",
RobotAddr = "https://oapi.dingtalk.com/robot/send?access_token=1c704e23",
DailyNoc = true,
DailyNocTime = "09:30,17:00",
});
var feishu = new AliCloud.Arms.AlertRobot("feishu", new()
{
AlertRobotName = "example_feishu",
RobotType = "feishu",
RobotAddr = "https://open.feishu.cn/open-apis/bot/v2/hook/a48efa01",
DailyNoc = true,
DailyNocTime = "09:30,17:00",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.arms.AlertRobot;
import com.pulumi.alicloud.arms.AlertRobotArgs;
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 wechat = new AlertRobot("wechat", AlertRobotArgs.builder()
.alertRobotName("example_wechat")
.robotType("wechat")
.robotAddr("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=1c704e23")
.dailyNoc(true)
.dailyNocTime("09:30,17:00")
.build());
var dingding = new AlertRobot("dingding", AlertRobotArgs.builder()
.alertRobotName("example_dingding")
.robotType("dingding")
.robotAddr("https://oapi.dingtalk.com/robot/send?access_token=1c704e23")
.dailyNoc(true)
.dailyNocTime("09:30,17:00")
.build());
var feishu = new AlertRobot("feishu", AlertRobotArgs.builder()
.alertRobotName("example_feishu")
.robotType("feishu")
.robotAddr("https://open.feishu.cn/open-apis/bot/v2/hook/a48efa01")
.dailyNoc(true)
.dailyNocTime("09:30,17:00")
.build());
}
}
resources:
wechat:
type: alicloud:arms:AlertRobot
properties:
alertRobotName: example_wechat
robotType: wechat
robotAddr: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=1c704e23
dailyNoc: true
dailyNocTime: 09:30,17:00
dingding:
type: alicloud:arms:AlertRobot
properties:
alertRobotName: example_dingding
robotType: dingding
robotAddr: https://oapi.dingtalk.com/robot/send?access_token=1c704e23
dailyNoc: true
dailyNocTime: 09:30,17:00
feishu:
type: alicloud:arms:AlertRobot
properties:
alertRobotName: example_feishu
robotType: feishu
robotAddr: https://open.feishu.cn/open-apis/bot/v2/hook/a48efa01
dailyNoc: true
dailyNocTime: 09:30,17:00
Create AlertRobot Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AlertRobot(name: string, args: AlertRobotArgs, opts?: CustomResourceOptions);
@overload
def AlertRobot(resource_name: str,
args: AlertRobotArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AlertRobot(resource_name: str,
opts: Optional[ResourceOptions] = None,
alert_robot_name: Optional[str] = None,
robot_addr: Optional[str] = None,
robot_type: Optional[str] = None,
daily_noc: Optional[bool] = None,
daily_noc_time: Optional[str] = None)
func NewAlertRobot(ctx *Context, name string, args AlertRobotArgs, opts ...ResourceOption) (*AlertRobot, error)
public AlertRobot(string name, AlertRobotArgs args, CustomResourceOptions? opts = null)
public AlertRobot(String name, AlertRobotArgs args)
public AlertRobot(String name, AlertRobotArgs args, CustomResourceOptions options)
type: alicloud:arms:AlertRobot
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 AlertRobotArgs
- 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 AlertRobotArgs
- 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 AlertRobotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertRobotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertRobotArgs
- 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 alertRobotResource = new AliCloud.Arms.AlertRobot("alertRobotResource", new()
{
AlertRobotName = "string",
RobotAddr = "string",
RobotType = "string",
DailyNoc = false,
DailyNocTime = "string",
});
example, err := arms.NewAlertRobot(ctx, "alertRobotResource", &arms.AlertRobotArgs{
AlertRobotName: pulumi.String("string"),
RobotAddr: pulumi.String("string"),
RobotType: pulumi.String("string"),
DailyNoc: pulumi.Bool(false),
DailyNocTime: pulumi.String("string"),
})
var alertRobotResource = new AlertRobot("alertRobotResource", AlertRobotArgs.builder()
.alertRobotName("string")
.robotAddr("string")
.robotType("string")
.dailyNoc(false)
.dailyNocTime("string")
.build());
alert_robot_resource = alicloud.arms.AlertRobot("alertRobotResource",
alert_robot_name="string",
robot_addr="string",
robot_type="string",
daily_noc=False,
daily_noc_time="string")
const alertRobotResource = new alicloud.arms.AlertRobot("alertRobotResource", {
alertRobotName: "string",
robotAddr: "string",
robotType: "string",
dailyNoc: false,
dailyNocTime: "string",
});
type: alicloud:arms:AlertRobot
properties:
alertRobotName: string
dailyNoc: false
dailyNocTime: string
robotAddr: string
robotType: string
AlertRobot Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AlertRobot resource accepts the following input properties:
- Alert
Robot stringName - The name of the resource.
- Robot
Addr string - The webhook url of the robot.
- Robot
Type string - The type of the robot, Valid values:
wechat
,dingding
,feishu
. - Daily
Noc bool - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - Daily
Noc stringTime - The time of the daily notification.
- Alert
Robot stringName - The name of the resource.
- Robot
Addr string - The webhook url of the robot.
- Robot
Type string - The type of the robot, Valid values:
wechat
,dingding
,feishu
. - Daily
Noc bool - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - Daily
Noc stringTime - The time of the daily notification.
- alert
Robot StringName - The name of the resource.
- robot
Addr String - The webhook url of the robot.
- robot
Type String - The type of the robot, Valid values:
wechat
,dingding
,feishu
. - daily
Noc Boolean - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - daily
Noc StringTime - The time of the daily notification.
- alert
Robot stringName - The name of the resource.
- robot
Addr string - The webhook url of the robot.
- robot
Type string - The type of the robot, Valid values:
wechat
,dingding
,feishu
. - daily
Noc boolean - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - daily
Noc stringTime - The time of the daily notification.
- alert_
robot_ strname - The name of the resource.
- robot_
addr str - The webhook url of the robot.
- robot_
type str - The type of the robot, Valid values:
wechat
,dingding
,feishu
. - daily_
noc bool - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - daily_
noc_ strtime - The time of the daily notification.
- alert
Robot StringName - The name of the resource.
- robot
Addr String - The webhook url of the robot.
- robot
Type String - The type of the robot, Valid values:
wechat
,dingding
,feishu
. - daily
Noc Boolean - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - daily
Noc StringTime - The time of the daily notification.
Outputs
All input properties are implicitly available as output properties. Additionally, the AlertRobot 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 AlertRobot Resource
Get an existing AlertRobot 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?: AlertRobotState, opts?: CustomResourceOptions): AlertRobot
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alert_robot_name: Optional[str] = None,
daily_noc: Optional[bool] = None,
daily_noc_time: Optional[str] = None,
robot_addr: Optional[str] = None,
robot_type: Optional[str] = None) -> AlertRobot
func GetAlertRobot(ctx *Context, name string, id IDInput, state *AlertRobotState, opts ...ResourceOption) (*AlertRobot, error)
public static AlertRobot Get(string name, Input<string> id, AlertRobotState? state, CustomResourceOptions? opts = null)
public static AlertRobot get(String name, Output<String> id, AlertRobotState 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.
- Alert
Robot stringName - The name of the resource.
- Daily
Noc bool - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - Daily
Noc stringTime - The time of the daily notification.
- Robot
Addr string - The webhook url of the robot.
- Robot
Type string - The type of the robot, Valid values:
wechat
,dingding
,feishu
.
- Alert
Robot stringName - The name of the resource.
- Daily
Noc bool - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - Daily
Noc stringTime - The time of the daily notification.
- Robot
Addr string - The webhook url of the robot.
- Robot
Type string - The type of the robot, Valid values:
wechat
,dingding
,feishu
.
- alert
Robot StringName - The name of the resource.
- daily
Noc Boolean - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - daily
Noc StringTime - The time of the daily notification.
- robot
Addr String - The webhook url of the robot.
- robot
Type String - The type of the robot, Valid values:
wechat
,dingding
,feishu
.
- alert
Robot stringName - The name of the resource.
- daily
Noc boolean - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - daily
Noc stringTime - The time of the daily notification.
- robot
Addr string - The webhook url of the robot.
- robot
Type string - The type of the robot, Valid values:
wechat
,dingding
,feishu
.
- alert_
robot_ strname - The name of the resource.
- daily_
noc bool - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - daily_
noc_ strtime - The time of the daily notification.
- robot_
addr str - The webhook url of the robot.
- robot_
type str - The type of the robot, Valid values:
wechat
,dingding
,feishu
.
- alert
Robot StringName - The name of the resource.
- daily
Noc Boolean - Specifies whether the alert robot receives daily notifications. Valid values:
true
: receives daily notifications.false
: does not receive daily notifications, default tofalse
. - daily
Noc StringTime - The time of the daily notification.
- robot
Addr String - The webhook url of the robot.
- robot
Type String - The type of the robot, Valid values:
wechat
,dingding
,feishu
.
Import
Application Real-Time Monitoring Service (ARMS) Alert Robot can be imported using the id, e.g.
$ pulumi import alicloud:arms/alertRobot:AlertRobot 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.