tencentcloud-sdk-tke 1.0.315 → 1.0.316

Sign up to get free protection for your applications and to get access to all the features.
@@ -2280,27 +2280,43 @@ module TencentCloud
2280
2280
 
2281
2281
  # CreatePrometheusAlertPolicy请求参数结构体
2282
2282
  class CreatePrometheusAlertPolicyRequest < TencentCloud::Common::AbstractModel
2283
+ # @param InstanceId: 实例id
2284
+ # @type InstanceId: String
2285
+ # @param AlertRule: 告警配置
2286
+ # @type AlertRule: :class:`Tencentcloud::Tke.v20180525.models.PrometheusAlertPolicyItem`
2283
2287
 
2288
+ attr_accessor :InstanceId, :AlertRule
2284
2289
 
2285
- def initialize()
2290
+ def initialize(instanceid=nil, alertrule=nil)
2291
+ @InstanceId = instanceid
2292
+ @AlertRule = alertrule
2286
2293
  end
2287
2294
 
2288
2295
  def deserialize(params)
2296
+ @InstanceId = params['InstanceId']
2297
+ unless params['AlertRule'].nil?
2298
+ @AlertRule = PrometheusAlertPolicyItem.new
2299
+ @AlertRule.deserialize(params['AlertRule'])
2300
+ end
2289
2301
  end
2290
2302
  end
2291
2303
 
2292
2304
  # CreatePrometheusAlertPolicy返回参数结构体
2293
2305
  class CreatePrometheusAlertPolicyResponse < TencentCloud::Common::AbstractModel
2306
+ # @param Id: 告警id
2307
+ # @type Id: String
2294
2308
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2295
2309
  # @type RequestId: String
2296
2310
 
2297
- attr_accessor :RequestId
2311
+ attr_accessor :Id, :RequestId
2298
2312
 
2299
- def initialize(requestid=nil)
2313
+ def initialize(id=nil, requestid=nil)
2314
+ @Id = id
2300
2315
  @RequestId = requestid
2301
2316
  end
2302
2317
 
2303
2318
  def deserialize(params)
2319
+ @Id = params['Id']
2304
2320
  @RequestId = params['RequestId']
2305
2321
  end
2306
2322
  end
@@ -2389,29 +2405,85 @@ module TencentCloud
2389
2405
  end
2390
2406
  end
2391
2407
 
2408
+ # CreatePrometheusGlobalNotification请求参数结构体
2409
+ class CreatePrometheusGlobalNotificationRequest < TencentCloud::Common::AbstractModel
2410
+ # @param InstanceId: 实例ID
2411
+ # @type InstanceId: String
2412
+ # @param Notification: 告警通知渠道
2413
+ # @type Notification: :class:`Tencentcloud::Tke.v20180525.models.PrometheusNotificationItem`
2414
+
2415
+ attr_accessor :InstanceId, :Notification
2416
+
2417
+ def initialize(instanceid=nil, notification=nil)
2418
+ @InstanceId = instanceid
2419
+ @Notification = notification
2420
+ end
2421
+
2422
+ def deserialize(params)
2423
+ @InstanceId = params['InstanceId']
2424
+ unless params['Notification'].nil?
2425
+ @Notification = PrometheusNotificationItem.new
2426
+ @Notification.deserialize(params['Notification'])
2427
+ end
2428
+ end
2429
+ end
2430
+
2431
+ # CreatePrometheusGlobalNotification返回参数结构体
2432
+ class CreatePrometheusGlobalNotificationResponse < TencentCloud::Common::AbstractModel
2433
+ # @param Id: 全局告警通知渠道ID
2434
+ # 注意:此字段可能返回 null,表示取不到有效值。
2435
+ # @type Id: String
2436
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2437
+ # @type RequestId: String
2438
+
2439
+ attr_accessor :Id, :RequestId
2440
+
2441
+ def initialize(id=nil, requestid=nil)
2442
+ @Id = id
2443
+ @RequestId = requestid
2444
+ end
2445
+
2446
+ def deserialize(params)
2447
+ @Id = params['Id']
2448
+ @RequestId = params['RequestId']
2449
+ end
2450
+ end
2451
+
2392
2452
  # CreatePrometheusTemp请求参数结构体
2393
2453
  class CreatePrometheusTempRequest < TencentCloud::Common::AbstractModel
2454
+ # @param Template: 模板设置
2455
+ # @type Template: :class:`Tencentcloud::Tke.v20180525.models.PrometheusTemp`
2394
2456
 
2457
+ attr_accessor :Template
2395
2458
 
2396
- def initialize()
2459
+ def initialize(template=nil)
2460
+ @Template = template
2397
2461
  end
2398
2462
 
2399
2463
  def deserialize(params)
2464
+ unless params['Template'].nil?
2465
+ @Template = PrometheusTemp.new
2466
+ @Template.deserialize(params['Template'])
2467
+ end
2400
2468
  end
2401
2469
  end
2402
2470
 
2403
2471
  # CreatePrometheusTemp返回参数结构体
2404
2472
  class CreatePrometheusTempResponse < TencentCloud::Common::AbstractModel
2473
+ # @param TemplateId: 模板Id
2474
+ # @type TemplateId: String
2405
2475
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2406
2476
  # @type RequestId: String
2407
2477
 
2408
- attr_accessor :RequestId
2478
+ attr_accessor :TemplateId, :RequestId
2409
2479
 
2410
- def initialize(requestid=nil)
2480
+ def initialize(templateid=nil, requestid=nil)
2481
+ @TemplateId = templateid
2411
2482
  @RequestId = requestid
2412
2483
  end
2413
2484
 
2414
2485
  def deserialize(params)
2486
+ @TemplateId = params['TemplateId']
2415
2487
  @RequestId = params['RequestId']
2416
2488
  end
2417
2489
  end
@@ -2981,12 +3053,25 @@ module TencentCloud
2981
3053
 
2982
3054
  # DeletePrometheusAlertPolicy请求参数结构体
2983
3055
  class DeletePrometheusAlertPolicyRequest < TencentCloud::Common::AbstractModel
3056
+ # @param InstanceId: 实例id
3057
+ # @type InstanceId: String
3058
+ # @param AlertIds: 告警策略id列表
3059
+ # @type AlertIds: Array
3060
+ # @param Names: 告警策略名称
3061
+ # @type Names: Array
2984
3062
 
3063
+ attr_accessor :InstanceId, :AlertIds, :Names
2985
3064
 
2986
- def initialize()
3065
+ def initialize(instanceid=nil, alertids=nil, names=nil)
3066
+ @InstanceId = instanceid
3067
+ @AlertIds = alertids
3068
+ @Names = names
2987
3069
  end
2988
3070
 
2989
3071
  def deserialize(params)
3072
+ @InstanceId = params['InstanceId']
3073
+ @AlertIds = params['AlertIds']
3074
+ @Names = params['Names']
2990
3075
  end
2991
3076
  end
2992
3077
 
@@ -3044,12 +3129,17 @@ module TencentCloud
3044
3129
 
3045
3130
  # DeletePrometheusTemp请求参数结构体
3046
3131
  class DeletePrometheusTempRequest < TencentCloud::Common::AbstractModel
3132
+ # @param TemplateId: 模板id
3133
+ # @type TemplateId: String
3047
3134
 
3135
+ attr_accessor :TemplateId
3048
3136
 
3049
- def initialize()
3137
+ def initialize(templateid=nil)
3138
+ @TemplateId = templateid
3050
3139
  end
3051
3140
 
