tencentcloud-sdk-monitor 3.0.746 → 3.0.748

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71a03606b2ea4a2d12d9a986e746b78ae85b9b1c
4
- data.tar.gz: 468e91764d9af8c9080705372e8b4634cf811f4a
3
+ metadata.gz: c28263d5c72a6e8a513a2ab9d9ca1d39ab2c5a94
4
+ data.tar.gz: 7032c6a4fcc03d9e9658c0a243b7c70a9d8b612c
5
5
  SHA512:
6
- metadata.gz: 995d186ab12bcbd86dac08fe8b95428fd89fd1843b84d64b5709bb2fadccdc7ac43fb734c36baae927b66b1e8174f021bdbb6203a4cb00afa06b9e088c53d253
7
- data.tar.gz: 0e138635633e855ef25fdfe34a46b8b2bad7b88e4be84f1cbf6723da82aaf0e271a2e18743b84bc356504bdbb2822044d0de86111759b7dfc8b1b309245caee3
6
+ metadata.gz: 694195bed85c8f51d27a7b167ff0e2fd5a219c85303c9c383330fbd2462f4871d781a1c5462582a35b56627f7b5027311228798ca9d86a40c7296fe264a06a66
7
+ data.tar.gz: 9095427532754f53d60e816edbe372e43ef27cfa89ca20c17e7d21e693d24daf93187f99d47263698e5fea54abdcc4316b7f088f844323994159c848c5aaf202
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.746
1
+ 3.0.748
@@ -367,6 +367,33 @@ module TencentCloud
367
367
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
368
368
  end
369
369
 
370
+ # 创建Prometheus告警规则分组
371
+
372
+ # 告警分组中可包含多条告警规则,分组内告警消息通过告警分组的通知模板发送。
373
+ # 支持单个告警分组下分别创建启用/禁用的告警规则。
374
+
375
+ # @param request: Request instance for CreatePrometheusAlertGroup.
376
+ # @type request: :class:`Tencentcloud::monitor::V20180724::CreatePrometheusAlertGroupRequest`
377
+ # @rtype: :class:`Tencentcloud::monitor::V20180724::CreatePrometheusAlertGroupResponse`
378
+ def CreatePrometheusAlertGroup(request)
379
+ body = send_request('CreatePrometheusAlertGroup', request.serialize)
380
+ response = JSON.parse(body)
381
+ if response['Response'].key?('Error') == false
382
+ model = CreatePrometheusAlertGroupResponse.new
383
+ model.deserialize(response['Response'])
384
+ model
385
+ else
386
+ code = response['Response']['Error']['Code']
387
+ message = response['Response']['Error']['Message']
388
+ reqid = response['Response']['RequestId']
389
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
390
+ end
391
+ rescue TencentCloud::Common::TencentCloudSDKException => e
392
+ raise e
393
+ rescue StandardError => e
394
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
395
+ end
396
+
370
397
  # 创建 Prometheus 告警策略(将逐步废弃,建议使用 CreatePrometheusAlertGroup 创建告警策略)
371
398
 
372
399
  # @param request: Request instance for CreatePrometheusAlertPolicy.
@@ -825,6 +852,30 @@ module TencentCloud
825
852
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
826
853
  end
827
854
 
855
+ # 删除Prometheus告警规则分组
856
+
857
+ # @param request: Request instance for DeletePrometheusAlertGroups.
858
+ # @type request: :class:`Tencentcloud::monitor::V20180724::DeletePrometheusAlertGroupsRequest`
859
+ # @rtype: :class:`Tencentcloud::monitor::V20180724::DeletePrometheusAlertGroupsResponse`
860
+ def DeletePrometheusAlertGroups(request)
861
+ body = send_request('DeletePrometheusAlertGroups', request.serialize)
862
+ response = JSON.parse(body)
863
+ if response['Response'].key?('Error') == false
864
+ model = DeletePrometheusAlertGroupsResponse.new
865
+ model.deserialize(response['Response'])
866
+ model
867
+ else
868
+ code = response['Response']['Error']['Code']
869
+ message = response['Response']['Error']['Message']
870
+ reqid = response['Response']['RequestId']
871
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
872
+ end
873
+ rescue TencentCloud::Common::TencentCloudSDKException => e
874
+ raise e
875
+ rescue StandardError => e
876
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
877
+ end
878
+
828
879
  # 删除2.0实例告警策略
