Skip to content

Commit 450db65

Browse files
authored
feat(COC): add COC war rooms data source (#6970)
1 parent 9c45695 commit 450db65

File tree

4 files changed

+865
-0
lines changed

4 files changed

+865
-0
lines changed

docs/data-sources/coc_war_rooms.md

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
subcategory: "Cloud Operations Center (COC)"
3+
layout: "huaweicloud"
4+
page_title: "HuaweiCloud: huaweicloud_coc_war_rooms"
5+
description: |-
6+
Use this data source to get the list of COC war rooms.
7+
---
8+
9+
# huaweicloud_coc_war_rooms
10+
11+
Use this data source to get the list of COC war rooms.
12+
13+
## Example Usage
14+
15+
```hcl
16+
data "huaweicloud_coc_war_rooms" "test" {}
17+
```
18+
19+
## Argument Reference
20+
21+
The following arguments are supported:
22+
23+
* `incident_num` - (Optional, String) Specifies the incident ticket number.
24+
25+
* `title` - (Optional, String) Specifies the war room name.
26+
27+
* `region_code_list` - (Optional, List) Specifies the regions.
28+
29+
* `incident_levels` - (Optional, List) Specifies the incident level.
30+
Values can be as follows:
31+
+ **level_10**: P1.
32+
+ **level_20**: P2.
33+
+ **level_30**: P3.
34+
+ **level_40**: P4.
35+
+ **level_50**: P5.
36+
37+
* `impacted_application_ids` - (Optional, List) Specifies the ID of the affected application.
38+
39+
* `admin` - (Optional, List) Specifies the war room administrator user ID.
40+
41+
* `status` - (Optional, List) Specifies the war room status.
42+
Values can be as follows:
43+
+ **1**: Start war room.
44+
+ **3**: Fault definition.
45+
+ **7**: The fault has been recovered.
46+
+ **20**: Close war room.
47+
48+
* `triggered_start_time` - (Optional, Int) Specifies the trigger start time of the war room. The default value is 30
49+
days before the start time.
50+
51+
* `triggered_end_time` - (Optional, Int) Specifies the trigger end time of the war room. The default value is current
52+
time.
53+
54+
* `occur_start_time` - (Optional, Int) Specifies the occurrence start time.
55+
56+
* `occur_end_time` - (Optional, Int) Specifies the occurrence end time.
57+
58+
* `recover_start_time` - (Optional, Int) Specifies the recovery start time.
59+
60+
* `recover_end_time` - (Optional, Int) Specifies the recovery end time.
61+
62+
* `notification_level` - (Optional, List) Specifies the notification level.
63+
Values can be as follows:
64+
+ **level_10**: P1.
65+
+ **level_20**: P2.
66+
+ **level_30**: P3.
67+
+ **level_40**: P4.
68+
+ **level_50**: P5.
69+
70+
* `enterprise_project_ids` - (Optional, List) Specifies the enterprise project ID.
71+
72+
* `war_room_num` - (Optional, String) Specifies the war room ticket number.
73+
74+
* `statistic_flag` - (Optional, Bool) Specifies whether to collect statistics. If the value is **false**, basic
75+
information is returned. If the value is **true**, only the statistics result, including `total_num`, `running_num`,
76+
and `closed_num`, is returned. The default value is **false**.
77+
78+
* `current_users` - (Optional, List) Specifies the current user ID.
79+
80+
* `war_room_nums` - (Optional, List) Specifies the war room ticket number. When this filter is present, other filter
81+
conditions are ignored.
82+
83+
## Attribute Reference
84+
85+
In addition to all arguments above, the following attributes are exported:
86+
87+
* `id` - The data source ID.
88+
89+
* `list` - Indicates the war room information.
90+
91+
The [list](#data_list_struct) structure is documented below.
92+
93+
* `running_num` - Indicates the total number of war rooms in progress.
94+
95+
* `closed_num` - Indicates the total number of closed war rooms.
96+
97+
* `total_num` - Indicates the total number of war rooms.
98+
99+
<a name="data_list_struct"></a>
100+
The `list` block supports:
101+
102+
* `id` - Indicates the primary key.
103+
104+
* `title` - Indicates the title.
105+
106+
* `admin` - Indicates the war room administrator user ID.
107+
108+
* `recover_member` - Indicates the members of recovery.
109+
110+
* `recover_leader` - Indicates the primary recovery owner.
111+
112+
* `incident` - Indicates the incident.
113+
114+
The [incident](#list_incident_struct) structure is documented below.
115+
116+
* `source` - Indicates the incident source.
117+
118+
* `regions` - Indicates the affected regions.
119+
120+
The [regions](#list_regions_struct) structure is documented below.
121+
122+
* `change_num` - Indicates the change ticket number.
123+
124+
* `occur_time` - Indicates the occurrence start time.
125+
126+
* `recover_time` - Indicates the fault recovery time.
127+
128+
* `fault_cause` - Indicates the fault cause.
129+
130+
* `create_time` - Indicates the creation time.
131+
132+
* `first_report_time` - Indicates the first notification time.
133+
134+
* `recovery_notification_time` - Indicates the recovery notification time.
135+
136+
* `fault_impact` - Indicates the impact of the fault.
137+
138+
* `description` - Indicates the war room description.
139+
140+
* `circular_level` - Indicates the notification level. The notification level is the same as the incident level in the
141+
tenant zone.
142+
143+
* `war_room_status` - Indicates the war room status.
144+
145+
The [war_room_status](#list_war_room_status_struct) structure is documented below.
146+
147+
* `impacted_application` - Indicates the affected applications.
148+
149+
The [impacted_application](#list_impacted_application_struct) structure is documented below.
150+
151+
* `processing_duration` - Indicates the handling duration, the unit is minutes.
152+
153+
* `restoration_duration` - Indicates the recovery duration, the unit is minutes.
154+
155+
* `war_room_num` - Indicates the war room ticket number.
156+
157+
* `enterprise_project_id` - Indicates the enterprise project ID.
158+
159+
<a name="list_incident_struct"></a>
160+
The `incident` block supports:
161+
162+
* `id` - Indicates the incident primary key.
163+
164+
* `incident_id` - Indicates the incident ID.
165+
166+
* `is_change_event` - Indicates whether the incident is a change incident.
167+
168+
* `failure_level` - Indicates the incident level.
169+
170+
* `incident_url` - Indicates the incident URL.
171+
172+
<a name="list_regions_struct"></a>
173+
The `regions` block supports:
174+
175+
* `code` - Indicates the region primary key.
176+
177+
* `name` - Indicates the region name.
178+
179+
<a name="list_war_room_status_struct"></a>
180+
The `war_room_status` block supports:
181+
182+
* `id` - Indicates the war room status enumeration value ID .
183+
184+
* `name_zh` - Indicates the Chinese name of the war room status enumeration value.
185+
186+
* `name_en` - Indicates the English name of the war room status enumeration value.
187+
188+
* `type` - Indicates the war room status enumeration type.
189+
190+
<a name="list_impacted_application_struct"></a>
191+
The `impacted_application` block supports:
192+
193+
* `id` - Indicates the affected application primary key.
194+
195+
* `name` - Indicates the affected application name.

huaweicloud/provider.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ func Provider() *schema.Provider {
673673
"huaweicloud_coc_script_order_statistics": coc.DataSourceCocScriptOrderStatistics(),
674674
"huaweicloud_coc_script_order_batches": coc.DataSourceCocScriptOrderBatches(),
675675
"huaweicloud_coc_script_order_batch_details": coc.DataSourceCocScriptOrderBatchDetails(),
676+
"huaweicloud_coc_war_rooms": coc.DataSourceCocWarRooms(),
676677

677678
"huaweicloud_compute_flavors": ecs.DataSourceEcsFlavors(),
678679
"huaweicloud_compute_instance": ecs.DataSourceComputeInstance(),

0 commit comments

Comments
 (0)