3052
3141
  def deserialize(params)
3142
+ @TemplateId = params['TemplateId']
3053
3143
  end
3054
3144
  end
3055
3145
 
@@ -3071,12 +3161,28 @@ module TencentCloud
3071
3161
 
3072
3162
  # DeletePrometheusTempSync请求参数结构体
3073
3163
  class DeletePrometheusTempSyncRequest < TencentCloud::Common::AbstractModel
3164
+ # @param TemplateId: 模板id
3165
+ # @type TemplateId: String
3166
+ # @param Targets: 取消同步的对象列表
3167
+ # @type Targets: Array
3074
3168
 
3169
+ attr_accessor :TemplateId, :Targets
3075
3170
 
3076
- def initialize()
3171
+ def initialize(templateid=nil, targets=nil)
3172
+ @TemplateId = templateid
3173
+ @Targets = targets
3077
3174
  end
3078
3175
 
3079
3176
  def deserialize(params)
3177
+ @TemplateId = params['TemplateId']
3178
+ unless params['Targets'].nil?
3179
+ @Targets = []
3180
+ params['Targets'].each do |i|
3181
+ prometheustemplatesynctarget_tmp = PrometheusTemplateSyncTarget.new
3182
+ prometheustemplatesynctarget_tmp.deserialize(i)
3183
+ @Targets << prometheustemplatesynctarget_tmp
3184
+ end
3185
+ end
3080
3186
  end
3081
3187
  end
3082
3188
 
@@ -5058,27 +5164,68 @@ module TencentCloud
5058
5164
 
5059
5165
  # DescribePrometheusAlertPolicy请求参数结构体
5060
5166
  class DescribePrometheusAlertPolicyRequest < TencentCloud::Common::AbstractModel
5167
+ # @param InstanceId: 实例id
5168
+ # @type InstanceId: String
5169
+ # @param Offset: 分页
5170
+ # @type Offset: Integer
5171
+ # @param Limit: 分页
5172
+ # @type Limit: Integer
5173
+ # @param Filters: 过滤
5174
+ # 支持ID,Name
5175
+ # @type Filters: Array
5061
5176
 
5177
+ attr_accessor :InstanceId, :Offset, :Limit, :Filters
5062
5178
 
5063
- def initialize()
5179
+ def initialize(instanceid=nil, offset=nil, limit=nil, filters=nil)
5180
+ @InstanceId = instanceid
5181
+ @Offset = offset
5182
+ @Limit = limit
5183
+ @Filters = filters
5064
5184
  end
5065
5185
 
5066
5186
  def deserialize(params)
5187
+ @InstanceId = params['InstanceId']
5188
+ @Offset = params['Offset']
5189
+ @Limit = params['Limit']
5190
+ unless params['Filters'].nil?
5191
+ @Filters = []
5192
+ params['Filters'].each do |i|
5193
+ filter_tmp = Filter.new
5194
+ filter_tmp.deserialize(i)
5195
+ @Filters << filter_tmp
5196
+ end
5197
+ end
5067
5198
  end
5068
5199
  end
5069
5200
 
5070
5201
  # DescribePrometheusAlertPolicy返回参数结构体
5071
5202
  class DescribePrometheusAlertPolicyResponse < TencentCloud::Common::AbstractModel
5203
+ # @param AlertRules: 告警详情
5204
+ # 注意:此字段可能返回 null,表示取不到有效值。
5205
+ # @type AlertRules: Array
5206
+ # @param Total: 总数
5207
+ # @type Total: Integer
5072
5208
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
5073
5209
  # @type RequestId: String
5074
5210
 
5075
- attr_accessor :RequestId
5211
+ attr_accessor :AlertRules, :Total, :RequestId
5076
5212
 
5077
- def initialize(requestid=nil)
5213
+ def initialize(alertrules=nil, total=nil, requestid=nil)
5214
+ @AlertRules = alertrules
5215
+ @Total = total
5078
5216
  @RequestId = requestid
5079
5217
  end
5080
5218
 
5081
5219
  def deserialize(params)
5220
+ unless params['AlertRules'].nil?
5221
+ @AlertRules = []
5222
+ params['AlertRules'].each do |i|
5223
+ prometheusalertpolicyitem_tmp = PrometheusAlertPolicyItem.new
5224
+ prometheusalertpolicyitem_tmp.deserialize(i)
5225
+ @AlertRules << prometheusalertpolicyitem_tmp
5226
+ end
5227
+ end
5228
+ @Total = params['Total']
5082
5229
  @RequestId = params['RequestId']
5083
5230
  end
5084
5231
  end
@@ -5152,27 +5299,95 @@ module TencentCloud
5152
5299
 
5153
5300
  # DescribePrometheusClusterAgents请求参数结构体
5154
5301
  class DescribePrometheusClusterAgentsRequest < TencentCloud::Common::AbstractModel
5302
+ # @param InstanceId: 实例id
5303
+ # @type InstanceId: String
5304
+ # @param Offset: 用于分页
5305
+ # @type Offset: Integer
5306
+ # @param Limit: 用于分页
5307
+ # @type Limit: Integer
5155
5308
 
5309
+ attr_accessor :InstanceId, :Offset, :Limit
5156
5310
 
5157
- def initialize()
5311
+ def initialize(instanceid=nil, offset=nil, limit=nil)
5312
+ @InstanceId = instanceid
5313
+ @Offset = offset
5314
+ @Limit = limit
5158
5315
  end
5159
5316
 
5160
5317
  def deserialize(params)
5318
+ @InstanceId = params['InstanceId']
5319
+ @Offset = params['Offset']
5320
+ @Limit = params['Limit']
5161
5321
  end
5162
5322
  end
5163
5323
 
5164
5324
  # DescribePrometheusClusterAgents返回参数结构体
5165
5325
  class DescribePrometheusClusterAgentsResponse < TencentCloud::Common::AbstractModel
5326
+ # @param Agents: 被关联集群信息
5327
+ # @type Agents: Array
5328
+ # @param Total: 被关联集群总量
5329
+ # @type Total: Integer
5166
5330
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
5167
5331
  # @type RequestId: String
5168
5332
 
5169
- attr_accessor :RequestId
5333
+ attr_accessor :Agents, :Total, :RequestId
5170
5334
 
5171
- def initialize(requestid=nil)
5335
+ def initialize(agents=nil, total=nil, requestid=nil)
5336
+ @Agents = agents
5337
+ @Total = total
5338
+ @RequestId = requestid
5339
+ end
5340
+
5341
+ def deserialize(params)
5342
+ unless params['Agents'].nil?
5343
+ @Agents = []
5344
+ params['Agents'].each do |i|
5345
+ prometheusagentoverview_tmp = PrometheusAgentOverview.new
5346
+ prometheusagentoverview_tmp.deserialize(i)
5347
+ @Agents << prometheusagentoverview_tmp
5348
+ end
5349
+ end
5350
+ @Total = params['Total']
5351
+ @RequestId = params['RequestId']
5352
+ end
5353
+ end
5354
+
5355
+ # DescribePrometheusGlobalNotification请求参数结构体
5356
+ class DescribePrometheusGlobalNotificationRequest < TencentCloud::Common::AbstractModel
5357
+ # @param InstanceId: 实例ID
5358
+ # @type InstanceId: String
5359
+
5360
+ attr_accessor :InstanceId
5361
+
5362
+ def initialize(instanceid=nil)
5363
+ @InstanceId = instanceid
5364
+ end
5365
+
5366
+ def deserialize(params)
5367
+ @InstanceId = params['InstanceId']
5368
+ end
5369
+ end
5370
+
5371
+ # DescribePrometheusGlobalNotification返回参数结构体
5372
+ class DescribePrometheusGlobalNotificationResponse < TencentCloud::Common::AbstractModel
5373
+ # @param Notification: 全局告警通知渠道
5374
+ # 注意:此字段可能返回 null,表示取不到有效值。
5375
+ # @type Notification: :class:`Tencentcloud::Tke.v20180525.models.PrometheusNotificationItem`
5376
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
5377
+ # @type RequestId: String
5378
+
5379
+ attr_accessor :Notification, :RequestId
5380
+
5381
+ def initialize(notification=nil, requestid=nil)
5382
+ @Notification = notification
5172
5383
  @RequestId = requestid