829
880
 
830
881
  # @param request: Request instance for DeletePrometheusAlertPolicy.
@@ -1909,6 +1960,30 @@ module TencentCloud
1909
1960
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1910
1961
  end
1911
1962
 
1963
+ # 查询给定prometheus下的告警分组
1964
+
1965
+ # @param request: Request instance for DescribePrometheusAlertGroups.
1966
+ # @type request: :class:`Tencentcloud::monitor::V20180724::DescribePrometheusAlertGroupsRequest`
1967
+ # @rtype: :class:`Tencentcloud::monitor::V20180724::DescribePrometheusAlertGroupsResponse`
1968
+ def DescribePrometheusAlertGroups(request)
1969
+ body = send_request('DescribePrometheusAlertGroups', request.serialize)
1970
+ response = JSON.parse(body)
1971
+ if response['Response'].key?('Error') == false
1972
+ model = DescribePrometheusAlertGroupsResponse.new
1973
+ model.deserialize(response['Response'])
1974
+ model
1975
+ else
1976
+ code = response['Response']['Error']['Code']
1977
+ message = response['Response']['Error']['Message']
1978
+ reqid = response['Response']['RequestId']
1979
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1980
+ end
1981
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1982
+ raise e
1983
+ rescue StandardError => e
1984
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1985
+ end
1986
+
1912
1987
  # 获取2.0实例告警策略列表
1913
1988
 
1914
1989
  # @param request: Request instance for DescribePrometheusAlertPolicy.
@@ -3508,6 +3583,54 @@ module TencentCloud
3508
3583
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
3509
3584
  end
3510
3585
 
3586
+ # 更新Prometheus告警规则分组
3587
+
3588
+ # @param request: Request instance for UpdatePrometheusAlertGroup.
3589
+ # @type request: :class:`Tencentcloud::monitor::V20180724::UpdatePrometheusAlertGroupRequest`
3590
+ # @rtype: :class:`Tencentcloud::monitor::V20180724::UpdatePrometheusAlertGroupResponse`
3591
+ def UpdatePrometheusAlertGroup(request)
3592
+ body = send_request('UpdatePrometheusAlertGroup', request.serialize)
3593
+ response = JSON.parse(body)
3594
+ if response['Response'].key?('Error') == false
3595
+ model = UpdatePrometheusAlertGroupResponse.new
3596
+ model.deserialize(response['Response'])
3597
+ model
3598
+ else
3599
+ code = response['Response']['Error']['Code']
3600
+ message = response['Response']['Error']['Message']
3601
+ reqid = response['Response']['RequestId']
3602
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
3603
+ end
3604
+ rescue TencentCloud::Common::TencentCloudSDKException => e
3605
+ raise e
3606
+ rescue StandardError => e
3607
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
3608
+ end
3609
+
3610
+ # 批量更新告警分组状态,将分组中全部告警规则更新为目标状态
3611
+
3612
+ # @param request: Request instance for UpdatePrometheusAlertGroupState.
3613
+ # @type request: :class:`Tencentcloud::monitor::V20180724::UpdatePrometheusAlertGroupStateRequest`
3614
+ # @rtype: :class:`Tencentcloud::monitor::V20180724::UpdatePrometheusAlertGroupStateResponse`
3615
+ def UpdatePrometheusAlertGroupState(request)
3616
+ body = send_request('UpdatePrometheusAlertGroupState', request.serialize)
3617
+ response = JSON.parse(body)
3618
+ if response['Response'].key?('Error') == false
3619
+ model = UpdatePrometheusAlertGroupStateResponse.new
3620
+ model.deserialize(response['Response'])
3621
+ model
3622
+ else
3623
+ code = response['Response']['Error']['Code']
3624
+ message = response['Response']['Error']['Message']
3625
+ reqid = response['Response']['RequestId']
3626
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
3627
+ end
3628
+ rescue TencentCloud::Common::TencentCloudSDKException => e
3629
+ raise e
3630
+ rescue StandardError => e
3631
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
3632
+ end
3633
+
3511
3634
  # 更新 Prometheus Agent 抓取任务
3512
3635
 
3513
3636
  # @param request: Request instance for UpdatePrometheusScrapeJob.
@@ -2149,6 +2149,79 @@ module TencentCloud
2149
2149
  end
