pulumi-alicloud 3.79.0a1747977638__py3-none-any.whl → 3.79.0a1748578459__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-alicloud might be problematic. Click here for more details.
- pulumi_alicloud/__init__.py +40 -0
- pulumi_alicloud/alb/_inputs.py +21 -105
- pulumi_alicloud/alb/get_load_balancers.py +169 -18
- pulumi_alicloud/alb/listener.py +28 -56
- pulumi_alicloud/alb/outputs.py +150 -105
- pulumi_alicloud/cs/_inputs.py +54 -0
- pulumi_alicloud/cs/get_kubernetes_version.py +4 -4
- pulumi_alicloud/cs/managed_kubernetes.py +129 -7
- pulumi_alicloud/cs/outputs.py +49 -0
- pulumi_alicloud/ecs/__init__.py +1 -0
- pulumi_alicloud/ecs/_inputs.py +40 -0
- pulumi_alicloud/ecs/get_dedicated_hosts.py +49 -22
- pulumi_alicloud/ecs/get_instances.py +4 -3
- pulumi_alicloud/ecs/instance.py +94 -0
- pulumi_alicloud/ecs/outputs.py +129 -39
- pulumi_alicloud/ecs/ram_role_attachment.py +406 -0
- pulumi_alicloud/eflo/__init__.py +1 -0
- pulumi_alicloud/eflo/vsc.py +433 -0
- pulumi_alicloud/elasticsearch/instance.py +7 -7
- pulumi_alicloud/ess/outputs.py +226 -4
- pulumi_alicloud/expressconnect/router_vpc_association.py +56 -49
- pulumi_alicloud/fc/__init__.py +1 -0
- pulumi_alicloud/fc/get_v3_triggers.py +277 -0
- pulumi_alicloud/fc/outputs.py +192 -0
- pulumi_alicloud/lindorm/__init__.py +1 -0
- pulumi_alicloud/lindorm/public_network.py +288 -0
- pulumi_alicloud/maxcompute/project.py +2 -4
- pulumi_alicloud/oos/get_parameters.py +72 -28
- pulumi_alicloud/oos/outputs.py +10 -10
- pulumi_alicloud/pai/__init__.py +1 -0
- pulumi_alicloud/pai/workspace_user_config.py +356 -0
- pulumi_alicloud/polardb/cluster.py +155 -0
- pulumi_alicloud/pulumi-plugin.json +1 -1
- pulumi_alicloud/pvtz/get_zone_records.py +66 -35
- pulumi_alicloud/pvtz/get_zones.py +49 -32
- pulumi_alicloud/pvtz/outputs.py +60 -56
- pulumi_alicloud/ram/policy.py +21 -35
- pulumi_alicloud/ram/role_attachment.py +6 -2
- pulumi_alicloud/rds/__init__.py +1 -0
- pulumi_alicloud/rds/db_proxy_public.py +512 -0
- pulumi_alicloud/rds/instance.py +35 -35
- pulumi_alicloud/sls/__init__.py +1 -0
- pulumi_alicloud/sls/get_alerts.py +463 -0
- pulumi_alicloud/sls/outputs.py +975 -0
- {pulumi_alicloud-3.79.0a1747977638.dist-info → pulumi_alicloud-3.79.0a1748578459.dist-info}/METADATA +1 -1
- {pulumi_alicloud-3.79.0a1747977638.dist-info → pulumi_alicloud-3.79.0a1748578459.dist-info}/RECORD +48 -41
- {pulumi_alicloud-3.79.0a1747977638.dist-info → pulumi_alicloud-3.79.0a1748578459.dist-info}/WHEEL +1 -1
- {pulumi_alicloud-3.79.0a1747977638.dist-info → pulumi_alicloud-3.79.0a1748578459.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins
|
|
6
|
+
import copy
|
|
7
|
+
import warnings
|
|
8
|
+
import sys
|
|
9
|
+
import pulumi
|
|
10
|
+
import pulumi.runtime
|
|
11
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
12
|
+
if sys.version_info >= (3, 11):
|
|
13
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
14
|
+
else:
|
|
15
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
16
|
+
from .. import _utilities
|
|
17
|
+
from . import outputs
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
'GetAlertsResult',
|
|
21
|
+
'AwaitableGetAlertsResult',
|
|
22
|
+
'get_alerts',
|
|
23
|
+
'get_alerts_output',
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
@pulumi.output_type
|
|
27
|
+
class GetAlertsResult:
|
|
28
|
+
"""
|
|
29
|
+
A collection of values returned by getAlerts.
|
|
30
|
+
"""
|
|
31
|
+
def __init__(__self__, alerts=None, id=None, ids=None, name_regex=None, names=None, output_file=None, project_name=None):
|
|
32
|
+
if alerts and not isinstance(alerts, list):
|
|
33
|
+
raise TypeError("Expected argument 'alerts' to be a list")
|
|
34
|
+
pulumi.set(__self__, "alerts", alerts)
|
|
35
|
+
if id and not isinstance(id, str):
|
|
36
|
+
raise TypeError("Expected argument 'id' to be a str")
|
|
37
|
+
pulumi.set(__self__, "id", id)
|
|
38
|
+
if ids and not isinstance(ids, list):
|
|
39
|
+
raise TypeError("Expected argument 'ids' to be a list")
|
|
40
|
+
pulumi.set(__self__, "ids", ids)
|
|
41
|
+
if name_regex and not isinstance(name_regex, str):
|
|
42
|
+
raise TypeError("Expected argument 'name_regex' to be a str")
|
|
43
|
+
pulumi.set(__self__, "name_regex", name_regex)
|
|
44
|
+
if names and not isinstance(names, list):
|
|
45
|
+
raise TypeError("Expected argument 'names' to be a list")
|
|
46
|
+
pulumi.set(__self__, "names", names)
|
|
47
|
+
if output_file and not isinstance(output_file, str):
|
|
48
|
+
raise TypeError("Expected argument 'output_file' to be a str")
|
|
49
|
+
pulumi.set(__self__, "output_file", output_file)
|
|
50
|
+
if project_name and not isinstance(project_name, str):
|
|
51
|
+
raise TypeError("Expected argument 'project_name' to be a str")
|
|
52
|
+
pulumi.set(__self__, "project_name", project_name)
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
@pulumi.getter
|
|
56
|
+
def alerts(self) -> Sequence['outputs.GetAlertsAlertResult']:
|
|
57
|
+
"""
|
|
58
|
+
A list of Alert Entries. Each element contains the following attributes:
|
|
59
|
+
"""
|
|
60
|
+
return pulumi.get(self, "alerts")
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
@pulumi.getter
|
|
64
|
+
def id(self) -> builtins.str:
|
|
65
|
+
"""
|
|
66
|
+
The provider-assigned unique ID for this managed resource.
|
|
67
|
+
"""
|
|
68
|
+
return pulumi.get(self, "id")
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
@pulumi.getter
|
|
72
|
+
def ids(self) -> Sequence[builtins.str]:
|
|
73
|
+
"""
|
|
74
|
+
A list of Alert IDs.
|
|
75
|
+
"""
|
|
76
|
+
return pulumi.get(self, "ids")
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
@pulumi.getter(name="nameRegex")
|
|
80
|
+
def name_regex(self) -> Optional[builtins.str]:
|
|
81
|
+
return pulumi.get(self, "name_regex")
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
@pulumi.getter
|
|
85
|
+
def names(self) -> Sequence[builtins.str]:
|
|
86
|
+
"""
|
|
87
|
+
A list of name of Alerts.
|
|
88
|
+
"""
|
|
89
|
+
return pulumi.get(self, "names")
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
@pulumi.getter(name="outputFile")
|
|
93
|
+
def output_file(self) -> Optional[builtins.str]:
|
|
94
|
+
return pulumi.get(self, "output_file")
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
@pulumi.getter(name="projectName")
|
|
98
|
+
def project_name(self) -> builtins.str:
|
|
99
|
+
return pulumi.get(self, "project_name")
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class AwaitableGetAlertsResult(GetAlertsResult):
|
|
103
|
+
# pylint: disable=using-constant-test
|
|
104
|
+
def __await__(self):
|
|
105
|
+
if False:
|
|
106
|
+
yield self
|
|
107
|
+
return GetAlertsResult(
|
|
108
|
+
alerts=self.alerts,
|
|
109
|
+
id=self.id,
|
|
110
|
+
ids=self.ids,
|
|
111
|
+
name_regex=self.name_regex,
|
|
112
|
+
names=self.names,
|
|
113
|
+
output_file=self.output_file,
|
|
114
|
+
project_name=self.project_name)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def get_alerts(ids: Optional[Sequence[builtins.str]] = None,
|
|
118
|
+
name_regex: Optional[builtins.str] = None,
|
|
119
|
+
output_file: Optional[builtins.str] = None,
|
|
120
|
+
project_name: Optional[builtins.str] = None,
|
|
121
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlertsResult:
|
|
122
|
+
"""
|
|
123
|
+
This data source provides Sls Alert available to the user.[What is Alert](https://next.api.alibabacloud.com/document/Sls/2020-12-30/CreateAlert)
|
|
124
|
+
|
|
125
|
+
> **NOTE:** Available since v1.250.0.
|
|
126
|
+
|
|
127
|
+
## Example Usage
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
import pulumi
|
|
131
|
+
import pulumi_alicloud as alicloud
|
|
132
|
+
|
|
133
|
+
config = pulumi.Config()
|
|
134
|
+
name = config.get("name")
|
|
135
|
+
if name is None:
|
|
136
|
+
name = "terraform-example"
|
|
137
|
+
alert_name = config.get("alertName")
|
|
138
|
+
if alert_name is None:
|
|
139
|
+
alert_name = "openapi-terraform-alert"
|
|
140
|
+
project_name = config.get("projectName")
|
|
141
|
+
if project_name is None:
|
|
142
|
+
project_name = "terraform-alert-example"
|
|
143
|
+
default_ins_mgl = alicloud.log.Project("defaultINsMgl",
|
|
144
|
+
description="terraform-alert-example",
|
|
145
|
+
name="terraform-alert-example")
|
|
146
|
+
default_alert = alicloud.sls.Alert("default",
|
|
147
|
+
configuration={
|
|
148
|
+
"type": "tpl",
|
|
149
|
+
"version": "2",
|
|
150
|
+
"query_lists": [
|
|
151
|
+
{
|
|
152
|
+
"query": "* | select *",
|
|
153
|
+
"time_span_type": "Relative",
|
|
154
|
+
"start": "-15m",
|
|
155
|
+
"end": "now",
|
|
156
|
+
"store_type": "log",
|
|
157
|
+
"project": default_ins_mgl.id,
|
|
158
|
+
"store": "alert",
|
|
159
|
+
"region": "cn-beijing",
|
|
160
|
+
"power_sql_mode": "disable",
|
|
161
|
+
"chart_title": "wkb-chart",
|
|
162
|
+
"dashboard_id": "wkb-dashboard",
|
|
163
|
+
"ui": "{}",
|
|
164
|
+
"role_arn": "acs:ram::1654218965343050:role/aliyunslsalertmonitorrole",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"store_type": "meta",
|
|
168
|
+
"store": "user.rds_ip_whitelist",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"store_type": "meta",
|
|
172
|
+
"store": "myexample1",
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
"group_configuration": {
|
|
176
|
+
"type": "no_group",
|
|
177
|
+
"fields": [
|
|
178
|
+
"a",
|
|
179
|
+
"b",
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
"join_configurations": [
|
|
183
|
+
{
|
|
184
|
+
"type": "no_join",
|
|
185
|
+
"condition": "aa",
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"type": "cross_join",
|
|
189
|
+
"condition": "qqq",
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"type": "inner_join",
|
|
193
|
+
"condition": "fefefe",
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
"severity_configurations": [{
|
|
197
|
+
"severity": 6,
|
|
198
|
+
"eval_condition": {
|
|
199
|
+
"condition": "__count__ > 1",
|
|
200
|
+
"count_condition": "cnt > 0",
|
|
201
|
+
},
|
|
202
|
+
}],
|
|
203
|
+
"labels": [{
|
|
204
|
+
"key": "a",
|
|
205
|
+
"value": "b",
|
|
206
|
+
}],
|
|
207
|
+
"annotations": [{
|
|
208
|
+
"key": "x",
|
|
209
|
+
"value": "y",
|
|
210
|
+
}],
|
|
211
|
+
"auto_annotation": True,
|
|
212
|
+
"send_resolved": False,
|
|
213
|
+
"threshold": 1,
|
|
214
|
+
"no_data_fire": False,
|
|
215
|
+
"sink_event_store": {
|
|
216
|
+
"enabled": True,
|
|
217
|
+
"endpoint": "cn-shanghai-intranet.log.aliyuncs.com",
|
|
218
|
+
"project": "wkb-wangren",
|
|
219
|
+
"event_store": "alert",
|
|
220
|
+
"role_arn": "acs:ram::1654218965343050:role/aliyunlogetlrole",
|
|
221
|
+
},
|
|
222
|
+
"sink_cms": {
|
|
223
|
+
"enabled": False,
|
|
224
|
+
},
|
|
225
|
+
"sink_alerthub": {
|
|
226
|
+
"enabled": False,
|
|
227
|
+
},
|
|
228
|
+
"template_configuration": {
|
|
229
|
+
"template_id": "sls.app.ack.autoscaler.cluster_unhealthy",
|
|
230
|
+
"type": "sys",
|
|
231
|
+
"version": "1.0",
|
|
232
|
+
"lang": "cn",
|
|
233
|
+
},
|
|
234
|
+
"condition_configuration": {
|
|
235
|
+
"condition": "cnt > 3",
|
|
236
|
+
"count_condition": "__count__ < 3",
|
|
237
|
+
},
|
|
238
|
+
"policy_configuration": {
|
|
239
|
+
"alert_policy_id": "sls.builtin.dynamic",
|
|
240
|
+
"action_policy_id": "wkb-action",
|
|
241
|
+
"repeat_interval": "1m",
|
|
242
|
+
},
|
|
243
|
+
"dashboard": "internal-alert",
|
|
244
|
+
"mute_until": 0,
|
|
245
|
+
"no_data_severity": 6,
|
|
246
|
+
"tags": [
|
|
247
|
+
"wkb",
|
|
248
|
+
"wangren",
|
|
249
|
+
"sls",
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
alert_name=alert_name,
|
|
253
|
+
project_name=default_ins_mgl.id,
|
|
254
|
+
schedule={
|
|
255
|
+
"type": "Cron",
|
|
256
|
+
"run_immdiately": True,
|
|
257
|
+
"time_zone": "+0800",
|
|
258
|
+
"delay": 10,
|
|
259
|
+
"cron_expression": "0/5 * * * *",
|
|
260
|
+
},
|
|
261
|
+
display_name="openapi-terraform",
|
|
262
|
+
description="create alert")
|
|
263
|
+
default = alicloud.sls.get_alerts_output(ids=[default_alert.id],
|
|
264
|
+
name_regex=default_alert.alert_name,
|
|
265
|
+
project_name=default_ins_mgl.id)
|
|
266
|
+
pulumi.export("alicloudSlsAlertExampleId", default.alerts[0].id)
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
:param Sequence[builtins.str] ids: A list of Alert IDs. The value is formulated as `<project_name>:<alert_name>`.
|
|
271
|
+
:param builtins.str name_regex: A regex string to filter results by Group Metric Rule name.
|
|
272
|
+
:param builtins.str output_file: File name where to save data source results (after running `pulumi preview`).
|
|
273
|
+
:param builtins.str project_name: Project Name
|
|
274
|
+
"""
|
|
275
|
+
__args__ = dict()
|
|
276
|
+
__args__['ids'] = ids
|
|
277
|
+
__args__['nameRegex'] = name_regex
|
|
278
|
+
__args__['outputFile'] = output_file
|
|
279
|
+
__args__['projectName'] = project_name
|
|
280
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
281
|
+
__ret__ = pulumi.runtime.invoke('alicloud:sls/getAlerts:getAlerts', __args__, opts=opts, typ=GetAlertsResult).value
|
|
282
|
+
|
|
283
|
+
return AwaitableGetAlertsResult(
|
|
284
|
+
alerts=pulumi.get(__ret__, 'alerts'),
|
|
285
|
+
id=pulumi.get(__ret__, 'id'),
|
|
286
|
+
ids=pulumi.get(__ret__, 'ids'),
|
|
287
|
+
name_regex=pulumi.get(__ret__, 'name_regex'),
|
|
288
|
+
names=pulumi.get(__ret__, 'names'),
|
|
289
|
+
output_file=pulumi.get(__ret__, 'output_file'),
|
|
290
|
+
project_name=pulumi.get(__ret__, 'project_name'))
|
|
291
|
+
def get_alerts_output(ids: Optional[pulumi.Input[Optional[Sequence[builtins.str]]]] = None,
|
|
292
|
+
name_regex: Optional[pulumi.Input[Optional[builtins.str]]] = None,
|
|
293
|
+
output_file: Optional[pulumi.Input[Optional[builtins.str]]] = None,
|
|
294
|
+
project_name: Optional[pulumi.Input[builtins.str]] = None,
|
|
295
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlertsResult]:
|
|
296
|
+
"""
|
|
297
|
+
This data source provides Sls Alert available to the user.[What is Alert](https://next.api.alibabacloud.com/document/Sls/2020-12-30/CreateAlert)
|
|
298
|
+
|
|
299
|
+
> **NOTE:** Available since v1.250.0.
|
|
300
|
+
|
|
301
|
+
## Example Usage
|
|
302
|
+
|
|
303
|
+
```python
|
|
304
|
+
import pulumi
|
|
305
|
+
import pulumi_alicloud as alicloud
|
|
306
|
+
|
|
307
|
+
config = pulumi.Config()
|
|
308
|
+
name = config.get("name")
|
|
309
|
+
if name is None:
|
|
310
|
+
name = "terraform-example"
|
|
311
|
+
alert_name = config.get("alertName")
|
|
312
|
+
if alert_name is None:
|
|
313
|
+
alert_name = "openapi-terraform-alert"
|
|
314
|
+
project_name = config.get("projectName")
|
|
315
|
+
if project_name is None:
|
|
316
|
+
project_name = "terraform-alert-example"
|
|
317
|
+
default_ins_mgl = alicloud.log.Project("defaultINsMgl",
|
|
318
|
+
description="terraform-alert-example",
|
|
319
|
+
name="terraform-alert-example")
|
|
320
|
+
default_alert = alicloud.sls.Alert("default",
|
|
321
|
+
configuration={
|
|
322
|
+
"type": "tpl",
|
|
323
|
+
"version": "2",
|
|
324
|
+
"query_lists": [
|
|
325
|
+
{
|
|
326
|
+
"query": "* | select *",
|
|
327
|
+
"time_span_type": "Relative",
|
|
328
|
+
"start": "-15m",
|
|
329
|
+
"end": "now",
|
|
330
|
+
"store_type": "log",
|
|
331
|
+
"project": default_ins_mgl.id,
|
|
332
|
+
"store": "alert",
|
|
333
|
+
"region": "cn-beijing",
|
|
334
|
+
"power_sql_mode": "disable",
|
|
335
|
+
"chart_title": "wkb-chart",
|
|
336
|
+
"dashboard_id": "wkb-dashboard",
|
|
337
|
+
"ui": "{}",
|
|
338
|
+
"role_arn": "acs:ram::1654218965343050:role/aliyunslsalertmonitorrole",
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"store_type": "meta",
|
|
342
|
+
"store": "user.rds_ip_whitelist",
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"store_type": "meta",
|
|
346
|
+
"store": "myexample1",
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
"group_configuration": {
|
|
350
|
+
"type": "no_group",
|
|
351
|
+
"fields": [
|
|
352
|
+
"a",
|
|
353
|
+
"b",
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
"join_configurations": [
|
|
357
|
+
{
|
|
358
|
+
"type": "no_join",
|
|
359
|
+
"condition": "aa",
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"type": "cross_join",
|
|
363
|
+
"condition": "qqq",
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"type": "inner_join",
|
|
367
|
+
"condition": "fefefe",
|
|
368
|
+
},
|
|
369
|
+
],
|
|
370
|
+
"severity_configurations": [{
|
|
371
|
+
"severity": 6,
|
|
372
|
+
"eval_condition": {
|
|
373
|
+
"condition": "__count__ > 1",
|
|
374
|
+
"count_condition": "cnt > 0",
|
|
375
|
+
},
|
|
376
|
+
}],
|
|
377
|
+
"labels": [{
|
|
378
|
+
"key": "a",
|
|
379
|
+
"value": "b",
|
|
380
|
+
}],
|
|
381
|
+
"annotations": [{
|
|
382
|
+
"key": "x",
|
|
383
|
+
"value": "y",
|
|
384
|
+
}],
|
|
385
|
+
"auto_annotation": True,
|
|
386
|
+
"send_resolved": False,
|
|
387
|
+
"threshold": 1,
|
|
388
|
+
"no_data_fire": False,
|
|
389
|
+
"sink_event_store": {
|
|
390
|
+
"enabled": True,
|
|
391
|
+
"endpoint": "cn-shanghai-intranet.log.aliyuncs.com",
|
|
392
|
+
"project": "wkb-wangren",
|
|
393
|
+
"event_store": "alert",
|
|
394
|
+
"role_arn": "acs:ram::1654218965343050:role/aliyunlogetlrole",
|
|
395
|
+
},
|
|
396
|
+
"sink_cms": {
|
|
397
|
+
"enabled": False,
|
|
398
|
+
},
|
|
399
|
+
"sink_alerthub": {
|
|
400
|
+
"enabled": False,
|
|
401
|
+
},
|
|
402
|
+
"template_configuration": {
|
|
403
|
+
"template_id": "sls.app.ack.autoscaler.cluster_unhealthy",
|
|
404
|
+
"type": "sys",
|
|
405
|
+
"version": "1.0",
|
|
406
|
+
"lang": "cn",
|
|
407
|
+
},
|
|
408
|
+
"condition_configuration": {
|
|
409
|
+
"condition": "cnt > 3",
|
|
410
|
+
"count_condition": "__count__ < 3",
|
|
411
|
+
},
|
|
412
|
+
"policy_configuration": {
|
|
413
|
+
"alert_policy_id": "sls.builtin.dynamic",
|
|
414
|
+
"action_policy_id": "wkb-action",
|
|
415
|
+
"repeat_interval": "1m",
|
|
416
|
+
},
|
|
417
|
+
"dashboard": "internal-alert",
|
|
418
|
+
"mute_until": 0,
|
|
419
|
+
"no_data_severity": 6,
|
|
420
|
+
"tags": [
|
|
421
|
+
"wkb",
|
|
422
|
+
"wangren",
|
|
423
|
+
"sls",
|
|
424
|
+
],
|
|
425
|
+
},
|
|
426
|
+
alert_name=alert_name,
|
|
427
|
+
project_name=default_ins_mgl.id,
|
|
428
|
+
schedule={
|
|
429
|
+
"type": "Cron",
|
|
430
|
+
"run_immdiately": True,
|
|
431
|
+
"time_zone": "+0800",
|
|
432
|
+
"delay": 10,
|
|
433
|
+
"cron_expression": "0/5 * * * *",
|
|
434
|
+
},
|
|
435
|
+
display_name="openapi-terraform",
|
|
436
|
+
description="create alert")
|
|
437
|
+
default = alicloud.sls.get_alerts_output(ids=[default_alert.id],
|
|
438
|
+
name_regex=default_alert.alert_name,
|
|
439
|
+
project_name=default_ins_mgl.id)
|
|
440
|
+
pulumi.export("alicloudSlsAlertExampleId", default.alerts[0].id)
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
:param Sequence[builtins.str] ids: A list of Alert IDs. The value is formulated as `<project_name>:<alert_name>`.
|
|
445
|
+
:param builtins.str name_regex: A regex string to filter results by Group Metric Rule name.
|
|
446
|
+
:param builtins.str output_file: File name where to save data source results (after running `pulumi preview`).
|
|
447
|
+
:param builtins.str project_name: Project Name
|
|
448
|
+
"""
|
|
449
|
+
__args__ = dict()
|
|
450
|
+
__args__['ids'] = ids
|
|
451
|
+
__args__['nameRegex'] = name_regex
|
|
452
|
+
__args__['outputFile'] = output_file
|
|
453
|
+
__args__['projectName'] = project_name
|
|
454
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
455
|
+
__ret__ = pulumi.runtime.invoke_output('alicloud:sls/getAlerts:getAlerts', __args__, opts=opts, typ=GetAlertsResult)
|
|
456
|
+
return __ret__.apply(lambda __response__: GetAlertsResult(
|
|
457
|
+
alerts=pulumi.get(__response__, 'alerts'),
|
|
458
|
+
id=pulumi.get(__response__, 'id'),
|
|
459
|
+
ids=pulumi.get(__response__, 'ids'),
|
|
460
|
+
name_regex=pulumi.get(__response__, 'name_regex'),
|
|
461
|
+
names=pulumi.get(__response__, 'names'),
|
|
462
|
+
output_file=pulumi.get(__response__, 'output_file'),
|
|
463
|
+
project_name=pulumi.get(__response__, 'project_name')))
|