5173
5384
  end
5174
5385
 
5175
5386
  def deserialize(params)
5387
+ unless params['Notification'].nil?
5388
+ @Notification = PrometheusNotificationItem.new
5389
+ @Notification.deserialize(params['Notification'])
5390
+ end
5176
5391
  @RequestId = params['RequestId']
5177
5392
  end
5178
5393
  end
@@ -5248,27 +5463,65 @@ module TencentCloud
5248
5463
 
5249
5464
  # DescribePrometheusInstancesOverview请求参数结构体
5250
5465
  class DescribePrometheusInstancesOverviewRequest < TencentCloud::Common::AbstractModel
5466
+ # @param Offset: 用于分页
5467
+ # @type Offset: Integer
5468
+ # @param Limit: 用于分页
5469
+ # @type Limit: Integer
5470
+ # @param Filters: 过滤实例,目前支持:
5471
+ # ID: 通过实例ID来过滤
5472
+ # Name: 通过实例名称来过滤
5473
+ # @type Filters: Array
5251
5474
 
5475
+ attr_accessor :Offset, :Limit, :Filters
5252
5476
 
5253
- def initialize()
5477
+ def initialize(offset=nil, limit=nil, filters=nil)
5478
+ @Offset = offset
5479
+ @Limit = limit
5480
+ @Filters = filters
5254
5481
  end
5255
5482
 
5256
5483
  def deserialize(params)
5484
+ @Offset = params['Offset']
5485
+ @Limit = params['Limit']
5486
+ unless params['Filters'].nil?
5487
+ @Filters = []
5488
+ params['Filters'].each do |i|
5489
+ filter_tmp = Filter.new
5490
+ filter_tmp.deserialize(i)
5491
+ @Filters << filter_tmp
5492
+ end
5493
+ end
5257
5494
  end
5258
5495
  end
5259
5496
 
5260
5497
  # DescribePrometheusInstancesOverview返回参数结构体
5261
5498
  class DescribePrometheusInstancesOverviewResponse < TencentCloud::Common::AbstractModel
5499
+ # @param Instances: 实例列表
5500
+ # @type Instances: Array
5501
+ # @param Total: 实例总数
5502
+ # 注意:此字段可能返回 null,表示取不到有效值。
5503
+ # @type Total: Integer
5262
5504
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
5263
5505
  # @type RequestId: String
5264
5506
 
5265
- attr_accessor :RequestId
5507
+ attr_accessor :Instances, :Total, :RequestId
5266
5508
 
5267
- def initialize(requestid=nil)
5509
+ def initialize(instances=nil, total=nil, requestid=nil)
5510
+ @Instances = instances
5511
+ @Total = total
5268
5512
  @RequestId = requestid
5269
5513
  end
5270
5514
 
5271
5515
  def deserialize(params)
5516
+ unless params['Instances'].nil?
5517
+ @Instances = []
5518
+ params['Instances'].each do |i|
5519
+ prometheusinstancesoverview_tmp = PrometheusInstancesOverview.new
5520
+ prometheusinstancesoverview_tmp.deserialize(i)
5521
+ @Instances << prometheusinstancesoverview_tmp
5522
+ end
5523
+ end
5524
+ @Total = params['Total']
5272
5525
  @RequestId = params['RequestId']
5273
5526
  end
5274
5527
  end
@@ -5340,27 +5593,66 @@ module TencentCloud
5340
5593
 
5341
5594
  # DescribePrometheusRecordRules请求参数结构体
5342
5595
  class DescribePrometheusRecordRulesRequest < TencentCloud::Common::AbstractModel
5343
-
5344
-
5345
- def initialize()
5596
+ # @param InstanceId: 实例id
5597
+ # @type InstanceId: String
5598
+ # @param Offset: 分页
5599
+ # @type Offset: Integer
5600
+ # @param Limit: 分页
5601
+ # @type Limit: Integer
5602
+ # @param Filters: 过滤
5603
+ # @type Filters: Array
5604
+
5605
+ attr_accessor :InstanceId, :Offset, :Limit, :Filters
5606
+
5607
+ def initialize(instanceid=nil, offset=nil, limit=nil, filters=nil)
5608
+ @InstanceId = instanceid
5609
+ @Offset = offset
5610
+ @Limit = limit
5611
+ @Filters = filters
5346
5612
  end
5347
5613
 
5348
5614
  def deserialize(params)
5615
+ @InstanceId = params['InstanceId']
5616
+ @Offset = params['Offset']
5617
+ @Limit = params['Limit']
5618
+ unless params['Filters'].nil?
5619
+ @Filters = []
5620
+ params['Filters'].each do |i|
5621
+ filter_tmp = Filter.new
5622
+ filter_tmp.deserialize(i)
5623
+ @Filters << filter_tmp
5624
+ end
5625
+ end
5349
5626
  end
5350
5627
  end
5351
5628
 
5352
5629
  # DescribePrometheusRecordRules返回参数结构体
5353
5630
  class DescribePrometheusRecordRulesResponse < TencentCloud::Common::AbstractModel
5631
+ # @param Records: 聚合规则
5632
+ # @type Records: Array
5633
+ # @param Total: 总数
5634
+ # @type Total: Integer
5354
5635
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
5355
5636
  # @type RequestId: String
5356
5637
 
5357
- attr_accessor :RequestId
5638
+ attr_accessor :Records, :Total, :RequestId
5358
5639
 
5359
- def initialize(requestid=nil)
5640
+ def initialize(records=nil, total=nil, requestid=nil)
5641
+ @Records = records
5642
+ @Total = total
5360
5643
  @RequestId = requestid
5361
5644
  end
5362
5645
 
5363
5646
  def deserialize(params)
5647
+ unless params['Records'].nil?
5648
+ @Records = []
5649
+ params['Records'].each do |i|
5650
+ prometheusrecordruleyamlitem_tmp = PrometheusRecordRuleYamlItem.new
5651
+ prometheusrecordruleyamlitem_tmp.deserialize(i)
5652
+ @Records << prometheusrecordruleyamlitem_tmp
5653
+ end
5654
+ end
5655
+ @Total = params['Total']
5364
5656
  @RequestId = params['RequestId']
5365
5657
  end
5366
5658
  end
@@ -5431,54 +5723,110 @@ module TencentCloud
5431
5723
 
5432
5724
  # DescribePrometheusTemp请求参数结构体
5433
5725
  class DescribePrometheusTempRequest < TencentCloud::Common::AbstractModel
5726
+ # @param Filters: 模糊过滤条件,支持
5727
+ # Level 按模板级别过滤
5728
+ # Name 按名称过滤
5729
+ # Describe 按描述过滤
5730
+ # ID 按templateId过滤
5731
+ # @type Filters: Array
5732
+ # @param Offset: 分页偏移
5733
+ # @type Offset: Integer
5734
+ # @param Limit: 总数限制
5735
+ # @type Limit: Integer
5434
5736
 