2150
2150
  end
2151
2151
 
2152
+ # CreatePrometheusAlertGroup请求参数结构体
2153
+ class CreatePrometheusAlertGroupRequest < TencentCloud::Common::AbstractModel
2154
+ # @param InstanceId: prometheus实例ID
2155
+ # @type InstanceId: String
2156
+ # @param GroupName: 告警分组名称,不能与其他告警分组重名
2157
+ # @type GroupName: String
2158
+ # @param GroupState: 告警分组状态:
2159
+ # 2 -- 启用
2160
+ # 3 -- 禁用
2161
+ # 不为空时会覆盖 `Rules`字段下所有告警规则状态
2162
+ # @type GroupState: Integer
2163
+ # @param AMPReceivers: 云监控告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx
2164
+ # @type AMPReceivers: Array
2165
+ # @param CustomReceiver: 自定义告警通知模板
2166
+ # @type CustomReceiver: :class:`Tencentcloud::Monitor.v20180724.models.PrometheusAlertCustomReceiver`
2167
+ # @param RepeatInterval: 告警通知周期(收敛时间),为空默认1h
2168
+ # @type RepeatInterval: String
2169
+ # @param Rules: 要创建的告警规则列表
2170
+ # @type Rules: Array
2171
+
2172
+ attr_accessor :InstanceId, :GroupName, :GroupState, :AMPReceivers, :CustomReceiver, :RepeatInterval, :Rules
2173
+
2174
+ def initialize(instanceid=nil, groupname=nil, groupstate=nil, ampreceivers=nil, customreceiver=nil, repeatinterval=nil, rules=nil)
2175
+ @InstanceId = instanceid
2176
+ @GroupName = groupname
2177
+ @GroupState = groupstate
2178
+ @AMPReceivers = ampreceivers
2179
+ @CustomReceiver = customreceiver
2180
+ @RepeatInterval = repeatinterval
2181
+ @Rules = rules
2182
+ end
2183
+
2184
+ def deserialize(params)
2185
+ @InstanceId = params['InstanceId']
2186
+ @GroupName = params['GroupName']
2187
+ @GroupState = params['GroupState']
2188
+ @AMPReceivers = params['AMPReceivers']
2189
+ unless params['CustomReceiver'].nil?
2190
+ @CustomReceiver = PrometheusAlertCustomReceiver.new
2191
+ @CustomReceiver.deserialize(params['CustomReceiver'])
2192
+ end
2193
+ @RepeatInterval = params['RepeatInterval']
2194
+ unless params['Rules'].nil?
2195
+ @Rules = []
2196
+ params['Rules'].each do |i|
2197
+ prometheusalertgroupruleset_tmp = PrometheusAlertGroupRuleSet.new
2198
+ prometheusalertgroupruleset_tmp.deserialize(i)
2199
+ @Rules << prometheusalertgroupruleset_tmp
2200
+ end
2201
+ end
2202
+ end
2203
+ end
2204
+
2205
+ # CreatePrometheusAlertGroup返回参数结构体
2206
+ class CreatePrometheusAlertGroupResponse < TencentCloud::Common::AbstractModel
2207
+ # @param GroupId: 创建的告警分组ID,满足正则表达式`alert-[a-z0-9]{8}`
2208
+ # @type GroupId: String
2209
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2210
+ # @type RequestId: String
2211
+
2212
+ attr_accessor :GroupId, :RequestId
2213
+
2214
+ def initialize(groupid=nil, requestid=nil)
2215
+ @GroupId = groupid
2216
+ @RequestId = requestid
2217
+ end
2218
+
2219
+ def deserialize(params)
2220
+ @GroupId = params['GroupId']
2221
+ @RequestId = params['RequestId']
2222
+ end
2223
+ end
2224
+
2152
2225
  # CreatePrometheusAlertPolicy请求参数结构体
2153
2226
  class CreatePrometheusAlertPolicyRequest < TencentCloud::Common::AbstractModel
2154
2227
  # @param InstanceId: 实例id
@@ -3050,6 +3123,42 @@ module TencentCloud
3050
3123
  end
3051
3124
  end
3052
3125
 
