Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Improves description for amrs. #7949

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 48 additions & 10 deletions website/docs/d/arms_dispatch_rules.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,56 @@ This data source provides the Arms Dispatch Rules of the current Alibaba Cloud u
Basic Usage

```terraform
data "alicloud_arms_dispatch_rules" "ids" {}
output "arms_dispatch_rule_id_1" {
value = data.alicloud_arms_dispatch_rules.ids.rules.0.id
resource "alicloud_arms_alert_contact" "default" {
alert_contact_name = "example_value"
email = "example_value@aaa.com"
}

data "alicloud_arms_dispatch_rules" "nameRegex" {
name_regex = "^my-DispatchRule"
resource "alicloud_arms_alert_contact_group" "default" {
alert_contact_group_name = "example_value"
contact_ids = [alicloud_arms_alert_contact.default.id]
}
output "arms_dispatch_rule_id_2" {
value = data.alicloud_arms_dispatch_rules.nameRegex.rules.0.id

resource "alicloud_arms_dispatch_rule" "default" {
dispatch_rule_name = "example_value"
dispatch_type = "CREATE_ALERT"
group_rules {
group_wait_time = 5
group_interval = 15
repeat_interval = 100
grouping_fields = ["alertname"]
}
label_match_expression_grid {
label_match_expression_groups {
label_match_expressions {
key = "_aliyun_arms_involvedObject_kind"
value = "app"
operator = "eq"
}
}
}

notify_rules {
notify_objects {
notify_object_id = alicloud_arms_alert_contact.default.id
notify_type = "ARMS_CONTACT"
name = "example_value"
}
notify_objects {
notify_object_id = alicloud_arms_alert_contact_group.default.id
notify_type = "ARMS_CONTACT_GROUP"
name = "example_value"
}
notify_channels = ["dingTalk", "wechat"]
notify_start_time = "10:00"
notify_end_time = "23:00"
}
}

data "alicloud_arms_dispatch_rules" "ids" {}

output "arms_dispatch_rule_id_1" {
value = data.alicloud_arms_dispatch_rules.ids.rules.0.id
}
```

## Argument Reference
Expand Down Expand Up @@ -68,8 +106,8 @@ The following attributes are exported in addition to the arguments listed above:

* `notify_rules` - Sets the notification rule.
* `notify_channels` - A list of notification methods.
* `notify_start_time` - Start time of notification.
* `notify_end_time` - End time of notification.
* `notify_start_time` - (Available since v1.237.0) Start time of notification.
* `notify_end_time` - (Available since v1.237.0) End time of notification.
* `notify_objects` - Sets the notification object.
* `notify_object_id` - The ID of the contact or contact group.
* `name` - The name of the contact or contact group.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/arms_dispatch_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ The notify_rules supports the following:

* `notify_objects` - (Required) Sets the notification object. See [`notify_objects`](#notify_rules-notify_objects) below.
* `notify_channels` - (Required, List<String>) The notification method. Valid values: dingTalk, sms, webhook, email, and wechat.
* `notify_start_time` - (Required) Start time of notification.
* `notify_end_time` - (Required) End time of notification.
* `notify_start_time` - (Required, Available since v1.237.0) Start time of notification.
* `notify_end_time` - (Required, Available since v1.237.0) End time of notification.

### `notify_rules-notify_objects`
The notify_objects supports the following:
Expand Down
Loading