5737
+ attr_accessor :Filters, :Offset, :Limit
5435
5738
 
5436
- def initialize()
5739
+ def initialize(filters=nil, offset=nil, limit=nil)
5740
+ @Filters = filters
5741
+ @Offset = offset
5742
+ @Limit = limit
5437
5743
  end
5438
5744
 
5439
5745
  def deserialize(params)
5746
+ unless params['Filters'].nil?
5747
+ @Filters = []
5748
+ params['Filters'].each do |i|
5749
+ filter_tmp = Filter.new
5750
+ filter_tmp.deserialize(i)
5751
+ @Filters << filter_tmp
5752
+ end
5753
+ end
5754
+ @Offset = params['Offset']
5755
+ @Limit = params['Limit']
5440
5756
  end
5441
5757
  end
5442
5758
 
5443
5759
  # DescribePrometheusTemp返回参数结构体
5444
5760
  class DescribePrometheusTempResponse < TencentCloud::Common::AbstractModel
5761
+ # @param Templates: 模板列表
5762
+ # @type Templates: Array
5763
+ # @param Total: 总数
5764
+ # @type Total: Integer
5445
5765
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
5446
5766
  # @type RequestId: String
5447
5767
 
5448
- attr_accessor :RequestId
5768
+ attr_accessor :Templates, :Total, :RequestId
5449
5769
 
5450
- def initialize(requestid=nil)
5770
+ def initialize(templates=nil, total=nil, requestid=nil)
5771
+ @Templates = templates
5772
+ @Total = total
5451
5773
  @RequestId = requestid
5452
5774
  end
5453
5775
 
5454
5776
  def deserialize(params)
5777
+ unless params['Templates'].nil?
5778
+ @Templates = []
5779
+ params['Templates'].each do |i|
5780
+ prometheustemp_tmp = PrometheusTemp.new
5781
+ prometheustemp_tmp.deserialize(i)
5782
+ @Templates << prometheustemp_tmp
5783
+ end
5784
+ end
5785
+ @Total = params['Total']
5455
5786
  @RequestId = params['RequestId']
5456
5787
  end
5457
5788
  end
5458
5789
 
5459
5790
  # DescribePrometheusTempSync请求参数结构体
5460
5791
  class DescribePrometheusTempSyncRequest < TencentCloud::Common::AbstractModel
5792
+ # @param TemplateId: 模板ID
5793
+ # @type TemplateId: String
5461
5794
 
5795
+ attr_accessor :TemplateId
5462
5796
 
5463
- def initialize()
5797
+ def initialize(templateid=nil)
5798
+ @TemplateId = templateid
5464
5799
  end
5465
5800
 
5466
5801
  def deserialize(params)
5802
+ @TemplateId = params['TemplateId']
5467
5803
  end
5468
5804
  end
5469
5805
 
5470
5806
  # DescribePrometheusTempSync返回参数结构体
5471
5807
  class DescribePrometheusTempSyncResponse < TencentCloud::Common::AbstractModel
5808
+ # @param Targets: 同步目标详情
5809
+ # 注意:此字段可能返回 null,表示取不到有效值。
5810
+ # @type Targets: Array
5472
5811
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
5473
5812
  # @type RequestId: String
5474
5813
 
5475
- attr_accessor :RequestId
5814
+ attr_accessor :Targets, :RequestId
5476
5815
 
5477
- def initialize(requestid=nil)
5816
+ def initialize(targets=nil, requestid=nil)
5817
+ @Targets = targets
5478
5818
  @RequestId = requestid
5479
5819
  end
5480
5820
 
5481
5821
  def deserialize(params)
5822
+ unless params['Targets'].nil?
5823
+ @Targets = []
5824
+ params['Targets'].each do |i|
5825
+ prometheustemplatesynctarget_tmp = PrometheusTemplateSyncTarget.new
5826
+ prometheustemplatesynctarget_tmp.deserialize(i)
5827
+ @Targets << prometheustemplatesynctarget_tmp
5828
+ end
5829
+ end
5482
5830
  @RequestId = params['RequestId']
5483
5831
  end
5484
5832
  end
@@ -8219,12 +8567,24 @@ module TencentCloud
8219
8567
 
8220
8568
  # ModifyPrometheusAlertPolicy请求参数结构体
8221
8569
  class ModifyPrometheusAlertPolicyRequest < TencentCloud::Common::AbstractModel
8570
+ # @param InstanceId: 实例id
8571
+ # @type InstanceId: String
8572
+ # @param AlertRule: 告警配置
8573
+ # @type AlertRule: :class:`Tencentcloud::Tke.v20180525.models.PrometheusAlertPolicyItem`
8222
8574
 
8575
+ attr_accessor :InstanceId, :AlertRule
8223
8576
 
8224
- def initialize()
8577
+ def initialize(instanceid=nil, alertrule=nil)
8578
+ @InstanceId = instanceid
8579
+ @AlertRule = alertrule
8225
8580
  end
8226
8581
 
8227
8582
  def deserialize(params)
8583
+ @InstanceId = params['InstanceId']
8584
+ unless params['AlertRule'].nil?
8585
+ @AlertRule = PrometheusAlertPolicyItem.new
8586
+ @AlertRule.deserialize(params['AlertRule'])
8587
+ end
8228
8588
  end
8229
8589
  end
8230
8590
 
@@ -8283,14 +8643,65 @@ module TencentCloud
8283
8643
  end
8284
8644
  end
8285
8645
 
8646
+ # ModifyPrometheusGlobalNotification请求参数结构体
8647
+ class ModifyPrometheusGlobalNotificationRequest < TencentCloud::Common::AbstractModel
8648
+ # @param InstanceId: 实例ID
8649
+ # @type InstanceId: String
8650
+ # @param Notification: 告警通知渠道
8651
+ # @type Notification: :class:`Tencentcloud::Tke.v20180525.models.PrometheusNotificationItem`
8652
+
8653
+ attr_accessor :InstanceId, :Notification
8654
+
8655
+ def initialize(instanceid=nil, notification=nil)
8656
+ @InstanceId = instanceid
8657
+ @Notification = notification
8658
+ end
8659
+
8660
+ def deserialize(params)
8661
+ @InstanceId = params['InstanceId']
8662
+ unless params['Notification'].nil?
8663
+ @Notification = PrometheusNotificationItem.new
8664
+ @Notification.deserialize(params['Notification'])
8665
+ end
8666
+ end
8667
+ end
8668
+
8669
+ # ModifyPrometheusGlobalNotification返回参数结构体
8670
+ class ModifyPrometheusGlobalNotificationResponse < TencentCloud::Common::AbstractModel
8671
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
8672
+ # @type RequestId: String
8673
+
8674
+ attr_accessor :RequestId
8675
+
8676
+ def initialize(requestid=nil)
8677
+ @RequestId = requestid
8678
+ end
8679
+
8680
+ def deserialize(params)
8681
+ @RequestId = params['RequestId']
8682
+ end
8683
+ end
8684
+
8286
8685
  # ModifyPrometheusTemp请求参数结构体
8287
8686
  class ModifyPrometheusTempRequest < TencentCloud::Common::AbstractModel
8687
+ # @param TemplateId: 模板ID
8688
+ # @type TemplateId: String
8689
+ # @param Template: 修改内容
8690
+ # @type Template: :class:`Tencentcloud::Tke.v20180525.models.PrometheusTempModify`
8288
8691
 