3126
+ # DeletePrometheusAlertGroups请求参数结构体
3127
+ class DeletePrometheusAlertGroupsRequest < TencentCloud::Common::AbstractModel
3128
+ # @param InstanceId: prometheus实例id
3129
+ # @type InstanceId: String
3130
+ # @param GroupIds: 需要删除的告警分组ID,形如alert-xxxxx
3131
+ # @type GroupIds: Array
3132
+
3133
+ attr_accessor :InstanceId, :GroupIds
3134
+
3135
+ def initialize(instanceid=nil, groupids=nil)
3136
+ @InstanceId = instanceid
3137
+ @GroupIds = groupids
3138
+ end
3139
+
3140
+ def deserialize(params)
3141
+ @InstanceId = params['InstanceId']
3142
+ @GroupIds = params['GroupIds']
3143
+ end
3144
+ end
3145
+
3146
+ # DeletePrometheusAlertGroups返回参数结构体
3147
+ class DeletePrometheusAlertGroupsResponse < TencentCloud::Common::AbstractModel
3148
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
3149
+ # @type RequestId: String
3150
+
3151
+ attr_accessor :RequestId
3152
+
3153
+ def initialize(requestid=nil)
3154
+ @RequestId = requestid
3155
+ end
3156
+
3157
+ def deserialize(params)
3158
+ @RequestId = params['RequestId']
3159
+ end
3160
+ end
3161
+
3053
3162
  # DeletePrometheusAlertPolicy请求参数结构体
3054
3163
  class DeletePrometheusAlertPolicyRequest < TencentCloud::Common::AbstractModel
3055
3164
  # @param InstanceId: 实例ID(可通过 DescribePrometheusInstances 接口获取)
@@ -7178,6 +7287,73 @@ module TencentCloud
7178
7287
  end
7179
7288
  end
7180
7289
 
7290
+ # DescribePrometheusAlertGroups请求参数结构体
7291
+ class DescribePrometheusAlertGroupsRequest < TencentCloud::Common::AbstractModel
7292
+ # @param InstanceId: Prometheus 实例 ID
7293
+ # @type InstanceId: String
7294
+ # @param Limit: 返回数量,默认为 20,最大值为 100
7295
+ # @type Limit: Integer
7296
+ # @param Offset: 偏移量,默认为 0
7297
+ # @type Offset: Integer
7298
+ # @param GroupId: 告警分组ID,形如alert-xxxx。
7299
+ # 查询给定ID的告警分组
7300
+ # @type GroupId: String
7301
+ # @param GroupName: 告警分组名称。
7302
+ # 查询名称中包含给定字符串的告警分组
7303
+ # @type GroupName: String
7304
+
7305
+ attr_accessor :InstanceId, :Limit, :Offset, :GroupId, :GroupName
7306
+
7307
+ def initialize(instanceid=nil, limit=nil, offset=nil, groupid=nil, groupname=nil)
7308
+ @InstanceId = instanceid
7309
+ @Limit = limit
7310
+ @Offset = offset
7311
+ @GroupId = groupid
7312
+ @GroupName = groupname
7313
+ end
7314
+
7315
+ def deserialize(params)
7316
+ @InstanceId = params['InstanceId']
7317
+ @Limit = params['Limit']
7318
+ @Offset = params['Offset']
7319
+ @GroupId = params['GroupId']
7320
+ @GroupName = params['GroupName']
7321
+ end
7322
+ end
7323
+
7324
+ # DescribePrometheusAlertGroups返回参数结构体
7325
+ class DescribePrometheusAlertGroupsResponse < TencentCloud::Common::AbstractModel
7326
+ # @param AlertGroupSet: 告警分组信息
7327
+ # 注意:此字段可能返回 null,表示取不到有效值。
7328
+ # @type AlertGroupSet: Array
7329
+ # @param TotalCount: 告警分组总数
7330
+ # 注意:此字段可能返回 null,表示取不到有效值。
7331
+ # @type TotalCount: Integer
7332
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
7333
+ # @type RequestId: String
7334
+
7335
+ attr_accessor :AlertGroupSet, :TotalCount, :RequestId
7336
+
7337
+ def initialize(alertgroupset=nil, totalcount=nil, requestid=nil)
7338
+ @AlertGroupSet = alertgroupset
7339
+ @TotalCount = totalcount
7340
+ @RequestId = requestid
7341
+ end
7342
+
7343
+ def deserialize(params)
7344
+ unless params['AlertGroupSet'].nil?
7345
+ @AlertGroupSet = []
7346
+ params['AlertGroupSet'].each do |i|
7347
+ prometheusalertgroupset_tmp = PrometheusAlertGroupSet.new
7348
+ prometheusalertgroupset_tmp.deserialize(i)
7349
+ @AlertGroupSet << prometheusalertgroupset_tmp
7350
+ end
7351
+ end
7352
+ @TotalCount = params['TotalCount']
7353
+ @RequestId = params['RequestId']
7354
+ end
7355
+ end
7356
+
7181
7357
  # DescribePrometheusAlertPolicy请求参数结构体
