tencentcloud-sdk-python-intl-en 3.0.1288__py2.py3-none-any.whl → 3.0.1291__py2.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 tencentcloud-sdk-python-intl-en might be problematic. Click here for more details.
- tencentcloud/__init__.py +1 -1
- tencentcloud/ccc/v20200210/ccc_client.py +23 -0
- tencentcloud/ccc/v20200210/models.py +184 -0
- tencentcloud/clb/v20180317/clb_client.py +4 -4
- tencentcloud/clb/v20180317/errorcodes.py +9 -0
- tencentcloud/clb/v20180317/models.py +27 -2
- tencentcloud/cynosdb/v20190107/cynosdb_client.py +46 -0
- tencentcloud/cynosdb/v20190107/errorcodes.py +3 -0
- tencentcloud/cynosdb/v20190107/models.py +1286 -75
- tencentcloud/dlc/v20210125/dlc_client.py +69 -0
- tencentcloud/dlc/v20210125/models.py +504 -0
- tencentcloud/mdl/v20200326/models.py +191 -0
- tencentcloud/mongodb/v20190725/errorcodes.py +15 -0
- tencentcloud/mongodb/v20190725/models.py +1276 -463
- tencentcloud/mongodb/v20190725/mongodb_client.py +75 -6
- tencentcloud/monitor/v20180724/models.py +1351 -124
- tencentcloud/monitor/v20180724/monitor_client.py +118 -0
- tencentcloud/mps/v20190612/models.py +366 -62
- tencentcloud/quota/v20241204/models.py +17 -2
- tencentcloud/redis/v20180412/models.py +410 -168
- tencentcloud/redis/v20180412/redis_client.py +4 -4
- tencentcloud/wedata/v20250806/__init__.py +0 -0
- tencentcloud/wedata/v20250806/errorcodes.py +57 -0
- tencentcloud/wedata/v20250806/models.py +26375 -0
- tencentcloud/wedata/v20250806/wedata_client.py +1797 -0
- {tencentcloud_sdk_python_intl_en-3.0.1288.dist-info → tencentcloud_sdk_python_intl_en-3.0.1291.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python_intl_en-3.0.1288.dist-info → tencentcloud_sdk_python_intl_en-3.0.1291.dist-info}/RECORD +29 -25
- {tencentcloud_sdk_python_intl_en-3.0.1288.dist-info → tencentcloud_sdk_python_intl_en-3.0.1291.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python_intl_en-3.0.1288.dist-info → tencentcloud_sdk_python_intl_en-3.0.1291.dist-info}/top_level.txt +0 -0
|
@@ -5172,6 +5172,190 @@ class CreatePrometheusAgentResponse(AbstractModel):
|
|
|
5172
5172
|
self._RequestId = params.get("RequestId")
|
|
5173
5173
|
|
|
5174
5174
|
|
|
5175
|
+
class CreatePrometheusAlertGroupRequest(AbstractModel):
|
|
5176
|
+
r"""CreatePrometheusAlertGroup request structure.
|
|
5177
|
+
|
|
5178
|
+
"""
|
|
5179
|
+
|
|
5180
|
+
def __init__(self):
|
|
5181
|
+
r"""
|
|
5182
|
+
:param _InstanceId: prometheus instance ID.
|
|
5183
|
+
:type InstanceId: str
|
|
5184
|
+
:param _GroupName: Alert group name. Not allowed to have the same name as other Alert groups.
|
|
5185
|
+
:type GroupName: str
|
|
5186
|
+
:param _GroupState: Alert group status.
|
|
5187
|
+
2 - enable.
|
|
5188
|
+
3 - disabled.
|
|
5189
|
+
Specifies to overwrite all alert rule statuses under the `Rules` field when not empty.
|
|
5190
|
+
|
|
5191
|
+
:type GroupState: int
|
|
5192
|
+
:param _AMPReceivers: Alert notification template ID list of tencent cloud observability platform, such as Consumer-xxxx or notice-xxxx.
|
|
5193
|
+
:type AMPReceivers: list of str
|
|
5194
|
+
:param _CustomReceiver: Specifies the custom Alert notification template.
|
|
5195
|
+
:type CustomReceiver: :class:`tencentcloud.monitor.v20180724.models.PrometheusAlertCustomReceiver`
|
|
5196
|
+
:param _RepeatInterval: Alert notification cycle (convergence time). defaults to 1h if left empty.
|
|
5197
|
+
:type RepeatInterval: str
|
|
5198
|
+
:param _Rules: Specifies the Alert rule list to be created.
|
|
5199
|
+
:type Rules: list of PrometheusAlertGroupRuleSet
|
|
5200
|
+
"""
|
|
5201
|
+
self._InstanceId = None
|
|
5202
|
+
self._GroupName = None
|
|
5203
|
+
self._GroupState = None
|
|
5204
|
+
self._AMPReceivers = None
|
|
5205
|
+
self._CustomReceiver = None
|
|
5206
|
+
self._RepeatInterval = None
|
|
5207
|
+
self._Rules = None
|
|
5208
|
+
|
|
5209
|
+
@property
|
|
5210
|
+
def InstanceId(self):
|
|
5211
|
+
r"""prometheus instance ID.
|
|
5212
|
+
:rtype: str
|
|
5213
|
+
"""
|
|
5214
|
+
return self._InstanceId
|
|
5215
|
+
|
|
5216
|
+
@InstanceId.setter
|
|
5217
|
+
def InstanceId(self, InstanceId):
|
|
5218
|
+
self._InstanceId = InstanceId
|
|
5219
|
+
|
|
5220
|
+
@property
|
|
5221
|
+
def GroupName(self):
|
|
5222
|
+
r"""Alert group name. Not allowed to have the same name as other Alert groups.
|
|
5223
|
+
:rtype: str
|
|
5224
|
+
"""
|
|
5225
|
+
return self._GroupName
|
|
5226
|
+
|
|
5227
|
+
@GroupName.setter
|
|
5228
|
+
def GroupName(self, GroupName):
|
|
5229
|
+
self._GroupName = GroupName
|
|
5230
|
+
|
|
5231
|
+
@property
|
|
5232
|
+
def GroupState(self):
|
|
5233
|
+
r"""Alert group status.
|
|
5234
|
+
2 - enable.
|
|
5235
|
+
3 - disabled.
|
|
5236
|
+
Specifies to overwrite all alert rule statuses under the `Rules` field when not empty.
|
|
5237
|
+
|
|
5238
|
+
:rtype: int
|
|
5239
|
+
"""
|
|
5240
|
+
return self._GroupState
|
|
5241
|
+
|
|
5242
|
+
@GroupState.setter
|
|
5243
|
+
def GroupState(self, GroupState):
|
|
5244
|
+
self._GroupState = GroupState
|
|
5245
|
+
|
|
5246
|
+
@property
|
|
5247
|
+
def AMPReceivers(self):
|
|
5248
|
+
r"""Alert notification template ID list of tencent cloud observability platform, such as Consumer-xxxx or notice-xxxx.
|
|
5249
|
+
:rtype: list of str
|
|
5250
|
+
"""
|
|
5251
|
+
return self._AMPReceivers
|
|
5252
|
+
|
|
5253
|
+
@AMPReceivers.setter
|
|
5254
|
+
def AMPReceivers(self, AMPReceivers):
|
|
5255
|
+
self._AMPReceivers = AMPReceivers
|
|
5256
|
+
|
|
5257
|
+
@property
|
|
5258
|
+
def CustomReceiver(self):
|
|
5259
|
+
r"""Specifies the custom Alert notification template.
|
|
5260
|
+
:rtype: :class:`tencentcloud.monitor.v20180724.models.PrometheusAlertCustomReceiver`
|
|
5261
|
+
"""
|
|
5262
|
+
return self._CustomReceiver
|
|
5263
|
+
|
|
5264
|
+
@CustomReceiver.setter
|
|
5265
|
+
def CustomReceiver(self, CustomReceiver):
|
|
5266
|
+
self._CustomReceiver = CustomReceiver
|
|
5267
|
+
|
|
5268
|
+
@property
|
|
5269
|
+
def RepeatInterval(self):
|
|
5270
|
+
r"""Alert notification cycle (convergence time). defaults to 1h if left empty.
|
|
5271
|
+
:rtype: str
|
|
5272
|
+
"""
|
|
5273
|
+
return self._RepeatInterval
|
|
5274
|
+
|
|
5275
|
+
@RepeatInterval.setter
|
|
5276
|
+
def RepeatInterval(self, RepeatInterval):
|
|
5277
|
+
self._RepeatInterval = RepeatInterval
|
|
5278
|
+
|
|
5279
|
+
@property
|
|
5280
|
+
def Rules(self):
|
|
5281
|
+
r"""Specifies the Alert rule list to be created.
|
|
5282
|
+
:rtype: list of PrometheusAlertGroupRuleSet
|
|
5283
|
+
"""
|
|
5284
|
+
return self._Rules
|
|
5285
|
+
|
|
5286
|
+
@Rules.setter
|
|
5287
|
+
def Rules(self, Rules):
|
|
5288
|
+
self._Rules = Rules
|
|
5289
|
+
|
|
5290
|
+
|
|
5291
|
+
def _deserialize(self, params):
|
|
5292
|
+
self._InstanceId = params.get("InstanceId")
|
|
5293
|
+
self._GroupName = params.get("GroupName")
|
|
5294
|
+
self._GroupState = params.get("GroupState")
|
|
5295
|
+
self._AMPReceivers = params.get("AMPReceivers")
|
|
5296
|
+
if params.get("CustomReceiver") is not None:
|
|
5297
|
+
self._CustomReceiver = PrometheusAlertCustomReceiver()
|
|
5298
|
+
self._CustomReceiver._deserialize(params.get("CustomReceiver"))
|
|
5299
|
+
self._RepeatInterval = params.get("RepeatInterval")
|
|
5300
|
+
if params.get("Rules") is not None:
|
|
5301
|
+
self._Rules = []
|
|
5302
|
+
for item in params.get("Rules"):
|
|
5303
|
+
obj = PrometheusAlertGroupRuleSet()
|
|
5304
|
+
obj._deserialize(item)
|
|
5305
|
+
self._Rules.append(obj)
|
|
5306
|
+
memeber_set = set(params.keys())
|
|
5307
|
+
for name, value in vars(self).items():
|
|
5308
|
+
property_name = name[1:]
|
|
5309
|
+
if property_name in memeber_set:
|
|
5310
|
+
memeber_set.remove(property_name)
|
|
5311
|
+
if len(memeber_set) > 0:
|
|
5312
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
5313
|
+
|
|
5314
|
+
|
|
5315
|
+
|
|
5316
|
+
class CreatePrometheusAlertGroupResponse(AbstractModel):
|
|
5317
|
+
r"""CreatePrometheusAlertGroup response structure.
|
|
5318
|
+
|
|
5319
|
+
"""
|
|
5320
|
+
|
|
5321
|
+
def __init__(self):
|
|
5322
|
+
r"""
|
|
5323
|
+
:param _GroupId: Created Alert group ID, which matches the regular expression `alert-[a-z0-9]{8}`.
|
|
5324
|
+
:type GroupId: str
|
|
5325
|
+
:param _RequestId: The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
5326
|
+
:type RequestId: str
|
|
5327
|
+
"""
|
|
5328
|
+
self._GroupId = None
|
|
5329
|
+
self._RequestId = None
|
|
5330
|
+
|
|
5331
|
+
@property
|
|
5332
|
+
def GroupId(self):
|
|
5333
|
+
r"""Created Alert group ID, which matches the regular expression `alert-[a-z0-9]{8}`.
|
|
5334
|
+
:rtype: str
|
|
5335
|
+
"""
|
|
5336
|
+
return self._GroupId
|
|
5337
|
+
|
|
5338
|
+
@GroupId.setter
|
|
5339
|
+
def GroupId(self, GroupId):
|
|
5340
|
+
self._GroupId = GroupId
|
|
5341
|
+
|
|
5342
|
+
@property
|
|
5343
|
+
def RequestId(self):
|
|
5344
|
+
r"""The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
5345
|
+
:rtype: str
|
|
5346
|
+
"""
|
|
5347
|
+
return self._RequestId
|
|
5348
|
+
|
|
5349
|
+
@RequestId.setter
|
|
5350
|
+
def RequestId(self, RequestId):
|
|
5351
|
+
self._RequestId = RequestId
|
|
5352
|
+
|
|
5353
|
+
|
|
5354
|
+
def _deserialize(self, params):
|
|
5355
|
+
self._GroupId = params.get("GroupId")
|
|
5356
|
+
self._RequestId = params.get("RequestId")
|
|
5357
|
+
|
|
5358
|
+
|
|
5175
5359
|
class CreatePrometheusAlertPolicyRequest(AbstractModel):
|
|
5176
5360
|
r"""CreatePrometheusAlertPolicy request structure.
|
|
5177
5361
|
|
|
@@ -7233,6 +7417,85 @@ class DeletePolicyGroupResponse(AbstractModel):
|
|
|
7233
7417
|
self._RequestId = params.get("RequestId")
|
|
7234
7418
|
|
|
7235
7419
|
|
|
7420
|
+
class DeletePrometheusAlertGroupsRequest(AbstractModel):
|
|
7421
|
+
r"""DeletePrometheusAlertGroups request structure.
|
|
7422
|
+
|
|
7423
|
+
"""
|
|
7424
|
+
|
|
7425
|
+
def __init__(self):
|
|
7426
|
+
r"""
|
|
7427
|
+
:param _InstanceId: prometheus instance id.
|
|
7428
|
+
:type InstanceId: str
|
|
7429
|
+
:param _GroupIds: Alert group IDs that needs to be deleted, such as alert-xxxxx.
|
|
7430
|
+
:type GroupIds: list of str
|
|
7431
|
+
"""
|
|
7432
|
+
self._InstanceId = None
|
|
7433
|
+
self._GroupIds = None
|
|
7434
|
+
|
|
7435
|
+
@property
|
|
7436
|
+
def InstanceId(self):
|
|
7437
|
+
r"""prometheus instance id.
|
|
7438
|
+
:rtype: str
|
|
7439
|
+
"""
|
|
7440
|
+
return self._InstanceId
|
|
7441
|
+
|
|
7442
|
+
@InstanceId.setter
|
|
7443
|
+
def InstanceId(self, InstanceId):
|
|
7444
|
+
self._InstanceId = InstanceId
|
|
7445
|
+
|
|
7446
|
+
@property
|
|
7447
|
+
def GroupIds(self):
|
|
7448
|
+
r"""Alert group IDs that needs to be deleted, such as alert-xxxxx.
|
|
7449
|
+
:rtype: list of str
|
|
7450
|
+
"""
|
|
7451
|
+
return self._GroupIds
|
|
7452
|
+
|
|
7453
|
+
@GroupIds.setter
|
|
7454
|
+
def GroupIds(self, GroupIds):
|
|
7455
|
+
self._GroupIds = GroupIds
|
|
7456
|
+
|
|
7457
|
+
|
|
7458
|
+
def _deserialize(self, params):
|
|
7459
|
+
self._InstanceId = params.get("InstanceId")
|
|
7460
|
+
self._GroupIds = params.get("GroupIds")
|
|
7461
|
+
memeber_set = set(params.keys())
|
|
7462
|
+
for name, value in vars(self).items():
|
|
7463
|
+
property_name = name[1:]
|
|
7464
|
+
if property_name in memeber_set:
|
|
7465
|
+
memeber_set.remove(property_name)
|
|
7466
|
+
if len(memeber_set) > 0:
|
|
7467
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
7468
|
+
|
|
7469
|
+
|
|
7470
|
+
|
|
7471
|
+
class DeletePrometheusAlertGroupsResponse(AbstractModel):
|
|
7472
|
+
r"""DeletePrometheusAlertGroups response structure.
|
|
7473
|
+
|
|
7474
|
+
"""
|
|
7475
|
+
|
|
7476
|
+
def __init__(self):
|
|
7477
|
+
r"""
|
|
7478
|
+
:param _RequestId: The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
7479
|
+
:type RequestId: str
|
|
7480
|
+
"""
|
|
7481
|
+
self._RequestId = None
|
|
7482
|
+
|
|
7483
|
+
@property
|
|
7484
|
+
def RequestId(self):
|
|
7485
|
+
r"""The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
7486
|
+
:rtype: str
|
|
7487
|
+
"""
|
|
7488
|
+
return self._RequestId
|
|
7489
|
+
|
|
7490
|
+
@RequestId.setter
|
|
7491
|
+
def RequestId(self, RequestId):
|
|
7492
|
+
self._RequestId = RequestId
|
|
7493
|
+
|
|
7494
|
+
|
|
7495
|
+
def _deserialize(self, params):
|
|
7496
|
+
self._RequestId = params.get("RequestId")
|
|
7497
|
+
|
|
7498
|
+
|
|
7236
7499
|
class DeletePrometheusAlertPolicyRequest(AbstractModel):
|
|
7237
7500
|
r"""DeletePrometheusAlertPolicy request structure.
|
|
7238
7501
|
|
|
@@ -17639,31 +17902,35 @@ Note: This field may return null, indicating that no valid values can be obtaine
|
|
|
17639
17902
|
self._RequestId = params.get("RequestId")
|
|
17640
17903
|
|
|
17641
17904
|
|
|
17642
|
-
class
|
|
17643
|
-
r"""
|
|
17905
|
+
class DescribePrometheusAlertGroupsRequest(AbstractModel):
|
|
17906
|
+
r"""DescribePrometheusAlertGroups request structure.
|
|
17644
17907
|
|
|
17645
17908
|
"""
|
|
17646
17909
|
|
|
17647
17910
|
def __init__(self):
|
|
17648
17911
|
r"""
|
|
17649
|
-
:param _InstanceId:
|
|
17912
|
+
:param _InstanceId: prometheus instance ID
|
|
17650
17913
|
:type InstanceId: str
|
|
17651
|
-
:param
|
|
17652
|
-
:type Offset: int
|
|
17653
|
-
:param _Limit: Number of results per page
|
|
17914
|
+
:param _Limit: Number of returned results. defaults to 20. maximum value is 100.
|
|
17654
17915
|
:type Limit: int
|
|
17655
|
-
:param
|
|
17656
|
-
|
|
17657
|
-
:
|
|
17916
|
+
:param _Offset: Offset. default value: 0.
|
|
17917
|
+
:type Offset: int
|
|
17918
|
+
:param _GroupId: Alert group ID, such as alert-xxxx.
|
|
17919
|
+
List the alert group with the given ID.
|
|
17920
|
+
:type GroupId: str
|
|
17921
|
+
:param _GroupName: Specifies the alert group name.
|
|
17922
|
+
List alert groups which name contains the given string.
|
|
17923
|
+
:type GroupName: str
|
|
17658
17924
|
"""
|
|
17659
17925
|
self._InstanceId = None
|
|
17660
|
-
self._Offset = None
|
|
17661
17926
|
self._Limit = None
|
|
17662
|
-
self.
|
|
17927
|
+
self._Offset = None
|
|
17928
|
+
self._GroupId = None
|
|
17929
|
+
self._GroupName = None
|
|
17663
17930
|
|
|
17664
17931
|
@property
|
|
17665
17932
|
def InstanceId(self):
|
|
17666
|
-
r"""
|
|
17933
|
+
r"""prometheus instance ID
|
|
17667
17934
|
:rtype: str
|
|
17668
17935
|
"""
|
|
17669
17936
|
return self._InstanceId
|
|
@@ -17672,9 +17939,20 @@ Valid values: `ID`, `Name`.
|
|
|
17672
17939
|
def InstanceId(self, InstanceId):
|
|
17673
17940
|
self._InstanceId = InstanceId
|
|
17674
17941
|
|
|
17942
|
+
@property
|
|
17943
|
+
def Limit(self):
|
|
17944
|
+
r"""Number of returned results. defaults to 20. maximum value is 100.
|
|
17945
|
+
:rtype: int
|
|
17946
|
+
"""
|
|
17947
|
+
return self._Limit
|
|
17948
|
+
|
|
17949
|
+
@Limit.setter
|
|
17950
|
+
def Limit(self, Limit):
|
|
17951
|
+
self._Limit = Limit
|
|
17952
|
+
|
|
17675
17953
|
@property
|
|
17676
17954
|
def Offset(self):
|
|
17677
|
-
r"""
|
|
17955
|
+
r"""Offset. default value: 0.
|
|
17678
17956
|
:rtype: int
|
|
17679
17957
|
"""
|
|
17680
17958
|
return self._Offset
|
|
@@ -17684,37 +17962,189 @@ Valid values: `ID`, `Name`.
|
|
|
17684
17962
|
self._Offset = Offset
|
|
17685
17963
|
|
|
17686
17964
|
@property
|
|
17687
|
-
def
|
|
17688
|
-
r"""
|
|
17689
|
-
|
|
17965
|
+
def GroupId(self):
|
|
17966
|
+
r"""Alert group ID, such as alert-xxxx.
|
|
17967
|
+
List the alert group with the given ID.
|
|
17968
|
+
:rtype: str
|
|
17690
17969
|
"""
|
|
17691
|
-
return self.
|
|
17970
|
+
return self._GroupId
|
|
17692
17971
|
|
|
17693
|
-
@
|
|
17694
|
-
def
|
|
17695
|
-
self.
|
|
17972
|
+
@GroupId.setter
|
|
17973
|
+
def GroupId(self, GroupId):
|
|
17974
|
+
self._GroupId = GroupId
|
|
17696
17975
|
|
|
17697
17976
|
@property
|
|
17698
|
-
def
|
|
17699
|
-
r"""
|
|
17700
|
-
|
|
17701
|
-
:rtype:
|
|
17977
|
+
def GroupName(self):
|
|
17978
|
+
r"""Specifies the alert group name.
|
|
17979
|
+
List alert groups which name contains the given string.
|
|
17980
|
+
:rtype: str
|
|
17702
17981
|
"""
|
|
17703
|
-
return self.
|
|
17982
|
+
return self._GroupName
|
|
17704
17983
|
|
|
17705
|
-
@
|
|
17706
|
-
def
|
|
17707
|
-
self.
|
|
17984
|
+
@GroupName.setter
|
|
17985
|
+
def GroupName(self, GroupName):
|
|
17986
|
+
self._GroupName = GroupName
|
|
17708
17987
|
|
|
17709
17988
|
|
|
17710
17989
|
def _deserialize(self, params):
|
|
17711
17990
|
self._InstanceId = params.get("InstanceId")
|
|
17712
|
-
self._Offset = params.get("Offset")
|
|
17713
17991
|
self._Limit = params.get("Limit")
|
|
17714
|
-
|
|
17715
|
-
|
|
17716
|
-
|
|
17717
|
-
|
|
17992
|
+
self._Offset = params.get("Offset")
|
|
17993
|
+
self._GroupId = params.get("GroupId")
|
|
17994
|
+
self._GroupName = params.get("GroupName")
|
|
17995
|
+
memeber_set = set(params.keys())
|
|
17996
|
+
for name, value in vars(self).items():
|
|
17997
|
+
property_name = name[1:]
|
|
17998
|
+
if property_name in memeber_set:
|
|
17999
|
+
memeber_set.remove(property_name)
|
|
18000
|
+
if len(memeber_set) > 0:
|
|
18001
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
18002
|
+
|
|
18003
|
+
|
|
18004
|
+
|
|
18005
|
+
class DescribePrometheusAlertGroupsResponse(AbstractModel):
|
|
18006
|
+
r"""DescribePrometheusAlertGroups response structure.
|
|
18007
|
+
|
|
18008
|
+
"""
|
|
18009
|
+
|
|
18010
|
+
def __init__(self):
|
|
18011
|
+
r"""
|
|
18012
|
+
:param _AlertGroupSet: Alert group information.
|
|
18013
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
18014
|
+
:type AlertGroupSet: list of PrometheusAlertGroupSet
|
|
18015
|
+
:param _TotalCount: Total count of Alert groups.
|
|
18016
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
18017
|
+
:type TotalCount: int
|
|
18018
|
+
:param _RequestId: The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
18019
|
+
:type RequestId: str
|
|
18020
|
+
"""
|
|
18021
|
+
self._AlertGroupSet = None
|
|
18022
|
+
self._TotalCount = None
|
|
18023
|
+
self._RequestId = None
|
|
18024
|
+
|
|
18025
|
+
@property
|
|
18026
|
+
def AlertGroupSet(self):
|
|
18027
|
+
r"""Alert group information.
|
|
18028
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
18029
|
+
:rtype: list of PrometheusAlertGroupSet
|
|
18030
|
+
"""
|
|
18031
|
+
return self._AlertGroupSet
|
|
18032
|
+
|
|
18033
|
+
@AlertGroupSet.setter
|
|
18034
|
+
def AlertGroupSet(self, AlertGroupSet):
|
|
18035
|
+
self._AlertGroupSet = AlertGroupSet
|
|
18036
|
+
|
|
18037
|
+
@property
|
|
18038
|
+
def TotalCount(self):
|
|
18039
|
+
r"""Total count of Alert groups.
|
|
18040
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
18041
|
+
:rtype: int
|
|
18042
|
+
"""
|
|
18043
|
+
return self._TotalCount
|
|
18044
|
+
|
|
18045
|
+
@TotalCount.setter
|
|
18046
|
+
def TotalCount(self, TotalCount):
|
|
18047
|
+
self._TotalCount = TotalCount
|
|
18048
|
+
|
|
18049
|
+
@property
|
|
18050
|
+
def RequestId(self):
|
|
18051
|
+
r"""The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
18052
|
+
:rtype: str
|
|
18053
|
+
"""
|
|
18054
|
+
return self._RequestId
|
|
18055
|
+
|
|
18056
|
+
@RequestId.setter
|
|
18057
|
+
def RequestId(self, RequestId):
|
|
18058
|
+
self._RequestId = RequestId
|
|
18059
|
+
|
|
18060
|
+
|
|
18061
|
+
def _deserialize(self, params):
|
|
18062
|
+
if params.get("AlertGroupSet") is not None:
|
|
18063
|
+
self._AlertGroupSet = []
|
|
18064
|
+
for item in params.get("AlertGroupSet"):
|
|
18065
|
+
obj = PrometheusAlertGroupSet()
|
|
18066
|
+
obj._deserialize(item)
|
|
18067
|
+
self._AlertGroupSet.append(obj)
|
|
18068
|
+
self._TotalCount = params.get("TotalCount")
|
|
18069
|
+
self._RequestId = params.get("RequestId")
|
|
18070
|
+
|
|
18071
|
+
|
|
18072
|
+
class DescribePrometheusAlertPolicyRequest(AbstractModel):
|
|
18073
|
+
r"""DescribePrometheusAlertPolicy request structure.
|
|
18074
|
+
|
|
18075
|
+
"""
|
|
18076
|
+
|
|
18077
|
+
def __init__(self):
|
|
18078
|
+
r"""
|
|
18079
|
+
:param _InstanceId: Instance ID
|
|
18080
|
+
:type InstanceId: str
|
|
18081
|
+
:param _Offset: Page offset
|
|
18082
|
+
:type Offset: int
|
|
18083
|
+
:param _Limit: Number of results per page
|
|
18084
|
+
:type Limit: int
|
|
18085
|
+
:param _Filters: Filter
|
|
18086
|
+
Valid values: `ID`, `Name`.
|
|
18087
|
+
:type Filters: list of Filter
|
|
18088
|
+
"""
|
|
18089
|
+
self._InstanceId = None
|
|
18090
|
+
self._Offset = None
|
|
18091
|
+
self._Limit = None
|
|
18092
|
+
self._Filters = None
|
|
18093
|
+
|
|
18094
|
+
@property
|
|
18095
|
+
def InstanceId(self):
|
|
18096
|
+
r"""Instance ID
|
|
18097
|
+
:rtype: str
|
|
18098
|
+
"""
|
|
18099
|
+
return self._InstanceId
|
|
18100
|
+
|
|
18101
|
+
@InstanceId.setter
|
|
18102
|
+
def InstanceId(self, InstanceId):
|
|
18103
|
+
self._InstanceId = InstanceId
|
|
18104
|
+
|
|
18105
|
+
@property
|
|
18106
|
+
def Offset(self):
|
|
18107
|
+
r"""Page offset
|
|
18108
|
+
:rtype: int
|
|
18109
|
+
"""
|
|
18110
|
+
return self._Offset
|
|
18111
|
+
|
|
18112
|
+
@Offset.setter
|
|
18113
|
+
def Offset(self, Offset):
|
|
18114
|
+
self._Offset = Offset
|
|
18115
|
+
|
|
18116
|
+
@property
|
|
18117
|
+
def Limit(self):
|
|
18118
|
+
r"""Number of results per page
|
|
18119
|
+
:rtype: int
|
|
18120
|
+
"""
|
|
18121
|
+
return self._Limit
|
|
18122
|
+
|
|
18123
|
+
@Limit.setter
|
|
18124
|
+
def Limit(self, Limit):
|
|
18125
|
+
self._Limit = Limit
|
|
18126
|
+
|
|
18127
|
+
@property
|
|
18128
|
+
def Filters(self):
|
|
18129
|
+
r"""Filter
|
|
18130
|
+
Valid values: `ID`, `Name`.
|
|
18131
|
+
:rtype: list of Filter
|
|
18132
|
+
"""
|
|
18133
|
+
return self._Filters
|
|
18134
|
+
|
|
18135
|
+
@Filters.setter
|
|
18136
|
+
def Filters(self, Filters):
|
|
18137
|
+
self._Filters = Filters
|
|
18138
|
+
|
|
18139
|
+
|
|
18140
|
+
def _deserialize(self, params):
|
|
18141
|
+
self._InstanceId = params.get("InstanceId")
|
|
18142
|
+
self._Offset = params.get("Offset")
|
|
18143
|
+
self._Limit = params.get("Limit")
|
|
18144
|
+
if params.get("Filters") is not None:
|
|
18145
|
+
self._Filters = []
|
|
18146
|
+
for item in params.get("Filters"):
|
|
18147
|
+
obj = Filter()
|
|
17718
18148
|
obj._deserialize(item)
|
|
17719
18149
|
self._Filters.append(obj)
|
|
17720
18150
|
memeber_set = set(params.keys())
|
|
@@ -27716,66 +28146,51 @@ Note: This field may return null, indicating that no valid values can be obtaine
|
|
|
27716
28146
|
|
|
27717
28147
|
|
|
27718
28148
|
|
|
27719
|
-
class
|
|
27720
|
-
r"""
|
|
28149
|
+
class PrometheusAlertAllowTimeRange(AbstractModel):
|
|
28150
|
+
r"""Prometheus custom Alert notification period.
|
|
27721
28151
|
|
|
27722
28152
|
"""
|
|
27723
28153
|
|
|
27724
28154
|
def __init__(self):
|
|
27725
28155
|
r"""
|
|
27726
|
-
:param
|
|
27727
|
-
:type Url: str
|
|
27728
|
-
:param _ClusterType: Type of the cluster where AlertManager is deployed
|
|
28156
|
+
:param _Start: Seconds from 00:00:00.
|
|
27729
28157
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27730
|
-
:type
|
|
27731
|
-
:param
|
|
28158
|
+
:type Start: str
|
|
28159
|
+
:param _End: Seconds from 00:00:00.
|
|
27732
28160
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27733
|
-
:type
|
|
27734
|
-
"""
|
|
27735
|
-
self._Url = None
|
|
27736
|
-
self._ClusterType = None
|
|
27737
|
-
self._ClusterId = None
|
|
27738
|
-
|
|
27739
|
-
@property
|
|
27740
|
-
def Url(self):
|
|
27741
|
-
r"""AlertManager URL
|
|
27742
|
-
:rtype: str
|
|
28161
|
+
:type End: str
|
|
27743
28162
|
"""
|
|
27744
|
-
|
|
27745
|
-
|
|
27746
|
-
@Url.setter
|
|
27747
|
-
def Url(self, Url):
|
|
27748
|
-
self._Url = Url
|
|
28163
|
+
self._Start = None
|
|
28164
|
+
self._End = None
|
|
27749
28165
|
|
|
27750
28166
|
@property
|
|
27751
|
-
def
|
|
27752
|
-
r"""
|
|
28167
|
+
def Start(self):
|
|
28168
|
+
r"""Seconds from 00:00:00.
|
|
27753
28169
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27754
28170
|
:rtype: str
|
|
27755
28171
|
"""
|
|
27756
|
-
return self.
|
|
28172
|
+
return self._Start
|
|
27757
28173
|
|
|
27758
|
-
@
|
|
27759
|
-
def
|
|
27760
|
-
self.
|
|
28174
|
+
@Start.setter
|
|
28175
|
+
def Start(self, Start):
|
|
28176
|
+
self._Start = Start
|
|
27761
28177
|
|
|
27762
28178
|
@property
|
|
27763
|
-
def
|
|
27764
|
-
r"""
|
|
28179
|
+
def End(self):
|
|
28180
|
+
r"""Seconds from 00:00:00.
|
|
27765
28181
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27766
28182
|
:rtype: str
|
|
27767
28183
|
"""
|
|
27768
|
-
return self.
|
|
28184
|
+
return self._End
|
|
27769
28185
|
|
|
27770
|
-
@
|
|
27771
|
-
def
|
|
27772
|
-
self.
|
|
28186
|
+
@End.setter
|
|
28187
|
+
def End(self, End):
|
|
28188
|
+
self._End = End
|
|
27773
28189
|
|
|
27774
28190
|
|
|
27775
28191
|
def _deserialize(self, params):
|
|
27776
|
-
self.
|
|
27777
|
-
self.
|
|
27778
|
-
self._ClusterId = params.get("ClusterId")
|
|
28192
|
+
self._Start = params.get("Start")
|
|
28193
|
+
self._End = params.get("End")
|
|
27779
28194
|
memeber_set = set(params.keys())
|
|
27780
28195
|
for name, value in vars(self).items():
|
|
27781
28196
|
property_name = name[1:]
|
|
@@ -27786,97 +28201,614 @@ Note: This field may return null, indicating that no valid values can be obtaine
|
|
|
27786
28201
|
|
|
27787
28202
|
|
|
27788
28203
|
|
|
27789
|
-
class
|
|
27790
|
-
r"""
|
|
28204
|
+
class PrometheusAlertCustomReceiver(AbstractModel):
|
|
28205
|
+
r"""Prometheus Alert custom notification template.
|
|
27791
28206
|
|
|
27792
28207
|
"""
|
|
27793
28208
|
|
|
27794
28209
|
def __init__(self):
|
|
27795
28210
|
r"""
|
|
27796
|
-
:param
|
|
27797
|
-
|
|
27798
|
-
|
|
27799
|
-
:type Rules: list of PrometheusAlertRule
|
|
27800
|
-
:param _Id: Alerting rule ID
|
|
27801
|
-
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27802
|
-
:type Id: str
|
|
27803
|
-
:param _TemplateId: If the alert comes from a template, `TemplateId` is the template ID.
|
|
28211
|
+
:param _Type: Notification customization type.
|
|
28212
|
+
Alertmanager - self-built alertmanager in vpc.
|
|
28213
|
+
webhook - webhook address in the vpc.
|
|
27804
28214
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27805
|
-
:type
|
|
27806
|
-
:param
|
|
28215
|
+
:type Type: str
|
|
28216
|
+
:param _Url: alertmanager/webhook url (ip in the same vpc as the prometheus instance).
|
|
27807
28217
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27808
|
-
:type
|
|
27809
|
-
:param
|
|
28218
|
+
:type Url: str
|
|
28219
|
+
:param _AllowedTimeRanges: Specifies the time range for allowing Alert sending.
|
|
27810
28220
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27811
|
-
:type
|
|
27812
|
-
:param _ClusterId:
|
|
28221
|
+
:type AllowedTimeRanges: list of PrometheusAlertAllowTimeRange
|
|
28222
|
+
:param _ClusterId: alertmanager intranet cluster ID.
|
|
27813
28223
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27814
28224
|
:type ClusterId: str
|
|
28225
|
+
:param _ClusterType: alertmanager resides in the private network cluster type (tke/eks/tdcc).
|
|
28226
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28227
|
+
:type ClusterType: str
|
|
27815
28228
|
"""
|
|
27816
|
-
self.
|
|
27817
|
-
self.
|
|
27818
|
-
self.
|
|
27819
|
-
self._TemplateId = None
|
|
27820
|
-
self._Notification = None
|
|
27821
|
-
self._UpdatedAt = None
|
|
28229
|
+
self._Type = None
|
|
28230
|
+
self._Url = None
|
|
28231
|
+
self._AllowedTimeRanges = None
|
|
27822
28232
|
self._ClusterId = None
|
|
28233
|
+
self._ClusterType = None
|
|
27823
28234
|
|
|
27824
28235
|
@property
|
|
27825
|
-
def
|
|
27826
|
-
r"""
|
|
28236
|
+
def Type(self):
|
|
28237
|
+
r"""Notification customization type.
|
|
28238
|
+
Alertmanager - self-built alertmanager in vpc.
|
|
28239
|
+
webhook - webhook address in the vpc.
|
|
28240
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27827
28241
|
:rtype: str
|
|
27828
28242
|
"""
|
|
27829
|
-
return self.
|
|
28243
|
+
return self._Type
|
|
27830
28244
|
|
|
27831
|
-
@
|
|
27832
|
-
def
|
|
27833
|
-
self.
|
|
28245
|
+
@Type.setter
|
|
28246
|
+
def Type(self, Type):
|
|
28247
|
+
self._Type = Type
|
|
27834
28248
|
|
|
27835
28249
|
@property
|
|
27836
|
-
def
|
|
27837
|
-
r"""
|
|
27838
|
-
|
|
28250
|
+
def Url(self):
|
|
28251
|
+
r"""alertmanager/webhook url (ip in the same vpc as the prometheus instance).
|
|
28252
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28253
|
+
:rtype: str
|
|
27839
28254
|
"""
|
|
27840
|
-
return self.
|
|
28255
|
+
return self._Url
|
|
27841
28256
|
|
|
27842
|
-
@
|
|
27843
|
-
def
|
|
27844
|
-
self.
|
|
28257
|
+
@Url.setter
|
|
28258
|
+
def Url(self, Url):
|
|
28259
|
+
self._Url = Url
|
|
27845
28260
|
|
|
27846
28261
|
@property
|
|
27847
|
-
def
|
|
27848
|
-
r"""
|
|
28262
|
+
def AllowedTimeRanges(self):
|
|
28263
|
+
r"""Specifies the time range for allowing Alert sending.
|
|
27849
28264
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27850
|
-
:rtype:
|
|
28265
|
+
:rtype: list of PrometheusAlertAllowTimeRange
|
|
27851
28266
|
"""
|
|
27852
|
-
return self.
|
|
28267
|
+
return self._AllowedTimeRanges
|
|
27853
28268
|
|
|
27854
|
-
@
|
|
27855
|
-
def
|
|
27856
|
-
self.
|
|
28269
|
+
@AllowedTimeRanges.setter
|
|
28270
|
+
def AllowedTimeRanges(self, AllowedTimeRanges):
|
|
28271
|
+
self._AllowedTimeRanges = AllowedTimeRanges
|
|
27857
28272
|
|
|
27858
28273
|
@property
|
|
27859
|
-
def
|
|
27860
|
-
r"""
|
|
28274
|
+
def ClusterId(self):
|
|
28275
|
+
r"""alertmanager intranet cluster ID.
|
|
27861
28276
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27862
28277
|
:rtype: str
|
|
27863
28278
|
"""
|
|
27864
|
-
return self.
|
|
28279
|
+
return self._ClusterId
|
|
27865
28280
|
|
|
27866
|
-
@
|
|
27867
|
-
def
|
|
27868
|
-
self.
|
|
28281
|
+
@ClusterId.setter
|
|
28282
|
+
def ClusterId(self, ClusterId):
|
|
28283
|
+
self._ClusterId = ClusterId
|
|
27869
28284
|
|
|
27870
28285
|
@property
|
|
27871
|
-
def
|
|
27872
|
-
r"""
|
|
28286
|
+
def ClusterType(self):
|
|
28287
|
+
r"""alertmanager resides in the private network cluster type (tke/eks/tdcc).
|
|
27873
28288
|
Note: This field may return null, indicating that no valid values can be obtained.
|
|
27874
|
-
:rtype:
|
|
28289
|
+
:rtype: str
|
|
27875
28290
|
"""
|
|
27876
|
-
return self.
|
|
28291
|
+
return self._ClusterType
|
|
27877
28292
|
|
|
27878
|
-
@
|
|
27879
|
-
def
|
|
28293
|
+
@ClusterType.setter
|
|
28294
|
+
def ClusterType(self, ClusterType):
|
|
28295
|
+
self._ClusterType = ClusterType
|
|
28296
|
+
|
|
28297
|
+
|
|
28298
|
+
def _deserialize(self, params):
|
|
28299
|
+
self._Type = params.get("Type")
|
|
28300
|
+
self._Url = params.get("Url")
|
|
28301
|
+
if params.get("AllowedTimeRanges") is not None:
|
|
28302
|
+
self._AllowedTimeRanges = []
|
|
28303
|
+
for item in params.get("AllowedTimeRanges"):
|
|
28304
|
+
obj = PrometheusAlertAllowTimeRange()
|
|
28305
|
+
obj._deserialize(item)
|
|
28306
|
+
self._AllowedTimeRanges.append(obj)
|
|
28307
|
+
self._ClusterId = params.get("ClusterId")
|
|
28308
|
+
self._ClusterType = params.get("ClusterType")
|
|
28309
|
+
memeber_set = set(params.keys())
|
|
28310
|
+
for name, value in vars(self).items():
|
|
28311
|
+
property_name = name[1:]
|
|
28312
|
+
if property_name in memeber_set:
|
|
28313
|
+
memeber_set.remove(property_name)
|
|
28314
|
+
if len(memeber_set) > 0:
|
|
28315
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
28316
|
+
|
|
28317
|
+
|
|
28318
|
+
|
|
28319
|
+
class PrometheusAlertGroupRuleSet(AbstractModel):
|
|
28320
|
+
r"""Prometheus alert rule information within the group.
|
|
28321
|
+
|
|
28322
|
+
"""
|
|
28323
|
+
|
|
28324
|
+
def __init__(self):
|
|
28325
|
+
r"""
|
|
28326
|
+
:param _RuleName: Alert rule name. same name is not allowed in the same Alert group.
|
|
28327
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28328
|
+
:type RuleName: str
|
|
28329
|
+
:param _Labels: Prometheus alert label list.
|
|
28330
|
+
|
|
28331
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28332
|
+
:type Labels: list of PrometheusRuleKV
|
|
28333
|
+
:param _Annotations: Prometheus alert annotation list.
|
|
28334
|
+
|
|
28335
|
+
Alarm object and Alarm message are special fields of Prometheus Rule Annotations. they need to pass through Annotations for transmission. the corresponding keys are summary and description respectively.
|
|
28336
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28337
|
+
:type Annotations: list of PrometheusRuleKV
|
|
28338
|
+
:param _Duration: Alert will be triggered after 'Expr' satisfied for 'Duration'.
|
|
28339
|
+
|
|
28340
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28341
|
+
:type Duration: str
|
|
28342
|
+
:param _Expr: Alert expression. see <a href="https://www.tencentcloud.comom/document/product/1416/56008?from_cn_redirect=1">alert rule description</a>.
|
|
28343
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28344
|
+
:type Expr: str
|
|
28345
|
+
:param _State: Alert rule status.
|
|
28346
|
+
2 - enable.
|
|
28347
|
+
3 - disabled.
|
|
28348
|
+
Enabled by default if left empty.
|
|
28349
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28350
|
+
:type State: int
|
|
28351
|
+
"""
|
|
28352
|
+
self._RuleName = None
|
|
28353
|
+
self._Labels = None
|
|
28354
|
+
self._Annotations = None
|
|
28355
|
+
self._Duration = None
|
|
28356
|
+
self._Expr = None
|
|
28357
|
+
self._State = None
|
|
28358
|
+
|
|
28359
|
+
@property
|
|
28360
|
+
def RuleName(self):
|
|
28361
|
+
r"""Alert rule name. same name is not allowed in the same Alert group.
|
|
28362
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28363
|
+
:rtype: str
|
|
28364
|
+
"""
|
|
28365
|
+
return self._RuleName
|
|
28366
|
+
|
|
28367
|
+
@RuleName.setter
|
|
28368
|
+
def RuleName(self, RuleName):
|
|
28369
|
+
self._RuleName = RuleName
|
|
28370
|
+
|
|
28371
|
+
@property
|
|
28372
|
+
def Labels(self):
|
|
28373
|
+
r"""Prometheus alert label list.
|
|
28374
|
+
|
|
28375
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28376
|
+
:rtype: list of PrometheusRuleKV
|
|
28377
|
+
"""
|
|
28378
|
+
return self._Labels
|
|
28379
|
+
|
|
28380
|
+
@Labels.setter
|
|
28381
|
+
def Labels(self, Labels):
|
|
28382
|
+
self._Labels = Labels
|
|
28383
|
+
|
|
28384
|
+
@property
|
|
28385
|
+
def Annotations(self):
|
|
28386
|
+
r"""Prometheus alert annotation list.
|
|
28387
|
+
|
|
28388
|
+
Alarm object and Alarm message are special fields of Prometheus Rule Annotations. they need to pass through Annotations for transmission. the corresponding keys are summary and description respectively.
|
|
28389
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28390
|
+
:rtype: list of PrometheusRuleKV
|
|
28391
|
+
"""
|
|
28392
|
+
return self._Annotations
|
|
28393
|
+
|
|
28394
|
+
@Annotations.setter
|
|
28395
|
+
def Annotations(self, Annotations):
|
|
28396
|
+
self._Annotations = Annotations
|
|
28397
|
+
|
|
28398
|
+
@property
|
|
28399
|
+
def Duration(self):
|
|
28400
|
+
r"""Alert will be triggered after 'Expr' satisfied for 'Duration'.
|
|
28401
|
+
|
|
28402
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28403
|
+
:rtype: str
|
|
28404
|
+
"""
|
|
28405
|
+
return self._Duration
|
|
28406
|
+
|
|
28407
|
+
@Duration.setter
|
|
28408
|
+
def Duration(self, Duration):
|
|
28409
|
+
self._Duration = Duration
|
|
28410
|
+
|
|
28411
|
+
@property
|
|
28412
|
+
def Expr(self):
|
|
28413
|
+
r"""Alert expression. see <a href="https://www.tencentcloud.comom/document/product/1416/56008?from_cn_redirect=1">alert rule description</a>.
|
|
28414
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28415
|
+
:rtype: str
|
|
28416
|
+
"""
|
|
28417
|
+
return self._Expr
|
|
28418
|
+
|
|
28419
|
+
@Expr.setter
|
|
28420
|
+
def Expr(self, Expr):
|
|
28421
|
+
self._Expr = Expr
|
|
28422
|
+
|
|
28423
|
+
@property
|
|
28424
|
+
def State(self):
|
|
28425
|
+
r"""Alert rule status.
|
|
28426
|
+
2 - enable.
|
|
28427
|
+
3 - disabled.
|
|
28428
|
+
Enabled by default if left empty.
|
|
28429
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28430
|
+
:rtype: int
|
|
28431
|
+
"""
|
|
28432
|
+
return self._State
|
|
28433
|
+
|
|
28434
|
+
@State.setter
|
|
28435
|
+
def State(self, State):
|
|
28436
|
+
self._State = State
|
|
28437
|
+
|
|
28438
|
+
|
|
28439
|
+
def _deserialize(self, params):
|
|
28440
|
+
self._RuleName = params.get("RuleName")
|
|
28441
|
+
if params.get("Labels") is not None:
|
|
28442
|
+
self._Labels = []
|
|
28443
|
+
for item in params.get("Labels"):
|
|
28444
|
+
obj = PrometheusRuleKV()
|
|
28445
|
+
obj._deserialize(item)
|
|
28446
|
+
self._Labels.append(obj)
|
|
28447
|
+
if params.get("Annotations") is not None:
|
|
28448
|
+
self._Annotations = []
|
|
28449
|
+
for item in params.get("Annotations"):
|
|
28450
|
+
obj = PrometheusRuleKV()
|
|
28451
|
+
obj._deserialize(item)
|
|
28452
|
+
self._Annotations.append(obj)
|
|
28453
|
+
self._Duration = params.get("Duration")
|
|
28454
|
+
self._Expr = params.get("Expr")
|
|
28455
|
+
self._State = params.get("State")
|
|
28456
|
+
memeber_set = set(params.keys())
|
|
28457
|
+
for name, value in vars(self).items():
|
|
28458
|
+
property_name = name[1:]
|
|
28459
|
+
if property_name in memeber_set:
|
|
28460
|
+
memeber_set.remove(property_name)
|
|
28461
|
+
if len(memeber_set) > 0:
|
|
28462
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
28463
|
+
|
|
28464
|
+
|
|
28465
|
+
|
|
28466
|
+
class PrometheusAlertGroupSet(AbstractModel):
|
|
28467
|
+
r"""Prometheus alert rule groups information.
|
|
28468
|
+
|
|
28469
|
+
"""
|
|
28470
|
+
|
|
28471
|
+
def __init__(self):
|
|
28472
|
+
r"""
|
|
28473
|
+
:param _GroupId: Alert group ID. must match the regular expression `alert-[a-z0-9]{8}`.
|
|
28474
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28475
|
+
:type GroupId: str
|
|
28476
|
+
:param _GroupName: Alert group name.
|
|
28477
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28478
|
+
:type GroupName: str
|
|
28479
|
+
:param _AMPReceivers: Alert template ID of tencent cloud observability platform (tcop). returns the converted notice ID of the Alert template.
|
|
28480
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28481
|
+
:type AMPReceivers: list of str
|
|
28482
|
+
:param _CustomReceiver: Custom Alert template.
|
|
28483
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28484
|
+
:type CustomReceiver: :class:`tencentcloud.monitor.v20180724.models.PrometheusAlertCustomReceiver`
|
|
28485
|
+
:param _RepeatInterval: Alert notification interval.
|
|
28486
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28487
|
+
:type RepeatInterval: str
|
|
28488
|
+
:param _TemplateId: If the Alert group is created via template, returns the template ID.
|
|
28489
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28490
|
+
:type TemplateId: str
|
|
28491
|
+
:param _Rules: Alert rule details within the group.
|
|
28492
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28493
|
+
:type Rules: list of PrometheusAlertGroupRuleSet
|
|
28494
|
+
:param _CreatedAt: Group creation time
|
|
28495
|
+
|
|
28496
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28497
|
+
:type CreatedAt: str
|
|
28498
|
+
:param _UpdatedAt: Group update time
|
|
28499
|
+
|
|
28500
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28501
|
+
:type UpdatedAt: str
|
|
28502
|
+
"""
|
|
28503
|
+
self._GroupId = None
|
|
28504
|
+
self._GroupName = None
|
|
28505
|
+
self._AMPReceivers = None
|
|
28506
|
+
self._CustomReceiver = None
|
|
28507
|
+
self._RepeatInterval = None
|
|
28508
|
+
self._TemplateId = None
|
|
28509
|
+
self._Rules = None
|
|
28510
|
+
self._CreatedAt = None
|
|
28511
|
+
self._UpdatedAt = None
|
|
28512
|
+
|
|
28513
|
+
@property
|
|
28514
|
+
def GroupId(self):
|
|
28515
|
+
r"""Alert group ID. must match the regular expression `alert-[a-z0-9]{8}`.
|
|
28516
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28517
|
+
:rtype: str
|
|
28518
|
+
"""
|
|
28519
|
+
return self._GroupId
|
|
28520
|
+
|
|
28521
|
+
@GroupId.setter
|
|
28522
|
+
def GroupId(self, GroupId):
|
|
28523
|
+
self._GroupId = GroupId
|
|
28524
|
+
|
|
28525
|
+
@property
|
|
28526
|
+
def GroupName(self):
|
|
28527
|
+
r"""Alert group name.
|
|
28528
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28529
|
+
:rtype: str
|
|
28530
|
+
"""
|
|
28531
|
+
return self._GroupName
|
|
28532
|
+
|
|
28533
|
+
@GroupName.setter
|
|
28534
|
+
def GroupName(self, GroupName):
|
|
28535
|
+
self._GroupName = GroupName
|
|
28536
|
+
|
|
28537
|
+
@property
|
|
28538
|
+
def AMPReceivers(self):
|
|
28539
|
+
r"""Alert template ID of tencent cloud observability platform (tcop). returns the converted notice ID of the Alert template.
|
|
28540
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28541
|
+
:rtype: list of str
|
|
28542
|
+
"""
|
|
28543
|
+
return self._AMPReceivers
|
|
28544
|
+
|
|
28545
|
+
@AMPReceivers.setter
|
|
28546
|
+
def AMPReceivers(self, AMPReceivers):
|
|
28547
|
+
self._AMPReceivers = AMPReceivers
|
|
28548
|
+
|
|
28549
|
+
@property
|
|
28550
|
+
def CustomReceiver(self):
|
|
28551
|
+
r"""Custom Alert template.
|
|
28552
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28553
|
+
:rtype: :class:`tencentcloud.monitor.v20180724.models.PrometheusAlertCustomReceiver`
|
|
28554
|
+
"""
|
|
28555
|
+
return self._CustomReceiver
|
|
28556
|
+
|
|
28557
|
+
@CustomReceiver.setter
|
|
28558
|
+
def CustomReceiver(self, CustomReceiver):
|
|
28559
|
+
self._CustomReceiver = CustomReceiver
|
|
28560
|
+
|
|
28561
|
+
@property
|
|
28562
|
+
def RepeatInterval(self):
|
|
28563
|
+
r"""Alert notification interval.
|
|
28564
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28565
|
+
:rtype: str
|
|
28566
|
+
"""
|
|
28567
|
+
return self._RepeatInterval
|
|
28568
|
+
|
|
28569
|
+
@RepeatInterval.setter
|
|
28570
|
+
def RepeatInterval(self, RepeatInterval):
|
|
28571
|
+
self._RepeatInterval = RepeatInterval
|
|
28572
|
+
|
|
28573
|
+
@property
|
|
28574
|
+
def TemplateId(self):
|
|
28575
|
+
r"""If the Alert group is created via template, returns the template ID.
|
|
28576
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28577
|
+
:rtype: str
|
|
28578
|
+
"""
|
|
28579
|
+
return self._TemplateId
|
|
28580
|
+
|
|
28581
|
+
@TemplateId.setter
|
|
28582
|
+
def TemplateId(self, TemplateId):
|
|
28583
|
+
self._TemplateId = TemplateId
|
|
28584
|
+
|
|
28585
|
+
@property
|
|
28586
|
+
def Rules(self):
|
|
28587
|
+
r"""Alert rule details within the group.
|
|
28588
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28589
|
+
:rtype: list of PrometheusAlertGroupRuleSet
|
|
28590
|
+
"""
|
|
28591
|
+
return self._Rules
|
|
28592
|
+
|
|
28593
|
+
@Rules.setter
|
|
28594
|
+
def Rules(self, Rules):
|
|
28595
|
+
self._Rules = Rules
|
|
28596
|
+
|
|
28597
|
+
@property
|
|
28598
|
+
def CreatedAt(self):
|
|
28599
|
+
r"""Group creation time
|
|
28600
|
+
|
|
28601
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28602
|
+
:rtype: str
|
|
28603
|
+
"""
|
|
28604
|
+
return self._CreatedAt
|
|
28605
|
+
|
|
28606
|
+
@CreatedAt.setter
|
|
28607
|
+
def CreatedAt(self, CreatedAt):
|
|
28608
|
+
self._CreatedAt = CreatedAt
|
|
28609
|
+
|
|
28610
|
+
@property
|
|
28611
|
+
def UpdatedAt(self):
|
|
28612
|
+
r"""Group update time
|
|
28613
|
+
|
|
28614
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28615
|
+
:rtype: str
|
|
28616
|
+
"""
|
|
28617
|
+
return self._UpdatedAt
|
|
28618
|
+
|
|
28619
|
+
@UpdatedAt.setter
|
|
28620
|
+
def UpdatedAt(self, UpdatedAt):
|
|
28621
|
+
self._UpdatedAt = UpdatedAt
|
|
28622
|
+
|
|
28623
|
+
|
|
28624
|
+
def _deserialize(self, params):
|
|
28625
|
+
self._GroupId = params.get("GroupId")
|
|
28626
|
+
self._GroupName = params.get("GroupName")
|
|
28627
|
+
self._AMPReceivers = params.get("AMPReceivers")
|
|
28628
|
+
if params.get("CustomReceiver") is not None:
|
|
28629
|
+
self._CustomReceiver = PrometheusAlertCustomReceiver()
|
|
28630
|
+
self._CustomReceiver._deserialize(params.get("CustomReceiver"))
|
|
28631
|
+
self._RepeatInterval = params.get("RepeatInterval")
|
|
28632
|
+
self._TemplateId = params.get("TemplateId")
|
|
28633
|
+
if params.get("Rules") is not None:
|
|
28634
|
+
self._Rules = []
|
|
28635
|
+
for item in params.get("Rules"):
|
|
28636
|
+
obj = PrometheusAlertGroupRuleSet()
|
|
28637
|
+
obj._deserialize(item)
|
|
28638
|
+
self._Rules.append(obj)
|
|
28639
|
+
self._CreatedAt = params.get("CreatedAt")
|
|
28640
|
+
self._UpdatedAt = params.get("UpdatedAt")
|
|
28641
|
+
memeber_set = set(params.keys())
|
|
28642
|
+
for name, value in vars(self).items():
|
|
28643
|
+
property_name = name[1:]
|
|
28644
|
+
if property_name in memeber_set:
|
|
28645
|
+
memeber_set.remove(property_name)
|
|
28646
|
+
if len(memeber_set) > 0:
|
|
28647
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
28648
|
+
|
|
28649
|
+
|
|
28650
|
+
|
|
28651
|
+
class PrometheusAlertManagerConfig(AbstractModel):
|
|
28652
|
+
r"""Self-built AlertManager configuration used by the alert channel
|
|
28653
|
+
|
|
28654
|
+
"""
|
|
28655
|
+
|
|
28656
|
+
def __init__(self):
|
|
28657
|
+
r"""
|
|
28658
|
+
:param _Url: AlertManager URL
|
|
28659
|
+
:type Url: str
|
|
28660
|
+
:param _ClusterType: Type of the cluster where AlertManager is deployed
|
|
28661
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28662
|
+
:type ClusterType: str
|
|
28663
|
+
:param _ClusterId: ID of the cluster where AlertManager is deployed
|
|
28664
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28665
|
+
:type ClusterId: str
|
|
28666
|
+
"""
|
|
28667
|
+
self._Url = None
|
|
28668
|
+
self._ClusterType = None
|
|
28669
|
+
self._ClusterId = None
|
|
28670
|
+
|
|
28671
|
+
@property
|
|
28672
|
+
def Url(self):
|
|
28673
|
+
r"""AlertManager URL
|
|
28674
|
+
:rtype: str
|
|
28675
|
+
"""
|
|
28676
|
+
return self._Url
|
|
28677
|
+
|
|
28678
|
+
@Url.setter
|
|
28679
|
+
def Url(self, Url):
|
|
28680
|
+
self._Url = Url
|
|
28681
|
+
|
|
28682
|
+
@property
|
|
28683
|
+
def ClusterType(self):
|
|
28684
|
+
r"""Type of the cluster where AlertManager is deployed
|
|
28685
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28686
|
+
:rtype: str
|
|
28687
|
+
"""
|
|
28688
|
+
return self._ClusterType
|
|
28689
|
+
|
|
28690
|
+
@ClusterType.setter
|
|
28691
|
+
def ClusterType(self, ClusterType):
|
|
28692
|
+
self._ClusterType = ClusterType
|
|
28693
|
+
|
|
28694
|
+
@property
|
|
28695
|
+
def ClusterId(self):
|
|
28696
|
+
r"""ID of the cluster where AlertManager is deployed
|
|
28697
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28698
|
+
:rtype: str
|
|
28699
|
+
"""
|
|
28700
|
+
return self._ClusterId
|
|
28701
|
+
|
|
28702
|
+
@ClusterId.setter
|
|
28703
|
+
def ClusterId(self, ClusterId):
|
|
28704
|
+
self._ClusterId = ClusterId
|
|
28705
|
+
|
|
28706
|
+
|
|
28707
|
+
def _deserialize(self, params):
|
|
28708
|
+
self._Url = params.get("Url")
|
|
28709
|
+
self._ClusterType = params.get("ClusterType")
|
|
28710
|
+
self._ClusterId = params.get("ClusterId")
|
|
28711
|
+
memeber_set = set(params.keys())
|
|
28712
|
+
for name, value in vars(self).items():
|
|
28713
|
+
property_name = name[1:]
|
|
28714
|
+
if property_name in memeber_set:
|
|
28715
|
+
memeber_set.remove(property_name)
|
|
28716
|
+
if len(memeber_set) > 0:
|
|
28717
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
28718
|
+
|
|
28719
|
+
|
|
28720
|
+
|
|
28721
|
+
class PrometheusAlertPolicyItem(AbstractModel):
|
|
28722
|
+
r"""TMP alerting rule instance
|
|
28723
|
+
|
|
28724
|
+
"""
|
|
28725
|
+
|
|
28726
|
+
def __init__(self):
|
|
28727
|
+
r"""
|
|
28728
|
+
:param _Name: Rule name
|
|
28729
|
+
:type Name: str
|
|
28730
|
+
:param _Rules: List of rules
|
|
28731
|
+
:type Rules: list of PrometheusAlertRule
|
|
28732
|
+
:param _Id: Alerting rule ID
|
|
28733
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28734
|
+
:type Id: str
|
|
28735
|
+
:param _TemplateId: If the alert comes from a template, `TemplateId` is the template ID.
|
|
28736
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28737
|
+
:type TemplateId: str
|
|
28738
|
+
:param _Notification: Alert channel, which may be returned as null if used in a template.
|
|
28739
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28740
|
+
:type Notification: :class:`tencentcloud.monitor.v20180724.models.PrometheusNotificationItem`
|
|
28741
|
+
:param _UpdatedAt: Last modification time
|
|
28742
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28743
|
+
:type UpdatedAt: str
|
|
28744
|
+
:param _ClusterId: If the alerting rule comes from the user cluster CRD resource definition, `ClusterId` is the cluster ID.
|
|
28745
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28746
|
+
:type ClusterId: str
|
|
28747
|
+
"""
|
|
28748
|
+
self._Name = None
|
|
28749
|
+
self._Rules = None
|
|
28750
|
+
self._Id = None
|
|
28751
|
+
self._TemplateId = None
|
|
28752
|
+
self._Notification = None
|
|
28753
|
+
self._UpdatedAt = None
|
|
28754
|
+
self._ClusterId = None
|
|
28755
|
+
|
|
28756
|
+
@property
|
|
28757
|
+
def Name(self):
|
|
28758
|
+
r"""Rule name
|
|
28759
|
+
:rtype: str
|
|
28760
|
+
"""
|
|
28761
|
+
return self._Name
|
|
28762
|
+
|
|
28763
|
+
@Name.setter
|
|
28764
|
+
def Name(self, Name):
|
|
28765
|
+
self._Name = Name
|
|
28766
|
+
|
|
28767
|
+
@property
|
|
28768
|
+
def Rules(self):
|
|
28769
|
+
r"""List of rules
|
|
28770
|
+
:rtype: list of PrometheusAlertRule
|
|
28771
|
+
"""
|
|
28772
|
+
return self._Rules
|
|
28773
|
+
|
|
28774
|
+
@Rules.setter
|
|
28775
|
+
def Rules(self, Rules):
|
|
28776
|
+
self._Rules = Rules
|
|
28777
|
+
|
|
28778
|
+
@property
|
|
28779
|
+
def Id(self):
|
|
28780
|
+
r"""Alerting rule ID
|
|
28781
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28782
|
+
:rtype: str
|
|
28783
|
+
"""
|
|
28784
|
+
return self._Id
|
|
28785
|
+
|
|
28786
|
+
@Id.setter
|
|
28787
|
+
def Id(self, Id):
|
|
28788
|
+
self._Id = Id
|
|
28789
|
+
|
|
28790
|
+
@property
|
|
28791
|
+
def TemplateId(self):
|
|
28792
|
+
r"""If the alert comes from a template, `TemplateId` is the template ID.
|
|
28793
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28794
|
+
:rtype: str
|
|
28795
|
+
"""
|
|
28796
|
+
return self._TemplateId
|
|
28797
|
+
|
|
28798
|
+
@TemplateId.setter
|
|
28799
|
+
def TemplateId(self, TemplateId):
|
|
28800
|
+
self._TemplateId = TemplateId
|
|
28801
|
+
|
|
28802
|
+
@property
|
|
28803
|
+
def Notification(self):
|
|
28804
|
+
r"""Alert channel, which may be returned as null if used in a template.
|
|
28805
|
+
Note: This field may return null, indicating that no valid values can be obtained.
|
|
28806
|
+
:rtype: :class:`tencentcloud.monitor.v20180724.models.PrometheusNotificationItem`
|
|
28807
|
+
"""
|
|
28808
|
+
return self._Notification
|
|
28809
|
+
|
|
28810
|
+
@Notification.setter
|
|
28811
|
+
def Notification(self, Notification):
|
|
27880
28812
|
self._Notification = Notification
|
|
27881
28813
|
|
|
27882
28814
|
@property
|
|
@@ -34516,6 +35448,301 @@ class UpdatePrometheusAgentStatusResponse(AbstractModel):
|
|
|
34516
35448
|
self._RequestId = params.get("RequestId")
|
|
34517
35449
|
|
|
34518
35450
|
|
|
35451
|
+
class UpdatePrometheusAlertGroupRequest(AbstractModel):
|
|
35452
|
+
r"""UpdatePrometheusAlertGroup request structure.
|
|
35453
|
+
|
|
35454
|
+
"""
|
|
35455
|
+
|
|
35456
|
+
def __init__(self):
|
|
35457
|
+
r"""
|
|
35458
|
+
:param _InstanceId: prometheus instance ID.
|
|
35459
|
+
:type InstanceId: str
|
|
35460
|
+
:param _GroupId: Alert group ID, such as alert-xxxx.
|
|
35461
|
+
:type GroupId: str
|
|
35462
|
+
:param _GroupName: Alert group name. not allowed to have the same name as other alert groups.
|
|
35463
|
+
:type GroupName: str
|
|
35464
|
+
:param _GroupState: Alert group status.
|
|
35465
|
+
2 - enable.
|
|
35466
|
+
3 - disabled.
|
|
35467
|
+
Specifies the Alert rule status under the `Rules` field to be overwritten when not empty.
|
|
35468
|
+
:type GroupState: int
|
|
35469
|
+
:param _AMPReceivers: Alert notification template ID list of tencent cloud observability platform, such as Consumer-xxxx or notice-xxxx.
|
|
35470
|
+
:type AMPReceivers: list of str
|
|
35471
|
+
:param _CustomReceiver: Specifies the custom Alert notification template.
|
|
35472
|
+
:type CustomReceiver: :class:`tencentcloud.monitor.v20180724.models.PrometheusAlertCustomReceiver`
|
|
35473
|
+
:param _RepeatInterval: Alert notification cycle (convergence time). defaults to 1h if left empty.
|
|
35474
|
+
:type RepeatInterval: str
|
|
35475
|
+
:param _Rules: Specifies the Alert rule list to be created.
|
|
35476
|
+
:type Rules: list of PrometheusAlertGroupRuleSet
|
|
35477
|
+
"""
|
|
35478
|
+
self._InstanceId = None
|
|
35479
|
+
self._GroupId = None
|
|
35480
|
+
self._GroupName = None
|
|
35481
|
+
self._GroupState = None
|
|
35482
|
+
self._AMPReceivers = None
|
|
35483
|
+
self._CustomReceiver = None
|
|
35484
|
+
self._RepeatInterval = None
|
|
35485
|
+
self._Rules = None
|
|
35486
|
+
|
|
35487
|
+
@property
|
|
35488
|
+
def InstanceId(self):
|
|
35489
|
+
r"""prometheus instance ID.
|
|
35490
|
+
:rtype: str
|
|
35491
|
+
"""
|
|
35492
|
+
return self._InstanceId
|
|
35493
|
+
|
|
35494
|
+
@InstanceId.setter
|
|
35495
|
+
def InstanceId(self, InstanceId):
|
|
35496
|
+
self._InstanceId = InstanceId
|
|
35497
|
+
|
|
35498
|
+
@property
|
|
35499
|
+
def GroupId(self):
|
|
35500
|
+
r"""Alert group ID, such as alert-xxxx.
|
|
35501
|
+
:rtype: str
|
|
35502
|
+
"""
|
|
35503
|
+
return self._GroupId
|
|
35504
|
+
|
|
35505
|
+
@GroupId.setter
|
|
35506
|
+
def GroupId(self, GroupId):
|
|
35507
|
+
self._GroupId = GroupId
|
|
35508
|
+
|
|
35509
|
+
@property
|
|
35510
|
+
def GroupName(self):
|
|
35511
|
+
r"""Alert group name. not allowed to have the same name as other alert groups.
|
|
35512
|
+
:rtype: str
|
|
35513
|
+
"""
|
|
35514
|
+
return self._GroupName
|
|
35515
|
+
|
|
35516
|
+
@GroupName.setter
|
|
35517
|
+
def GroupName(self, GroupName):
|
|
35518
|
+
self._GroupName = GroupName
|
|
35519
|
+
|
|
35520
|
+
@property
|
|
35521
|
+
def GroupState(self):
|
|
35522
|
+
r"""Alert group status.
|
|
35523
|
+
2 - enable.
|
|
35524
|
+
3 - disabled.
|
|
35525
|
+
Specifies the Alert rule status under the `Rules` field to be overwritten when not empty.
|
|
35526
|
+
:rtype: int
|
|
35527
|
+
"""
|
|
35528
|
+
return self._GroupState
|
|
35529
|
+
|
|
35530
|
+
@GroupState.setter
|
|
35531
|
+
def GroupState(self, GroupState):
|
|
35532
|
+
self._GroupState = GroupState
|
|
35533
|
+
|
|
35534
|
+
@property
|
|
35535
|
+
def AMPReceivers(self):
|
|
35536
|
+
r"""Alert notification template ID list of tencent cloud observability platform, such as Consumer-xxxx or notice-xxxx.
|
|
35537
|
+
:rtype: list of str
|
|
35538
|
+
"""
|
|
35539
|
+
return self._AMPReceivers
|
|
35540
|
+
|
|
35541
|
+
@AMPReceivers.setter
|
|
35542
|
+
def AMPReceivers(self, AMPReceivers):
|
|
35543
|
+
self._AMPReceivers = AMPReceivers
|
|
35544
|
+
|
|
35545
|
+
@property
|
|
35546
|
+
def CustomReceiver(self):
|
|
35547
|
+
r"""Specifies the custom Alert notification template.
|
|
35548
|
+
:rtype: :class:`tencentcloud.monitor.v20180724.models.PrometheusAlertCustomReceiver`
|
|
35549
|
+
"""
|
|
35550
|
+
return self._CustomReceiver
|
|
35551
|
+
|
|
35552
|
+
@CustomReceiver.setter
|
|
35553
|
+
def CustomReceiver(self, CustomReceiver):
|
|
35554
|
+
self._CustomReceiver = CustomReceiver
|
|
35555
|
+
|
|
35556
|
+
@property
|
|
35557
|
+
def RepeatInterval(self):
|
|
35558
|
+
r"""Alert notification cycle (convergence time). defaults to 1h if left empty.
|
|
35559
|
+
:rtype: str
|
|
35560
|
+
"""
|
|
35561
|
+
return self._RepeatInterval
|
|
35562
|
+
|
|
35563
|
+
@RepeatInterval.setter
|
|
35564
|
+
def RepeatInterval(self, RepeatInterval):
|
|
35565
|
+
self._RepeatInterval = RepeatInterval
|
|
35566
|
+
|
|
35567
|
+
@property
|
|
35568
|
+
def Rules(self):
|
|
35569
|
+
r"""Specifies the Alert rule list to be created.
|
|
35570
|
+
:rtype: list of PrometheusAlertGroupRuleSet
|
|
35571
|
+
"""
|
|
35572
|
+
return self._Rules
|
|
35573
|
+
|
|
35574
|
+
@Rules.setter
|
|
35575
|
+
def Rules(self, Rules):
|
|
35576
|
+
self._Rules = Rules
|
|
35577
|
+
|
|
35578
|
+
|
|
35579
|
+
def _deserialize(self, params):
|
|
35580
|
+
self._InstanceId = params.get("InstanceId")
|
|
35581
|
+
self._GroupId = params.get("GroupId")
|
|
35582
|
+
self._GroupName = params.get("GroupName")
|
|
35583
|
+
self._GroupState = params.get("GroupState")
|
|
35584
|
+
self._AMPReceivers = params.get("AMPReceivers")
|
|
35585
|
+
if params.get("CustomReceiver") is not None:
|
|
35586
|
+
self._CustomReceiver = PrometheusAlertCustomReceiver()
|
|
35587
|
+
self._CustomReceiver._deserialize(params.get("CustomReceiver"))
|
|
35588
|
+
self._RepeatInterval = params.get("RepeatInterval")
|
|
35589
|
+
if params.get("Rules") is not None:
|
|
35590
|
+
self._Rules = []
|
|
35591
|
+
for item in params.get("Rules"):
|
|
35592
|
+
obj = PrometheusAlertGroupRuleSet()
|
|
35593
|
+
obj._deserialize(item)
|
|
35594
|
+
self._Rules.append(obj)
|
|
35595
|
+
memeber_set = set(params.keys())
|
|
35596
|
+
for name, value in vars(self).items():
|
|
35597
|
+
property_name = name[1:]
|
|
35598
|
+
if property_name in memeber_set:
|
|
35599
|
+
memeber_set.remove(property_name)
|
|
35600
|
+
if len(memeber_set) > 0:
|
|
35601
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
35602
|
+
|
|
35603
|
+
|
|
35604
|
+
|
|
35605
|
+
class UpdatePrometheusAlertGroupResponse(AbstractModel):
|
|
35606
|
+
r"""UpdatePrometheusAlertGroup response structure.
|
|
35607
|
+
|
|
35608
|
+
"""
|
|
35609
|
+
|
|
35610
|
+
def __init__(self):
|
|
35611
|
+
r"""
|
|
35612
|
+
:param _GroupId: Updated Alert group ID. must match the regular expression `alert-[a-z0-9]{8}`.
|
|
35613
|
+
:type GroupId: str
|
|
35614
|
+
:param _RequestId: The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
35615
|
+
:type RequestId: str
|
|
35616
|
+
"""
|
|
35617
|
+
self._GroupId = None
|
|
35618
|
+
self._RequestId = None
|
|
35619
|
+
|
|
35620
|
+
@property
|
|
35621
|
+
def GroupId(self):
|
|
35622
|
+
r"""Updated Alert group ID. must match the regular expression `alert-[a-z0-9]{8}`.
|
|
35623
|
+
:rtype: str
|
|
35624
|
+
"""
|
|
35625
|
+
return self._GroupId
|
|
35626
|
+
|
|
35627
|
+
@GroupId.setter
|
|
35628
|
+
def GroupId(self, GroupId):
|
|
35629
|
+
self._GroupId = GroupId
|
|
35630
|
+
|
|
35631
|
+
@property
|
|
35632
|
+
def RequestId(self):
|
|
35633
|
+
r"""The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
35634
|
+
:rtype: str
|
|
35635
|
+
"""
|
|
35636
|
+
return self._RequestId
|
|
35637
|
+
|
|
35638
|
+
@RequestId.setter
|
|
35639
|
+
def RequestId(self, RequestId):
|
|
35640
|
+
self._RequestId = RequestId
|
|
35641
|
+
|
|
35642
|
+
|
|
35643
|
+
def _deserialize(self, params):
|
|
35644
|
+
self._GroupId = params.get("GroupId")
|
|
35645
|
+
self._RequestId = params.get("RequestId")
|
|
35646
|
+
|
|
35647
|
+
|
|
35648
|
+
class UpdatePrometheusAlertGroupStateRequest(AbstractModel):
|
|
35649
|
+
r"""UpdatePrometheusAlertGroupState request structure.
|
|
35650
|
+
|
|
35651
|
+
"""
|
|
35652
|
+
|
|
35653
|
+
def __init__(self):
|
|
35654
|
+
r"""
|
|
35655
|
+
:param _InstanceId: TMP instance ID
|
|
35656
|
+
:type InstanceId: str
|
|
35657
|
+
:param _GroupIds: Alarm group ID list, such as alert-xxxx.
|
|
35658
|
+
:type GroupIds: list of str
|
|
35659
|
+
:param _GroupState: Describes the group status of the alarm.
|
|
35660
|
+
2 - enable.
|
|
35661
|
+
3 - disabled.
|
|
35662
|
+
:type GroupState: int
|
|
35663
|
+
"""
|
|
35664
|
+
self._InstanceId = None
|
|
35665
|
+
self._GroupIds = None
|
|
35666
|
+
self._GroupState = None
|
|
35667
|
+
|
|
35668
|
+
@property
|
|
35669
|
+
def InstanceId(self):
|
|
35670
|
+
r"""TMP instance ID
|
|
35671
|
+
:rtype: str
|
|
35672
|
+
"""
|
|
35673
|
+
return self._InstanceId
|
|
35674
|
+
|
|
35675
|
+
@InstanceId.setter
|
|
35676
|
+
def InstanceId(self, InstanceId):
|
|
35677
|
+
self._InstanceId = InstanceId
|
|
35678
|
+
|
|
35679
|
+
@property
|
|
35680
|
+
def GroupIds(self):
|
|
35681
|
+
r"""Alarm group ID list, such as alert-xxxx.
|
|
35682
|
+
:rtype: list of str
|
|
35683
|
+
"""
|
|
35684
|
+
return self._GroupIds
|
|
35685
|
+
|
|
35686
|
+
@GroupIds.setter
|
|
35687
|
+
def GroupIds(self, GroupIds):
|
|
35688
|
+
self._GroupIds = GroupIds
|
|
35689
|
+
|
|
35690
|
+
@property
|
|
35691
|
+
def GroupState(self):
|
|
35692
|
+
r"""Describes the group status of the alarm.
|
|
35693
|
+
2 - enable.
|
|
35694
|
+
3 - disabled.
|
|
35695
|
+
:rtype: int
|
|
35696
|
+
"""
|
|
35697
|
+
return self._GroupState
|
|
35698
|
+
|
|
35699
|
+
@GroupState.setter
|
|
35700
|
+
def GroupState(self, GroupState):
|
|
35701
|
+
self._GroupState = GroupState
|
|
35702
|
+
|
|
35703
|
+
|
|
35704
|
+
def _deserialize(self, params):
|
|
35705
|
+
self._InstanceId = params.get("InstanceId")
|
|
35706
|
+
self._GroupIds = params.get("GroupIds")
|
|
35707
|
+
self._GroupState = params.get("GroupState")
|
|
35708
|
+
memeber_set = set(params.keys())
|
|
35709
|
+
for name, value in vars(self).items():
|
|
35710
|
+
property_name = name[1:]
|
|
35711
|
+
if property_name in memeber_set:
|
|
35712
|
+
memeber_set.remove(property_name)
|
|
35713
|
+
if len(memeber_set) > 0:
|
|
35714
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
35715
|
+
|
|
35716
|
+
|
|
35717
|
+
|
|
35718
|
+
class UpdatePrometheusAlertGroupStateResponse(AbstractModel):
|
|
35719
|
+
r"""UpdatePrometheusAlertGroupState response structure.
|
|
35720
|
+
|
|
35721
|
+
"""
|
|
35722
|
+
|
|
35723
|
+
def __init__(self):
|
|
35724
|
+
r"""
|
|
35725
|
+
:param _RequestId: The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
35726
|
+
:type RequestId: str
|
|
35727
|
+
"""
|
|
35728
|
+
self._RequestId = None
|
|
35729
|
+
|
|
35730
|
+
@property
|
|
35731
|
+
def RequestId(self):
|
|
35732
|
+
r"""The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
35733
|
+
:rtype: str
|
|
35734
|
+
"""
|
|
35735
|
+
return self._RequestId
|
|
35736
|
+
|
|
35737
|
+
@RequestId.setter
|
|
35738
|
+
def RequestId(self, RequestId):
|
|
35739
|
+
self._RequestId = RequestId
|
|
35740
|
+
|
|
35741
|
+
|
|
35742
|
+
def _deserialize(self, params):
|
|
35743
|
+
self._RequestId = params.get("RequestId")
|
|
35744
|
+
|
|
35745
|
+
|
|
34519
35746
|
class UpdatePrometheusScrapeJobRequest(AbstractModel):
|
|
34520
35747
|
r"""UpdatePrometheusScrapeJob request structure.
|
|
34521
35748
|
|