8692
+ attr_accessor :TemplateId, :Template
8289
8693
 
8290
- def initialize()
8694
+ def initialize(templateid=nil, template=nil)
8695
+ @TemplateId = templateid
8696
+ @Template = template
8291
8697
  end
8292
8698
 
8293
8699
  def deserialize(params)
8700
+ @TemplateId = params['TemplateId']
8701
+ unless params['Template'].nil?
8702
+ @Template = PrometheusTempModify.new
8703
+ @Template.deserialize(params['Template'])
8704
+ end
8294
8705
  end
8295
8706
  end
8296
8707
 
@@ -8738,6 +9149,87 @@ module TencentCloud
8738
9149
  end
8739
9150
  end
8740
9151
 
9152
+ # 告警渠道使用自建alertmanager的配置
9153
+ class PrometheusAlertManagerConfig < TencentCloud::Common::AbstractModel
9154
+ # @param Url: alertmanager url
9155
+ # @type Url: String
9156
+ # @param ClusterType: alertmanager部署所在集群类型
9157
+ # 注意:此字段可能返回 null,表示取不到有效值。
9158
+ # @type ClusterType: String
9159
+ # @param ClusterId: alertmanager部署所在集群ID
9160
+ # 注意:此字段可能返回 null,表示取不到有效值。
9161
+ # @type ClusterId: String
9162
+
9163
+ attr_accessor :Url, :ClusterType, :ClusterId
9164
+
9165
+ def initialize(url=nil, clustertype=nil, clusterid=nil)
9166
+ @Url = url
9167
+ @ClusterType = clustertype
9168
+ @ClusterId = clusterid
9169
+ end
9170
+
9171
+ def deserialize(params)
9172
+ @Url = params['Url']
9173
+ @ClusterType = params['ClusterType']
9174
+ @ClusterId = params['ClusterId']
9175
+ end
9176
+ end
9177
+
9178
+ # 托管prometheus告警策略实例
9179
+ class PrometheusAlertPolicyItem < TencentCloud::Common::AbstractModel
9180
+ # @param Name: 策略名称
9181
+ # @type Name: String
9182
+ # @param Rules: 规则列表
9183
+ # @type Rules: Array
9184
+ # @param Id: 告警策略 id
9185
+ # 注意:此字段可能返回 null,表示取不到有效值。
9186
+ # @type Id: String
9187
+ # @param TemplateId: 如果该告警来自模板下发,则TemplateId为模板id
9188
+ # 注意:此字段可能返回 null,表示取不到有效值。
9189
+ # @type TemplateId: String
9190
+ # @param Notification: 告警渠道,模板中使用可能返回null
9191
+ # 注意:此字段可能返回 null,表示取不到有效值。
9192
+ # @type Notification: :class:`Tencentcloud::Tke.v20180525.models.PrometheusNotificationItem`
9193
+ # @param UpdatedAt: 最后修改时间
9194
+ # 注意:此字段可能返回 null,表示取不到有效值。
9195
+ # @type UpdatedAt: String
9196
+ # @param ClusterId: 如果告警策略来源于用户集群CRD资源定义,则ClusterId为所属集群ID
9197
+ # 注意:此字段可能返回 null,表示取不到有效值。
9198
+ # @type ClusterId: String
9199
+
9200
+ attr_accessor :Name, :Rules, :Id, :TemplateId, :Notification, :UpdatedAt, :ClusterId
9201
+
9202
+ def initialize(name=nil, rules=nil, id=nil, templateid=nil, notification=nil, updatedat=nil, clusterid=nil)
9203
+ @Name = name
9204
+ @Rules = rules
9205
+ @Id = id
9206
+ @TemplateId = templateid
9207
+ @Notification = notification
9208
+ @UpdatedAt = updatedat
9209
+ @ClusterId = clusterid
9210
+ end
9211
+
9212
+ def deserialize(params)
9213
+ @Name = params['Name']
9214
+ unless params['Rules'].nil?
9215
+ @Rules = []
9216
+ params['Rules'].each do |i|
9217
+ prometheusalertrule_tmp = PrometheusAlertRule.new
9218
+ prometheusalertrule_tmp.deserialize(i)
9219
+ @Rules << prometheusalertrule_tmp
9220
+ end
9221
+ end
9222
+ @Id = params['Id']
9223
+ @TemplateId = params['TemplateId']
9224
+ unless params['Notification'].nil?
9225
+ @Notification = PrometheusNotificationItem.new
9226
+ @Notification.deserialize(params['Notification'])
9227
+ end
9228
+ @UpdatedAt = params['UpdatedAt']
9229
+ @ClusterId = params['ClusterId']
9230
+ end
9231
+ end
9232
+
8741
9233
  # Prometheus告警规则
8742
9234
  class PrometheusAlertRule < TencentCloud::Common::AbstractModel
8743
9235
  # @param Name: 规则名称
@@ -8965,6 +9457,84 @@ module TencentCloud
8965
9457
  end
8966
9458
  end
8967
9459
 
9460
+ # 托管prometheusV2实例概览
9461
+ class PrometheusInstancesOverview < TencentCloud::Common::AbstractModel
9462
+ # @param InstanceId: 实例ID
9463
+ # @type InstanceId: String
9464
+ # @param InstanceName: 实例名
9465
+ # @type InstanceName: String
9466
+ # @param VpcId: VPC ID
9467
+ # @type VpcId: String
9468
+ # @param SubnetId: 子网ID
9469
+ # @type SubnetId: String
9470
+ # @param InstanceStatus: 运行状态(1:正在创建;2:运行中;3:异常;4:重启中;5:销毁中; 6:已停机; 7: 已删除)
9471
+ # @type InstanceStatus: Integer
9472
+ # @param ChargeStatus: 计费状态(1:正常;2:过期; 3:销毁; 4:分配中; 5:分配失败)
9473
+ # 注意:此字段可能返回 null,表示取不到有效值。
9474
+ # @type ChargeStatus: Integer
9475
+ # @param EnableGrafana: 是否开启 Grafana(0:不开启,1:开启)
9476
+ # @type EnableGrafana: Integer
9477
+ # @param GrafanaURL: Grafana 面板 URL
9478
+ # 注意:此字段可能返回 null,表示取不到有效值。
9479
+ # @type GrafanaURL: String
9480
+ # @param InstanceChargeType: 实例付费类型(1:试用版;2:预付费)
9481
+ # @type InstanceChargeType: Integer
9482
+ # @param SpecName: 规格名称
9483
+ # 注意:此字段可能返回 null,表示取不到有效值。
9484
+ # @type SpecName: String
9485
+ # @param DataRetentionTime: 存储周期
9486
+ # 注意:此字段可能返回 null,表示取不到有效值。
9487
+ # @type DataRetentionTime: Integer
9488
+ # @param ExpireTime: 购买的实例过期时间
9489
+ # 注意:此字段可能返回 null,表示取不到有效值。
9490
+ # @type ExpireTime: String
9491
+ # @param AutoRenewFlag: 自动续费标记(0:不自动续费;1:开启自动续费;2:禁止自动续费;-1:无效)
9492
+ # 注意:此字段可能返回 null,表示取不到有效值。
9493
+ # @type AutoRenewFlag: Integer
9494
+ # @param BoundTotal: 绑定集群总数
9495
+ # @type BoundTotal: Integer
9496
+ # @param BoundNormal: 绑定集群正常状态总数
9497
+ # @type BoundNormal: Integer
9498
+
9499
+ attr_accessor :InstanceId, :InstanceName, :VpcId, :SubnetId, :InstanceStatus, :ChargeStatus, :EnableGrafana, :GrafanaURL, :InstanceChargeType, :SpecName, :DataRetentionTime, :ExpireTime, :AutoRenewFlag, :BoundTotal, :BoundNormal
9500
+
9501
+ def initialize(instanceid=nil, instancename=nil, vpcid=nil, subnetid=nil, instancestatus=nil, chargestatus=nil, enablegrafana=nil, grafanaurl=nil, instancechargetype=nil, specname=nil, dataretentiontime=nil, expiretime=nil, autorenewflag=nil, boundtotal=nil, boundnormal=nil)
9502
+ @InstanceId = instanceid
9503
+ @InstanceName = instancename
9504
+ @VpcId = vpcid
9505
+ @SubnetId = subnetid
9506
+ @InstanceStatus = instancestatus
9507
+ @ChargeStatus = chargestatus
9508
+ @EnableGrafana = enablegrafana
9509
+ @GrafanaURL = grafanaurl
9510
+ @InstanceChargeType = instancechargetype
9511
+ @SpecName = specname
9512
+ @DataRetentionTime = dataretentiontime
9513
+ @ExpireTime = expiretime
9514
+ @AutoRenewFlag = autorenewflag
9515
+ @BoundTotal = boundtotal
9516
+ @BoundNormal = boundnormal
9517
+ end
9518
+
9519
+ def deserialize(params)
9520
+ @InstanceId = params['InstanceId']
9521
+ @InstanceName = params['InstanceName']
9522
+ @VpcId = params['VpcId']
9523
+ @SubnetId = params['SubnetId']
9524
+ @InstanceStatus = params['InstanceStatus']
9525
+ @ChargeStatus = params['ChargeStatus']
9526
+ @EnableGrafana = params['EnableGrafana']
9527
+ @GrafanaURL = params['GrafanaURL']
9528
+ @InstanceChargeType = params['InstanceChargeType']
9529
+ @SpecName = params['SpecName']
9530
+ @DataRetentionTime = params['DataRetentionTime']
9531
+ @ExpireTime = params['ExpireTime']
9532
+ @AutoRenewFlag = params['AutoRenewFlag']
9533
+ @BoundTotal = params['BoundTotal']
9534
+ @BoundNormal = params['BoundNormal']
9535
+ end
9536
+ end
9537
+
8968
9538
  # prometheus一个job的targets