7182
7358
  class DescribePrometheusAlertPolicyRequest < TencentCloud::Common::AbstractModel
7183
7359
  # @param InstanceId: 实例id
@@ -11308,6 +11484,202 @@ module TencentCloud
11308
11484
  end
11309
11485
  end
11310
11486
 
11487
+ # Prometheus自定义告警通知时间段
11488
+ class PrometheusAlertAllowTimeRange < TencentCloud::Common::AbstractModel
11489
+ # @param Start: 从0点开始的秒数
11490
+ # 注意:此字段可能返回 null,表示取不到有效值。
11491
+ # @type Start: String
11492
+ # @param End: 从0点开始的秒数
11493
+ # 注意:此字段可能返回 null,表示取不到有效值。
11494
+ # @type End: String
11495
+
11496
+ attr_accessor :Start, :End
11497
+
11498
+ def initialize(start=nil, _end=nil)
11499
+ @Start = start
11500
+ @End = _end
11501
+ end
11502
+
11503
+ def deserialize(params)
11504
+ @Start = params['Start']
11505
+ @End = params['End']
11506
+ end
11507
+ end
11508
+
11509
+ # Prometheus告警自定义通知模板
11510
+ class PrometheusAlertCustomReceiver < TencentCloud::Common::AbstractModel
11511
+ # @param Type: 自定义通知类型
11512
+ # alertmanager -- vpc内自建alertmanager
11513
+ # webhook -- vpc内webhook地址
11514
+ # 注意:此字段可能返回 null,表示取不到有效值。
11515
+ # @type Type: String
11516
+ # @param Url: alertmanager/webhook地址。(prometheus实例同vpc内ip)
11517
+ # 注意:此字段可能返回 null,表示取不到有效值。
11518
+ # @type Url: String
11519
+ # @param AllowedTimeRanges: 允许发送告警的时间范围
11520
+ # 注意:此字段可能返回 null,表示取不到有效值。
11521
+ # @type AllowedTimeRanges: Array
11522
+ # @param ClusterId: alertmanager所在的内网集群ID
11523
+ # 注意:此字段可能返回 null,表示取不到有效值。
11524
+ # @type ClusterId: String
11525
+ # @param ClusterType: alertmanager所在的内网集群类型(tke/eks/tdcc)
11526
+ # 注意:此字段可能返回 null,表示取不到有效值。
11527
+ # @type ClusterType: String
11528
+
11529
+ attr_accessor :Type, :Url, :AllowedTimeRanges, :ClusterId, :ClusterType
11530
+
11531
+ def initialize(type=nil, url=nil, allowedtimeranges=nil, clusterid=nil, clustertype=nil)
11532
+ @Type = type
11533
+ @Url = url
11534
+ @AllowedTimeRanges = allowedtimeranges
11535
+ @ClusterId = clusterid
11536
+ @ClusterType = clustertype
11537
+ end
11538
+
11539
+ def deserialize(params)
11540
+ @Type = params['Type']
11541
+ @Url = params['Url']
11542
+ unless params['AllowedTimeRanges'].nil?
11543
+ @AllowedTimeRanges = []
11544
+ params['AllowedTimeRanges'].each do |i|
11545
+ prometheusalertallowtimerange_tmp = PrometheusAlertAllowTimeRange.new
11546
+ prometheusalertallowtimerange_tmp.deserialize(i)
11547
+ @AllowedTimeRanges << prometheusalertallowtimerange_tmp
11548
+ end
11549
+ end
11550
+ @ClusterId = params['ClusterId']
11551
+ @ClusterType = params['ClusterType']
11552
+ end
11553
+ end
11554
+
11555
+ # 告警分组内告警规则信息
11556
+ class PrometheusAlertGroupRuleSet < TencentCloud::Common::AbstractModel
11557
+ # @param RuleName: 告警规则名称,同一告警分组下不允许重名
11558
+ # 注意:此字段可能返回 null,表示取不到有效值。
11559
+ # @type RuleName: String
11560
+ # @param Labels: 标签列表
11561
+ # 注意:此字段可能返回 null,表示取不到有效值。
11562
+ # @type Labels: Array
11563
+ # @param Annotations: 注释列表
11564
+
11565
+ # 告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
11566
+ # 注意:此字段可能返回 null,表示取不到有效值。
11567
+ # @type Annotations: Array
11568
+ # @param Duration: 规则报警持续时间
11569
+ # 注意:此字段可能返回 null,表示取不到有效值。
11570
+ # @type Duration: String
11571
+ # @param Expr: 规则表达式,可参考<a href="https://cloud.tencent.com/document/product/1416/56008">告警规则说明</a>
11572
+ # 注意:此字段可能返回 null,表示取不到有效值。
11573
+ # @type Expr: String
11574
+ # @param State: 告警规则状态:
11575
+ # 2-启用
11576
+ # 3-禁用
11577
+ # 为空默认启用
11578
+ # 注意:此字段可能返回 null,表示取不到有效值。
11579
+ # @type State: Integer
11580
+
11581
+ attr_accessor :RuleName, :Labels, :Annotations, :Duration, :Expr, :State
11582
+
11583
+ def initialize(rulename=nil, labels=nil, annotations=nil, duration=nil, expr=nil, state=nil)
11584
+ @RuleName = rulename
11585
+ @Labels = labels
11586
+ @Annotations = annotations
11587
+ @Duration = duration
11588
+ @Expr = expr
11589
+ @State = state
11590
+ end
11591
+
11592
+ def deserialize(params)
11593
+ @RuleName = params['RuleName']
11594
+ unless params['Labels'].nil?
11595
+ @Labels = []
11596
+ params['Labels'].each do |i|
11597
+ prometheusrulekv_tmp = PrometheusRuleKV.new
11598
+ prometheusrulekv_tmp.deserialize(i)
11599
+ @Labels << prometheusrulekv_tmp
11600
+ end
11601
+ end
11602
+ unless params['Annotations'].nil?
11603
+ @Annotations = []
11604
+ params['Annotations'].each do |i|
11605
+ prometheusrulekv_tmp = PrometheusRuleKV.new
11606
+ prometheusrulekv_tmp.deserialize(i)
11607
+ @Annotations << prometheusrulekv_tmp
11608
+ end
11609
+ end
11610
+ @Duration = params['Duration']
11611
+ @Expr = params['Expr']
11612
+ @State = params['State']
11613
+ end
11614
+ end
11615
+
11616
+ # Prometheus告警规则分组信息
11617
+ class PrometheusAlertGroupSet < TencentCloud::Common::AbstractModel
11618
+ # @param GroupId: 告警分组ID,满足正则表达式`alert-[a-z0-9]{8}`
11619
+ # 注意:此字段可能返回 null,表示取不到有效值。
11620
+ # @type GroupId: String
11621
+ # @param GroupName: 告警分组名称
11622
+ # 注意:此字段可能返回 null,表示取不到有效值。
11623
+ # @type GroupName: String
11624
+ # @param AMPReceivers: 云监控告警模板ID ,返回告警模板转换后的notice ID。
11625
+ # 注意:此字段可能返回 null,表示取不到有效值。
11626
+ # @type AMPReceivers: Array
11627
+ # @param CustomReceiver: 自定义告警模板
11628
+ # 注意:此字段可能返回 null,表示取不到有效值。
11629
+ # @type CustomReceiver: :class:`Tencentcloud::Monitor.v20180724.models.PrometheusAlertCustomReceiver`
11630
+ # @param RepeatInterval: 告警通知间隔
11631
+ # 注意:此字段可能返回 null,表示取不到有效值。
11632
+ # @type RepeatInterval: String
11633
+ # @param TemplateId: 若告警分组通过模板创建,则返回模板ID
11634
+ # 注意:此字段可能返回 null,表示取不到有效值。
11635
+ # @type TemplateId: String
11636
+ # @param Rules: 分组内告警规则详情
11637
+ # 注意:此字段可能返回 null,表示取不到有效值。
11638
+ # @type Rules: Array
11639
+ # @param CreatedAt: 分组创建时间
11640
+ # 注意:此字段可能返回 null,表示取不到有效值。
11641
+ # @type CreatedAt: String
11642
+ # @param UpdatedAt: 分组更新时间
11643
+ # 注意:此字段可能返回 null,表示取不到有效值。
11644
+ # @type UpdatedAt: String
11645
+
11646
+ attr_accessor :GroupId, :GroupName, :AMPReceivers, :CustomReceiver, :RepeatInterval, :TemplateId, :Rules, :CreatedAt, :UpdatedAt
11647
+
11648
+ def initialize(groupid=nil, groupname=nil, ampreceivers=nil, customreceiver=nil, repeatinterval=nil, templateid=nil, rules=nil, createdat=nil, updatedat=nil)
11649
+ @GroupId = groupid
11650
+ @GroupName = groupname
11651
+ @AMPReceivers = ampreceivers
11652
+ @CustomReceiver = customreceiver
11653
+ @RepeatInterval = repeatinterval
11654
+ @TemplateId = templateid
11655
+ @Rules = rules
11656
+ @CreatedAt = createdat
11657
+ @UpdatedAt = updatedat
11658
+ end
11659
+
11660
+ def deserialize(params)
11661
+ @GroupId = params['GroupId']
11662
+ @GroupName = params['GroupName']
11663
+ @AMPReceivers = params['AMPReceivers']
11664
+ unless params['CustomReceiver'].nil?
11665
+ @CustomReceiver = PrometheusAlertCustomReceiver.new
11666
+ @CustomReceiver.deserialize(params['CustomReceiver'])
11667
+ end
11668
+ @RepeatInterval = params['RepeatInterval']
11669
+ @TemplateId = params['TemplateId']
11670
+ unless params['Rules'].nil?
11671
+ @Rules = []
11672
+ params['Rules'].each do |i|
11673
+ prometheusalertgroupruleset_tmp = PrometheusAlertGroupRuleSet.new
11674
+ prometheusalertgroupruleset_tmp.deserialize(i)
11675
+ @Rules << prometheusalertgroupruleset_tmp
11676
+ end
11677
+ end
11678
+ @CreatedAt = params['CreatedAt']
11679
+ @UpdatedAt = params['UpdatedAt']
11680
+ end
11681
+ end
11682
+
11311
11683
  # 告警渠道使用自建alertmanager的配置