8969
9539
  class PrometheusJobTargets < TencentCloud::Common::AbstractModel
8970
9540
  # @param Targets: 该Job的targets列表
@@ -9081,7 +9651,129 @@ module TencentCloud
9081
9651
  end
9082
9652
  end
9083
9653
 
9084
- # prometheus一个抓取目标的信息
9654
+ # 告警通知渠道配置
9655
+ class PrometheusNotificationItem < TencentCloud::Common::AbstractModel
9656
+ # @param Enabled: 是否启用
9657
+ # @type Enabled: Boolean
9658
+ # @param Type: 通道类型,默认为amp,支持以下
9659
+ # amp
9660
+ # webhook
9661
+ # alertmanager
9662
+ # @type Type: String
9663
+ # @param WebHook: 如果Type为webhook, 则该字段为必填项
9664
+ # 注意:此字段可能返回 null,表示取不到有效值。
9665
+ # @type WebHook: String
9666
+ # @param AlertManager: 如果Type为alertmanager, 则该字段为必填项
9667
+ # 注意:此字段可能返回 null,表示取不到有效值。
9668
+ # @type AlertManager: :class:`Tencentcloud::Tke.v20180525.models.PrometheusAlertManagerConfig`
9669
+ # @param RepeatInterval: 收敛时间
9670
+ # @type RepeatInterval: String
9671
+ # @param TimeRangeStart: 生效起始时间
9672
+ # @type TimeRangeStart: String
9673
+ # @param TimeRangeEnd: 生效结束时间
9674
+ # @type TimeRangeEnd: String
9675
+ # @param NotifyWay: 告警通知方式。目前有SMS、EMAIL、CALL、WECHAT方式。
9676
+ # 注意:此字段可能返回 null,表示取不到有效值。
9677
+ # @type NotifyWay: Array
9678
+ # @param ReceiverGroups: 告警接收组(用户组)
9679
+ # 注意:此字段可能返回 null,表示取不到有效值。
9680
+ # @type ReceiverGroups: Array
9681
+ # @param PhoneNotifyOrder: 电话告警顺序。
9682
+ # 注:NotifyWay选择CALL,采用该参数。
9683
+ # 注意:此字段可能返回 null,表示取不到有效值。
9684
+ # @type PhoneNotifyOrder: Array
9685
+ # @param PhoneCircleTimes: 电话告警次数。
9686
+ # 注:NotifyWay选择CALL,采用该参数。
9687
+ # 注意:此字段可能返回 null,表示取不到有效值。
9688
+ # @type PhoneCircleTimes: Integer
9689
+ # @param PhoneInnerInterval: 电话告警轮内间隔。单位:秒
9690
+ # 注:NotifyWay选择CALL,采用该参数。
9691
+ # 注意:此字段可能返回 null,表示取不到有效值。
9692
+ # @type PhoneInnerInterval: Integer
9693
+ # @param PhoneCircleInterval: 电话告警轮外间隔。单位:秒
9694
+ # 注:NotifyWay选择CALL,采用该参数。
9695
+ # 注意:此字段可能返回 null,表示取不到有效值。
9696
+ # @type PhoneCircleInterval: Integer
9697
+ # @param PhoneArriveNotice: 电话告警触达通知
9698
+ # 注:NotifyWay选择CALL,采用该参数。
9699
+ # 注意:此字段可能返回 null,表示取不到有效值。
9700
+ # @type PhoneArriveNotice: Boolean
9701
+
9702
+ attr_accessor :Enabled, :Type, :WebHook, :AlertManager, :RepeatInterval, :TimeRangeStart, :TimeRangeEnd, :NotifyWay, :ReceiverGroups, :PhoneNotifyOrder, :PhoneCircleTimes, :PhoneInnerInterval, :PhoneCircleInterval, :PhoneArriveNotice
9703
+
9704
+ def initialize(enabled=nil, type=nil, webhook=nil, alertmanager=nil, repeatinterval=nil, timerangestart=nil, timerangeend=nil, notifyway=nil, receivergroups=nil, phonenotifyorder=nil, phonecircletimes=nil, phoneinnerinterval=nil, phonecircleinterval=nil, phonearrivenotice=nil)
9705
+ @Enabled = enabled
9706
+ @Type = type
9707
+ @WebHook = webhook
9708
+ @AlertManager = alertmanager
9709
+ @RepeatInterval = repeatinterval
9710
+ @TimeRangeStart = timerangestart
9711
+ @TimeRangeEnd = timerangeend
9712
+ @NotifyWay = notifyway
9713
+ @ReceiverGroups = receivergroups
9714
+ @PhoneNotifyOrder = phonenotifyorder
9715
+ @PhoneCircleTimes = phonecircletimes
9716
+ @PhoneInnerInterval = phoneinnerinterval
9717
+ @PhoneCircleInterval = phonecircleinterval
9718
+ @PhoneArriveNotice = phonearrivenotice
9719
+ end
9720
+
9721
+ def deserialize(params)
9722
+ @Enabled = params['Enabled']
9723
+ @Type = params['Type']
9724
+ @WebHook = params['WebHook']
9725
+ unless params['AlertManager'].nil?
9726
+ @AlertManager = PrometheusAlertManagerConfig.new
9727
+ @AlertManager.deserialize(params['AlertManager'])
9728
+ end
9729
+ @RepeatInterval = params['RepeatInterval']
9730
+ @TimeRangeStart = params['TimeRangeStart']
9731
+ @TimeRangeEnd = params['TimeRangeEnd']
9732
+ @NotifyWay = params['NotifyWay']
9733
+ @ReceiverGroups = params['ReceiverGroups']
9734
+ @PhoneNotifyOrder = params['PhoneNotifyOrder']
9735
+ @PhoneCircleTimes = params['PhoneCircleTimes']
9736
+ @PhoneInnerInterval = params['PhoneInnerInterval']
9737
+ @PhoneCircleInterval = params['PhoneCircleInterval']
9738
+ @PhoneArriveNotice = params['PhoneArriveNotice']
9739
+ end
9740
+ end
9741
+
9742
+ # prometheus聚合规则实例详情,包含所属集群ID
9743
+ class PrometheusRecordRuleYamlItem < TencentCloud::Common::AbstractModel
9744
+ # @param Name: 实例名称
9745
+ # @type Name: String
9746
+ # @param UpdateTime: 最近更新时间
9747
+ # @type UpdateTime: String
9748
+ # @param TemplateId: Yaml内容
9749
+ # @type TemplateId: String
9750
+ # @param Content: 如果该聚合规则来至模板,则TemplateId为模板id
9751
+ # 注意:此字段可能返回 null,表示取不到有效值。
9752
+ # @type Content: String
9753
+ # @param ClusterId: 该聚合规则如果来源于用户集群crd资源定义,则ClusterId为所属集群ID
9754
+ # 注意:此字段可能返回 null,表示取不到有效值。
9755
+ # @type ClusterId: String
9756
+
9757
+ attr_accessor :Name, :UpdateTime, :TemplateId, :Content, :ClusterId
9758
+
9759
+ def initialize(name=nil, updatetime=nil, templateid=nil, content=nil, clusterid=nil)
9760
+ @Name = name
9761
+ @UpdateTime = updatetime
9762
+ @TemplateId = templateid
9763
+ @Content = content
9764
+ @ClusterId = clusterid
9765
+ end
9766
+
9767
+ def deserialize(params)
9768
+ @Name = params['Name']
9769
+ @UpdateTime = params['UpdateTime']
9770
+ @TemplateId = params['TemplateId']
9771
+ @Content = params['Content']
9772
+ @ClusterId = params['ClusterId']
9773
+ end
9774
+ end
9775
+
9776
+ # prometheus一个抓取目标的信息
9085
9777
  class PrometheusTarget < TencentCloud::Common::AbstractModel
9086
9778
  # @param Url: 抓取目标的URL
9087
9779
  # @type Url: String
@@ -9127,6 +9819,208 @@ module TencentCloud
9127
9819
  end
9128
9820
  end
9129
9821
 
9822
+ # 模板实例
9823
+ class PrometheusTemp < TencentCloud::Common::AbstractModel
9824
+ # @param Name: 模板名称
9825
+ # @type Name: String
9826
+ # @param Level: 模板维度,支持以下类型
9827
+ # instance 实例级别
9828
+ # cluster 集群级别
9829
+ # @type Level: String
9830
+ # @param Describe: 模板描述
9831
+ # 注意:此字段可能返回 null,表示取不到有效值。
9832
+ # @type Describe: String
9833
+ # @param RecordRules: 当Level为instance时有效,
9834
+ # 模板中的聚合规则列表
9835
+ # 注意:此字段可能返回 null,表示取不到有效值。
9836
+ # @type RecordRules: Array
9837
+ # @param ServiceMonitors: 当Level为cluster时有效,
9838
+ # 模板中的ServiceMonitor规则列表
9839
+ # 注意:此字段可能返回 null,表示取不到有效值。
9840
+ # @type ServiceMonitors: Array
9841
+ # @param PodMonitors: 当Level为cluster时有效,
9842
+ # 模板中的PodMonitors规则列表
9843
+ # 注意:此字段可能返回 null,表示取不到有效值。
9844
+ # @type PodMonitors: Array
9845
+ # @param RawJobs: 当Level为cluster时有效,
9846
+ # 模板中的RawJobs规则列表
9847
+ # 注意:此字段可能返回 null,表示取不到有效值。
9848
+ # @type RawJobs: Array
9849
+ # @param TemplateId: 模板的ID, 用于出参
9850
+ # 注意:此字段可能返回 null,表示取不到有效值。
9851
+ # @type TemplateId: String
9852
+ # @param UpdateTime: 最近更新时间,用于出参
9853
+ # 注意:此字段可能返回 null,表示取不到有效值。
9854
+ # @type UpdateTime: String
9855
+ # @param Version: 当前版本,用于出参
9856
+ # 注意:此字段可能返回 null,表示取不到有效值。
9857
+ # @type Version: String
9858
+ # @param IsDefault: 是否系统提供的默认模板,用于出参
9859
+ # 注意:此字段可能返回 null,表示取不到有效值。
9860
+ # @type IsDefault: Boolean
9861
+ # @param AlertDetailRules: 当Level为instance时有效,
9862
+ # 模板中的告警配置列表
9863
+ # 注意:此字段可能返回 null,表示取不到有效值。
9864
+ # @type AlertDetailRules: Array
9865
+ # @param TargetsTotal: 关联实例数目
9866
+ # 注意:此字段可能返回 null,表示取不到有效值。
9867
+ # @type TargetsTotal: Integer
9868
+
9869
+ attr_accessor :Name, :Level, :Describe, :RecordRules, :ServiceMonitors, :PodMonitors, :RawJobs, :TemplateId, :UpdateTime, :Version, :IsDefault, :AlertDetailRules, :TargetsTotal
9870
+
9871
+ def initialize(name=nil, level=nil, describe=nil, recordrules=nil, servicemonitors=nil, podmonitors=nil, rawjobs=nil, templateid=nil, updatetime=nil, version=nil, isdefault=nil, alertdetailrules=nil, targetstotal=nil)
9872
+ @Name = name
9873
+ @Level = level
9874
+ @Describe = describe
9875
+ @RecordRules = recordrules
9876
+ @ServiceMonitors = servicemonitors
9877
+ @PodMonitors = podmonitors
9878
+ @RawJobs = rawjobs
9879
+ @TemplateId = templateid
9880
+ @UpdateTime = updatetime
9881
+ @Version = version
9882
+ @IsDefault = isdefault
9883
+ @AlertDetailRules = alertdetailrules
9884
+ @TargetsTotal = targetstotal
9885
+ end
9886
+
9887
+ def deserialize(params)
9888
+ @Name = params['Name']
9889
+ @Level = params['Level']
9890
+ @Describe = params['Describe']
9891
+ unless params['RecordRules'].nil?
9892
+ @RecordRules = []
9893
+ params['RecordRules'].each do |i|
9894
+ prometheusconfigitem_tmp = PrometheusConfigItem.new
9895
+ prometheusconfigitem_tmp.deserialize(i)
9896
+ @RecordRules << prometheusconfigitem_tmp
9897
+ end
9898
+ end
9899
+ unless params['ServiceMonitors'].nil?
9900
+ @ServiceMonitors = []
9901
+ params['ServiceMonitors'].each do |i|
9902
+ prometheusconfigitem_tmp = PrometheusConfigItem.new
9903
+ prometheusconfigitem_tmp.deserialize(i)
9904
+ @ServiceMonitors << prometheusconfigitem_tmp
9905
+ end
9906
+ end
9907
+ unless params['PodMonitors'].nil?
9908
+ @PodMonitors = []
9909
+ params['PodMonitors'].each do |i|
9910
+ prometheusconfigitem_tmp = PrometheusConfigItem.new
9911
+ prometheusconfigitem_tmp.deserialize(i)
9912
+ @PodMonitors << prometheusconfigitem_tmp
9913
+ end
9914
+ end
9915
+ unless params['RawJobs'].nil?
9916
+ @RawJobs = []
9917
+ params['RawJobs'].each do |i|
9918
+ prometheusconfigitem_tmp = PrometheusConfigItem.new
9919
+ prometheusconfigitem_tmp.deserialize(i)
9920
+ @RawJobs << prometheusconfigitem_tmp
9921
+ end
9922
+ end
9923
+ @TemplateId = params['TemplateId']
9924
+ @UpdateTime = params['UpdateTime']
9925
+ @Version = params['Version']
9926
+ @IsDefault = params['IsDefault']
9927
+ unless params['AlertDetailRules'].nil?
9928
+ @AlertDetailRules = []
9929
+ params['AlertDetailRules'].each do |i|
9930
+ prometheusalertpolicyitem_tmp = PrometheusAlertPolicyItem.new
9931
+ prometheusalertpolicyitem_tmp.deserialize(i)
9932
+ @AlertDetailRules << prometheusalertpolicyitem_tmp
9933
+ end
9934
+ end
9935
+ @TargetsTotal = params['TargetsTotal']
9936
+ end
9937
+ end
9938
+
9939
+ # 云原生Prometheus模板可修改项
9940
+ class PrometheusTempModify < TencentCloud::Common::AbstractModel
9941
+ # @param Name: 修改名称
9942
+ # @type Name: String
9943
+ # @param Describe: 修改描述
9944
+ # 注意:此字段可能返回 null,表示取不到有效值。
9945
+ # @type Describe: String
9946
+ # @param ServiceMonitors: 当Level为cluster时有效,
9947
+ # 模板中的ServiceMonitor规则列表
9948
+ # 注意:此字段可能返回 null,表示取不到有效值。
9949
+ # @type ServiceMonitors: Array
9950
+ # @param PodMonitors: 当Level为cluster时有效,
9951
+ # 模板中的PodMonitors规则列表
9952
+ # 注意:此字段可能返回 null,表示取不到有效值。
9953
+ # @type PodMonitors: Array
9954
+ # @param RawJobs: 当Level为cluster时有效,
9955
+ # 模板中的RawJobs规则列表
9956
+ # 注意:此字段可能返回 null,表示取不到有效值。
9957
+ # @type RawJobs: Array
9958
+ # @param RecordRules: 当Level为instance时有效,
9959
+ # 模板中的聚合规则列表
9960
+ # 注意:此字段可能返回 null,表示取不到有效值。
9961
+ # @type RecordRules: Array
9962
+ # @param AlertDetailRules: 修改内容,只有当模板类型是Alert时生效
9963
+ # 注意:此字段可能返回 null,表示取不到有效值。
9964
+ # @type AlertDetailRules: Array
9965
+
9966
+ attr_accessor :Name, :Describe, :ServiceMonitors, :PodMonitors, :RawJobs, :RecordRules, :AlertDetailRules
9967
+
9968
+ def initialize(name=nil, describe=nil, servicemonitors=nil, podmonitors=nil, rawjobs=nil, recordrules=nil, alertdetailrules=nil)
9969
+ @Name = name
9970
+ @Describe = describe
9971
+ @ServiceMonitors = servicemonitors
9972
+ @PodMonitors = podmonitors
9973
+ @RawJobs = rawjobs
9974
+ @RecordRules = recordrules
9975
+ @AlertDetailRules = alertdetailrules
9976
+ end
9977
+
9978
+ def deserialize(params)
9979
+ @Name = params['Name']
9980
+ @Describe = params['Describe']
9981
+ unless params['ServiceMonitors'].nil?
9982
+ @ServiceMonitors = []
9983
+ params['ServiceMonitors'].each do |i|
9984
+ prometheusconfigitem_tmp = PrometheusConfigItem.new
9985
+ prometheusconfigitem_tmp.deserialize(i)
9986
+ @ServiceMonitors << prometheusconfigitem_tmp
9987
+ end
9988
+ end
9989
+ unless params['PodMonitors'].nil?
9990
+ @PodMonitors = []
9991
+ params['PodMonitors'].each do |i|
9992
+ prometheusconfigitem_tmp = PrometheusConfigItem.new
9993
+ prometheusconfigitem_tmp.deserialize(i)
9994
+ @PodMonitors << prometheusconfigitem_tmp
9995
+ end
9996
+ end
9997
+ unless params['RawJobs'].nil?
9998
+ @RawJobs = []
9999
+ params['RawJobs'].each do |i|
10000
+ prometheusconfigitem_tmp = PrometheusConfigItem.new
10001
+ prometheusconfigitem_tmp.deserialize(i)
10002
+ @RawJobs << prometheusconfigitem_tmp
10003
+ end
10004
+ end
10005
+ unless params['RecordRules'].nil?
10006
+ @RecordRules = []
10007
+ params['RecordRules'].each do |i|
10008
+ prometheusconfigitem_tmp = PrometheusConfigItem.new
10009
+ prometheusconfigitem_tmp.deserialize(i)
10010
+ @RecordRules << prometheusconfigitem_tmp
10011
+ end
10012
+ end
10013
+ unless params['AlertDetailRules'].nil?
10014
+ @AlertDetailRules = []
10015
+ params['AlertDetailRules'].each do |i|
10016
+ prometheusalertpolicyitem_tmp = PrometheusAlertPolicyItem.new
10017
+ prometheusalertpolicyitem_tmp.deserialize(i)
10018
+ @AlertDetailRules << prometheusalertpolicyitem_tmp
10019
+ end
10020
+ end
10021
+ end
10022
+ end
10023
+
9130
10024
  # 模板实例