11312
11684
  class PrometheusAlertManagerConfig < TencentCloud::Common::AbstractModel
11313
11685
  # @param Url: alertmanager url
@@ -13974,6 +14346,125 @@ module TencentCloud
13974
14346
  end
13975
14347
  end
13976
14348
 
14349
+ # UpdatePrometheusAlertGroup请求参数结构体
14350
+ class UpdatePrometheusAlertGroupRequest < TencentCloud::Common::AbstractModel
14351
+ # @param InstanceId: prometheus实例ID
14352
+ # @type InstanceId: String
14353
+ # @param GroupId: 告警分组ID,形如alert-xxxx
14354
+ # @type GroupId: String
14355
+ # @param GroupName: 告警分组名称,不能与其他告警分组重名
14356
+ # @type GroupName: String
14357
+ # @param GroupState: 告警分组状态:
14358
+ # 2 -- 启用
14359
+ # 3 -- 禁用
14360
+ # 不为空时会覆盖 `Rules`字段下所有告警规则状态
14361
+ # @type GroupState: Integer
14362
+ # @param AMPReceivers: 云监控告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx
14363
+ # @type AMPReceivers: Array
14364
+ # @param CustomReceiver: 自定义告警通知模板
14365
+ # @type CustomReceiver: :class:`Tencentcloud::Monitor.v20180724.models.PrometheusAlertCustomReceiver`
14366
+ # @param RepeatInterval: 告警通知周期(收敛时间),为空默认1h
14367
+ # @type RepeatInterval: String
14368
+ # @param Rules: 要创建的告警规则列表
14369
+ # @type Rules: Array
14370
+
14371
+ attr_accessor :InstanceId, :GroupId, :GroupName, :GroupState, :AMPReceivers, :CustomReceiver, :RepeatInterval, :Rules
14372
+
14373
+ def initialize(instanceid=nil, groupid=nil, groupname=nil, groupstate=nil, ampreceivers=nil, customreceiver=nil, repeatinterval=nil, rules=nil)
14374
+ @InstanceId = instanceid
14375
+ @GroupId = groupid
14376
+ @GroupName = groupname
14377
+ @GroupState = groupstate
14378
+ @AMPReceivers = ampreceivers
14379
+ @CustomReceiver = customreceiver
14380
+ @RepeatInterval = repeatinterval
14381
+ @Rules = rules
14382
+ end
14383
+
14384
+ def deserialize(params)
14385
+ @InstanceId = params['InstanceId']
14386
+ @GroupId = params['GroupId']
14387
+ @GroupName = params['GroupName']
14388
+ @GroupState = params['GroupState']
14389
+ @AMPReceivers = params['AMPReceivers']
14390
+ unless params['CustomReceiver'].nil?
14391
+ @CustomReceiver = PrometheusAlertCustomReceiver.new
14392
+ @CustomReceiver.deserialize(params['CustomReceiver'])
14393
+ end
14394
+ @RepeatInterval = params['RepeatInterval']
14395
+ unless params['Rules'].nil?
14396
+ @Rules = []
14397
+ params['Rules'].each do |i|
14398
+ prometheusalertgroupruleset_tmp = PrometheusAlertGroupRuleSet.new
14399
+ prometheusalertgroupruleset_tmp.deserialize(i)
14400
+ @Rules << prometheusalertgroupruleset_tmp
14401
+ end
14402
+ end
14403
+ end
14404
+ end
14405
+
14406
+ # UpdatePrometheusAlertGroup返回参数结构体
14407
+ class UpdatePrometheusAlertGroupResponse < TencentCloud::Common::AbstractModel
14408
+ # @param GroupId: 更新的告警分组ID,满足正则表达式`alert-[a-z0-9]{8}`
14409
+ # @type GroupId: String
14410
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
14411
+ # @type RequestId: String
14412
+
14413
+ attr_accessor :GroupId, :RequestId
14414
+
14415
+ def initialize(groupid=nil, requestid=nil)
14416
+ @GroupId = groupid
14417
+ @RequestId = requestid
14418
+ end
14419
+
14420
+ def deserialize(params)
14421
+ @GroupId = params['GroupId']
14422
+ @RequestId = params['RequestId']
14423
+ end
14424
+ end
14425
+
14426
+ # UpdatePrometheusAlertGroupState请求参数结构体
14427
+ class UpdatePrometheusAlertGroupStateRequest < TencentCloud::Common::AbstractModel
14428
+ # @param InstanceId: Prometheus 实例 ID
14429
+ # @type InstanceId: String
14430
+ # @param GroupIds: 告警分组ID列表,形如alert-xxxx
14431
+ # @type GroupIds: Array
14432
+ # @param GroupState: 告警分组状态
14433
+ # 2 -- 启用
14434
+ # 3 -- 禁用
14435
+ # @type GroupState: Integer
14436
+
14437
+ attr_accessor :InstanceId, :GroupIds, :GroupState
14438
+
14439
+ def initialize(instanceid=nil, groupids=nil, groupstate=nil)
14440
+ @InstanceId = instanceid
14441
+ @GroupIds = groupids
14442
+ @GroupState = groupstate
14443
+ end
14444
+
14445
+ def deserialize(params)
14446
+ @InstanceId = params['InstanceId']
14447
+ @GroupIds = params['GroupIds']
14448
+ @GroupState = params['GroupState']
14449
+ end
14450
+ end
14451
+
14452
+ # UpdatePrometheusAlertGroupState返回参数结构体
14453
+ class UpdatePrometheusAlertGroupStateResponse < TencentCloud::Common::AbstractModel
14454
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
14455
+ # @type RequestId: String
14456
+
14457
+ attr_accessor :RequestId
14458
+
14459
+ def initialize(requestid=nil)
14460
+ @RequestId = requestid
14461
+ end
14462
+
14463
+ def deserialize(params)
14464
+ @RequestId = params['RequestId']
14465
+ end
14466
+ end
14467
+
13977
14468
  # UpdatePrometheusScrapeJob请求参数结构体
13978
14469
  class UpdatePrometheusScrapeJobRequest < TencentCloud::Common::AbstractModel
13979
14470
  # @param InstanceId: Prometheus 实例 ID(可通过 DescribePrometheusInstances 接口获取)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.746
4
+ version: 3.0.748
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common