9131
10025
  class PrometheusTemplate < TencentCloud::Common::AbstractModel
9132
10026
  # @param Name: 模板名称
@@ -9980,12 +10874,28 @@ module TencentCloud
9980
10874
 
9981
10875
  # SyncPrometheusTemp请求参数结构体
9982
10876
  class SyncPrometheusTempRequest < TencentCloud::Common::AbstractModel
10877
+ # @param TemplateId: 实例id
10878
+ # @type TemplateId: String
10879
+ # @param Targets: 同步目标
10880
+ # @type Targets: Array
9983
10881
 
10882
+ attr_accessor :TemplateId, :Targets
9984
10883
 
9985
- def initialize()
10884
+ def initialize(templateid=nil, targets=nil)
10885
+ @TemplateId = templateid
10886
+ @Targets = targets
9986
10887
  end
9987
10888
 
9988
10889
  def deserialize(params)
10890
+ @TemplateId = params['TemplateId']
10891
+ unless params['Targets'].nil?
10892
+ @Targets = []
10893
+ params['Targets'].each do |i|
10894
+ prometheustemplatesynctarget_tmp = PrometheusTemplateSyncTarget.new
10895
+ prometheustemplatesynctarget_tmp.deserialize(i)
10896
+ @Targets << prometheustemplatesynctarget_tmp
10897
+ end
10898
+ end
9989
10899
  end
9990
10900
  end
9991
10901