1// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package v20180724 16 17import ( 18 "encoding/json" 19 tcerr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" 20 tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" 21) 22 23type AlarmEvent struct { 24 25 // 事件名 26 EventName *string `json:"EventName,omitempty" name:"EventName"` 27 28 // 展示的事件名 29 Description *string `json:"Description,omitempty" name:"Description"` 30 31 // 告警策略类型 32 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 33} 34 35type AlarmHistory struct { 36 37 // 告警历史Id 38 AlarmId *string `json:"AlarmId,omitempty" name:"AlarmId"` 39 40 // 监控类型 41 MonitorType *string `json:"MonitorType,omitempty" name:"MonitorType"` 42 43 // 策略类型 44 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 45 46 // 告警对象 47 AlarmObject *string `json:"AlarmObject,omitempty" name:"AlarmObject"` 48 49 // 告警内容 50 Content *string `json:"Content,omitempty" name:"Content"` 51 52 // 时间戳,首次出现时间 53 FirstOccurTime *int64 `json:"FirstOccurTime,omitempty" name:"FirstOccurTime"` 54 55 // 时间戳,最后出现时间 56 LastOccurTime *int64 `json:"LastOccurTime,omitempty" name:"LastOccurTime"` 57 58 // 告警状态,ALARM=未恢复 OK=已恢复 NO_CONF=已失效 NO_DATA=数据不足 59 AlarmStatus *string `json:"AlarmStatus,omitempty" name:"AlarmStatus"` 60 61 // 告警策略 Id 62 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 63 64 // 策略名称 65 PolicyName *string `json:"PolicyName,omitempty" name:"PolicyName"` 66 67 // 基础产品告警的告警对象所属网络 68 VPC *string `json:"VPC,omitempty" name:"VPC"` 69 70 // 项目 Id 71 ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` 72 73 // 项目名字 74 ProjectName *string `json:"ProjectName,omitempty" name:"ProjectName"` 75 76 // 告警对象所属实例组 77 InstanceGroup []*InstanceGroups `json:"InstanceGroup,omitempty" name:"InstanceGroup"` 78 79 // 接收人列表 80 ReceiverUids []*int64 `json:"ReceiverUids,omitempty" name:"ReceiverUids"` 81 82 // 接收组列表 83 ReceiverGroups []*int64 `json:"ReceiverGroups,omitempty" name:"ReceiverGroups"` 84 85 // 告警渠道列表 SMS=短信 EMAIL=邮件 CALL=电话 WECHAT=微信 86 NoticeWays []*string `json:"NoticeWays,omitempty" name:"NoticeWays"` 87 88 // 可用于实例、实例组的绑定和解绑接口([BindingPolicyObject](https://cloud.tencent.com/document/product/248/40421)、[UnBindingAllPolicyObject](https://cloud.tencent.com/document/product/248/40568)、[UnBindingPolicyObject](https://cloud.tencent.com/document/product/248/40567))的策略 ID 89 OriginId *string `json:"OriginId,omitempty" name:"OriginId"` 90 91 // 告警类型 92 AlarmType *string `json:"AlarmType,omitempty" name:"AlarmType"` 93 94 // 事件Id 95 EventId *int64 `json:"EventId,omitempty" name:"EventId"` 96 97 // 地域 98 Region *string `json:"Region,omitempty" name:"Region"` 99 100 // 策略是否存在 0=不存在 1=存在 101 PolicyExists *int64 `json:"PolicyExists,omitempty" name:"PolicyExists"` 102 103 // 指标信息 104 // 注意:此字段可能返回 null,表示取不到有效值。 105 MetricsInfo []*AlarmHistoryMetric `json:"MetricsInfo,omitempty" name:"MetricsInfo"` 106 107 // 告警实例的维度信息 108 // 注意:此字段可能返回 null,表示取不到有效值。 109 Dimensions *string `json:"Dimensions,omitempty" name:"Dimensions"` 110} 111 112type AlarmHistoryMetric struct { 113 114 // 云产品监控类型查询数据使用的命名空间 115 QceNamespace *string `json:"QceNamespace,omitempty" name:"QceNamespace"` 116 117 // 指标名 118 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 119 120 // 统计周期 121 Period *int64 `json:"Period,omitempty" name:"Period"` 122 123 // 触发告警的数值 124 Value *string `json:"Value,omitempty" name:"Value"` 125 126 // 指标的展示名 127 Description *string `json:"Description,omitempty" name:"Description"` 128} 129 130type AlarmNotice struct { 131 132 // 告警通知模板 ID 133 // 注意:此字段可能返回 null,表示取不到有效值。 134 Id *string `json:"Id,omitempty" name:"Id"` 135 136 // 告警通知模板名称 137 // 注意:此字段可能返回 null,表示取不到有效值。 138 Name *string `json:"Name,omitempty" name:"Name"` 139 140 // 上次修改时间 141 // 注意:此字段可能返回 null,表示取不到有效值。 142 UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` 143 144 // 上次修改人 145 // 注意:此字段可能返回 null,表示取不到有效值。 146 UpdatedBy *string `json:"UpdatedBy,omitempty" name:"UpdatedBy"` 147 148 // 告警通知类型 ALARM=未恢复通知 OK=已恢复通知 ALL=全部通知 149 // 注意:此字段可能返回 null,表示取不到有效值。 150 NoticeType *string `json:"NoticeType,omitempty" name:"NoticeType"` 151 152 // 用户通知列表 153 // 注意:此字段可能返回 null,表示取不到有效值。 154 UserNotices []*UserNotice `json:"UserNotices,omitempty" name:"UserNotices"` 155 156 // 回调通知列表 157 // 注意:此字段可能返回 null,表示取不到有效值。 158 URLNotices []*URLNotice `json:"URLNotices,omitempty" name:"URLNotices"` 159 160 // 是否是系统预设通知模板 0=否 1=是 161 // 注意:此字段可能返回 null,表示取不到有效值。 162 IsPreset *int64 `json:"IsPreset,omitempty" name:"IsPreset"` 163 164 // 通知语言 zh-CN=中文 en-US=英文 165 // 注意:此字段可能返回 null,表示取不到有效值。 166 NoticeLanguage *string `json:"NoticeLanguage,omitempty" name:"NoticeLanguage"` 167 168 // 告警通知模板绑定的告警策略ID列表 169 // 注意:此字段可能返回 null,表示取不到有效值。 170 PolicyIds []*string `json:"PolicyIds,omitempty" name:"PolicyIds"` 171} 172 173type AlarmPolicy struct { 174 175 // 告警策略 ID 176 // 注意:此字段可能返回 null,表示取不到有效值。 177 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 178 179 // 告警策略名称 180 // 注意:此字段可能返回 null,表示取不到有效值。 181 PolicyName *string `json:"PolicyName,omitempty" name:"PolicyName"` 182 183 // 备注信息 184 // 注意:此字段可能返回 null,表示取不到有效值。 185 Remark *string `json:"Remark,omitempty" name:"Remark"` 186 187 // 监控类型 MT_QCE=云产品监控 188 // 注意:此字段可能返回 null,表示取不到有效值。 189 MonitorType *string `json:"MonitorType,omitempty" name:"MonitorType"` 190 191 // 启停状态 0=停用 1=启用 192 // 注意:此字段可能返回 null,表示取不到有效值。 193 Enable *int64 `json:"Enable,omitempty" name:"Enable"` 194 195 // 策略组绑定的实例数 196 // 注意:此字段可能返回 null,表示取不到有效值。 197 UseSum *int64 `json:"UseSum,omitempty" name:"UseSum"` 198 199 // 项目 Id -1=无项目 0=默认项目 200 // 注意:此字段可能返回 null,表示取不到有效值。 201 ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` 202 203 // 项目名 204 // 注意:此字段可能返回 null,表示取不到有效值。 205 ProjectName *string `json:"ProjectName,omitempty" name:"ProjectName"` 206 207 // 告警策略类型 208 // 注意:此字段可能返回 null,表示取不到有效值。 209 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 210 211 // 触发条件模板 Id 212 // 注意:此字段可能返回 null,表示取不到有效值。 213 ConditionTemplateId *string `json:"ConditionTemplateId,omitempty" name:"ConditionTemplateId"` 214 215 // 指标触发条件 216 // 注意:此字段可能返回 null,表示取不到有效值。 217 Condition *AlarmPolicyCondition `json:"Condition,omitempty" name:"Condition"` 218 219 // 事件触发条件 220 // 注意:此字段可能返回 null,表示取不到有效值。 221 EventCondition *AlarmPolicyEventCondition `json:"EventCondition,omitempty" name:"EventCondition"` 222 223 // 通知规则 id 列表 224 // 注意:此字段可能返回 null,表示取不到有效值。 225 NoticeIds []*string `json:"NoticeIds,omitempty" name:"NoticeIds"` 226 227 // 通知规则 列表 228 // 注意:此字段可能返回 null,表示取不到有效值。 229 Notices []*AlarmNotice `json:"Notices,omitempty" name:"Notices"` 230 231 // 触发任务列表 232 // 注意:此字段可能返回 null,表示取不到有效值。 233 TriggerTasks []*AlarmPolicyTriggerTask `json:"TriggerTasks,omitempty" name:"TriggerTasks"` 234 235 // 模板策略组 236 // 注意:此字段可能返回 null,表示取不到有效值。 237 // 注意:此字段可能返回 null,表示取不到有效值。 238 ConditionsTemp *ConditionsTemp `json:"ConditionsTemp,omitempty" name:"ConditionsTemp"` 239 240 // 最后编辑的用户uin 241 // 注意:此字段可能返回 null,表示取不到有效值。 242 LastEditUin *string `json:"LastEditUin,omitempty" name:"LastEditUin"` 243 244 // 更新时间 245 // 注意:此字段可能返回 null,表示取不到有效值。 246 // 注意:此字段可能返回 null,表示取不到有效值。 247 UpdateTime *int64 `json:"UpdateTime,omitempty" name:"UpdateTime"` 248 249 // 创建时间 250 // 注意:此字段可能返回 null,表示取不到有效值。 251 // 注意:此字段可能返回 null,表示取不到有效值。 252 InsertTime *int64 `json:"InsertTime,omitempty" name:"InsertTime"` 253 254 // 地域 255 // 注意:此字段可能返回 null,表示取不到有效值。 256 Region []*string `json:"Region,omitempty" name:"Region"` 257 258 // namespace显示名字 259 // 注意:此字段可能返回 null,表示取不到有效值。 260 NamespaceShowName *string `json:"NamespaceShowName,omitempty" name:"NamespaceShowName"` 261 262 // 是否默认策略,1是,0否 263 // 注意:此字段可能返回 null,表示取不到有效值。 264 IsDefault *int64 `json:"IsDefault,omitempty" name:"IsDefault"` 265 266 // 能否设置默认策略,1是,0否 267 // 注意:此字段可能返回 null,表示取不到有效值。 268 CanSetDefault *int64 `json:"CanSetDefault,omitempty" name:"CanSetDefault"` 269 270 // 实例分组ID 271 // 注意:此字段可能返回 null,表示取不到有效值。 272 InstanceGroupId *int64 `json:"InstanceGroupId,omitempty" name:"InstanceGroupId"` 273 274 // 实例分组总实例数 275 // 注意:此字段可能返回 null,表示取不到有效值。 276 InstanceSum *int64 `json:"InstanceSum,omitempty" name:"InstanceSum"` 277 278 // 实例分组名称 279 // 注意:此字段可能返回 null,表示取不到有效值。 280 InstanceGroupName *string `json:"InstanceGroupName,omitempty" name:"InstanceGroupName"` 281 282 // 触发条件类型 STATIC=静态阈值 DYNAMIC=动态类型 283 // 注意:此字段可能返回 null,表示取不到有效值。 284 RuleType *string `json:"RuleType,omitempty" name:"RuleType"` 285 286 // 用于实例、实例组绑定和解绑接口(BindingPolicyObject、UnBindingAllPolicyObject、UnBindingPolicyObject)的策略 ID 287 // 注意:此字段可能返回 null,表示取不到有效值。 288 OriginId *string `json:"OriginId,omitempty" name:"OriginId"` 289 290 // 标签 291 // 注意:此字段可能返回 null,表示取不到有效值。 292 TagInstances []*TagInstance `json:"TagInstances,omitempty" name:"TagInstances"` 293} 294 295type AlarmPolicyCondition struct { 296 297 // 指标触发与或条件,0=或,1=与 298 // 注意:此字段可能返回 null,表示取不到有效值。 299 IsUnionRule *int64 `json:"IsUnionRule,omitempty" name:"IsUnionRule"` 300 301 // 告警触发条件列表 302 // 注意:此字段可能返回 null,表示取不到有效值。 303 Rules []*AlarmPolicyRule `json:"Rules,omitempty" name:"Rules"` 304} 305 306type AlarmPolicyEventCondition struct { 307 308 // 告警触发条件列表 309 // 注意:此字段可能返回 null,表示取不到有效值。 310 Rules []*AlarmPolicyRule `json:"Rules,omitempty" name:"Rules"` 311} 312 313type AlarmPolicyFilter struct { 314 315 // 过滤条件类型 DIMENSION=使用 Dimensions 做过滤 316 // 注意:此字段可能返回 null,表示取不到有效值。 317 Type *string `json:"Type,omitempty" name:"Type"` 318 319 // AlarmPolicyDimension 二维数组序列化后的json字符串,一维数组之间互为或关系,一维数组内的元素互为与关系 320 // 注意:此字段可能返回 null,表示取不到有效值。 321 Dimensions *string `json:"Dimensions,omitempty" name:"Dimensions"` 322} 323 324type AlarmPolicyRule struct { 325 326 // 指标名或事件名,支持的指标可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询,支持的事件可以从 [DescribeAlarmEvents](https://cloud.tencent.com/document/product/248/51284) 查询 。 327 // 注意:此字段可能返回 null,表示取不到有效值。 328 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 329 330 // 秒数 统计周期,支持的值可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。 331 // 注意:此字段可能返回 null,表示取不到有效值。 332 Period *int64 `json:"Period,omitempty" name:"Period"` 333 334 // 英文运算符 335 // intelligent=无阈值智能检测 336 // eq=等于 337 // ge=大于等于 338 // gt=大于 339 // le=小于等于 340 // lt=小于 341 // ne=不等于 342 // day_increase=天同比增长 343 // day_decrease=天同比下降 344 // day_wave=天同比波动 345 // week_increase=周同比增长 346 // week_decrease=周同比下降 347 // week_wave=周同比波动 348 // cycle_increase=环比增长 349 // cycle_decrease=环比下降 350 // cycle_wave=环比波动 351 // re=正则匹配 352 // 支持的值可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。 353 // 注意:此字段可能返回 null,表示取不到有效值。 354 Operator *string `json:"Operator,omitempty" name:"Operator"` 355 356 // 阈值,支持的范围可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。 357 // 注意:此字段可能返回 null,表示取不到有效值。 358 Value *string `json:"Value,omitempty" name:"Value"` 359 360 // 周期数 持续通知周期 1=持续1个周期 2=持续2个周期...,支持的值可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询 361 // 注意:此字段可能返回 null,表示取不到有效值。 362 ContinuePeriod *int64 `json:"ContinuePeriod,omitempty" name:"ContinuePeriod"` 363 364 // 秒数 告警间隔 0=不重复 300=每5分钟告警一次 600=每10分钟告警一次 900=每15分钟告警一次 1800=每30分钟告警一次 3600=每1小时告警一次 7200=每2小时告警一次 10800=每3小时告警一次 21600=每6小时告警一次 43200=每12小时告警一次 86400=每1天告警一次 365 // 注意:此字段可能返回 null,表示取不到有效值。 366 NoticeFrequency *int64 `json:"NoticeFrequency,omitempty" name:"NoticeFrequency"` 367 368 // 告警频率是否指数增长 0=否 1=是 369 // 注意:此字段可能返回 null,表示取不到有效值。 370 IsPowerNotice *int64 `json:"IsPowerNotice,omitempty" name:"IsPowerNotice"` 371 372 // 对于单个触发规则的过滤条件 373 // 注意:此字段可能返回 null,表示取不到有效值。 374 Filter *AlarmPolicyFilter `json:"Filter,omitempty" name:"Filter"` 375 376 // 指标展示名,用于出参 377 // 注意:此字段可能返回 null,表示取不到有效值。 378 Description *string `json:"Description,omitempty" name:"Description"` 379 380 // 单位,用于出参 381 // 注意:此字段可能返回 null,表示取不到有效值。 382 Unit *string `json:"Unit,omitempty" name:"Unit"` 383 384 // 触发条件类型 STATIC=静态阈值 DYNAMIC=动态阈值。创建或编辑策略时,如不填则默认为 STATIC。 385 // 注意:此字段可能返回 null,表示取不到有效值。 386 RuleType *string `json:"RuleType,omitempty" name:"RuleType"` 387} 388 389type AlarmPolicyTriggerTask struct { 390 391 // 触发任务类型 AS=弹性伸缩 392 // 注意:此字段可能返回 null,表示取不到有效值。 393 Type *string `json:"Type,omitempty" name:"Type"` 394 395 // 用 json 表示配置信息 {"Key1":"Value1","Key2":"Value2"} 396 // 注意:此字段可能返回 null,表示取不到有效值。 397 TaskConfig *string `json:"TaskConfig,omitempty" name:"TaskConfig"` 398} 399 400type BindingPolicyObjectDimension struct { 401 402 // 地域名 403 Region *string `json:"Region,omitempty" name:"Region"` 404 405 // 地域ID 406 RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"` 407 408 // 实例的维度信息,格式为 409 // {"unInstanceId":"ins-00jvv9mo"}。不同云产品的维度信息不同,详见 410 // [指标维度信息Dimensions列表](https://cloud.tencent.com/document/product/248/50397) 411 Dimensions *string `json:"Dimensions,omitempty" name:"Dimensions"` 412 413 // 事件维度信息 414 EventDimensions *string `json:"EventDimensions,omitempty" name:"EventDimensions"` 415} 416 417type BindingPolicyObjectRequest struct { 418 *tchttp.BaseRequest 419 420 // 必填。固定值"monitor" 421 Module *string `json:"Module,omitempty" name:"Module"` 422 423 // 策略组id,如传入 PolicyId 则该字段会被忽略可传入任意值如 0 424 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 425 426 // 告警策略ID,使用此字段时 GroupId 会被忽略 427 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 428 429 // 实例分组ID 430 InstanceGroupId *int64 `json:"InstanceGroupId,omitempty" name:"InstanceGroupId"` 431 432 // 需要绑定的对象维度信息 433 Dimensions []*BindingPolicyObjectDimension `json:"Dimensions,omitempty" name:"Dimensions"` 434} 435 436func (r *BindingPolicyObjectRequest) ToJsonString() string { 437 b, _ := json.Marshal(r) 438 return string(b) 439} 440 441// FromJsonString It is highly **NOT** recommended to use this function 442// because it has no param check, nor strict type check 443func (r *BindingPolicyObjectRequest) FromJsonString(s string) error { 444 f := make(map[string]interface{}) 445 if err := json.Unmarshal([]byte(s), &f); err != nil { 446 return err 447 } 448 delete(f, "Module") 449 delete(f, "GroupId") 450 delete(f, "PolicyId") 451 delete(f, "InstanceGroupId") 452 delete(f, "Dimensions") 453 if len(f) > 0 { 454 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "BindingPolicyObjectRequest has unknown keys!", "") 455 } 456 return json.Unmarshal([]byte(s), &r) 457} 458 459type BindingPolicyObjectResponse struct { 460 *tchttp.BaseResponse 461 Response *struct { 462 463 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 464 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 465 } `json:"Response"` 466} 467 468func (r *BindingPolicyObjectResponse) ToJsonString() string { 469 b, _ := json.Marshal(r) 470 return string(b) 471} 472 473// FromJsonString It is highly **NOT** recommended to use this function 474// because it has no param check, nor strict type check 475func (r *BindingPolicyObjectResponse) FromJsonString(s string) error { 476 return json.Unmarshal([]byte(s), &r) 477} 478 479type CommonNamespace struct { 480 481 // 命名空间标示 482 Id *string `json:"Id,omitempty" name:"Id"` 483 484 // 命名空间名称 485 Name *string `json:"Name,omitempty" name:"Name"` 486 487 // 命名空间值 488 Value *string `json:"Value,omitempty" name:"Value"` 489 490 // 产品名称 491 ProductName *string `json:"ProductName,omitempty" name:"ProductName"` 492 493 // 配置信息 494 Config *string `json:"Config,omitempty" name:"Config"` 495 496 // 支持地域列表 497 AvailableRegions []*string `json:"AvailableRegions,omitempty" name:"AvailableRegions"` 498 499 // 排序Id 500 SortId *int64 `json:"SortId,omitempty" name:"SortId"` 501 502 // Dashboard中的唯一表示 503 DashboardId *string `json:"DashboardId,omitempty" name:"DashboardId"` 504} 505 506type ConditionsTemp struct { 507 508 // 模版名称 509 // 注意:此字段可能返回 null,表示取不到有效值。 510 TemplateName *string `json:"TemplateName,omitempty" name:"TemplateName"` 511 512 // 指标触发条件 513 // 注意:此字段可能返回 null,表示取不到有效值。 514 Condition *AlarmPolicyCondition `json:"Condition,omitempty" name:"Condition"` 515 516 // 事件触发条件 517 // 注意:此字段可能返回 null,表示取不到有效值。 518 EventCondition *AlarmPolicyEventCondition `json:"EventCondition,omitempty" name:"EventCondition"` 519} 520 521type CreateAlarmNoticeRequest struct { 522 *tchttp.BaseRequest 523 524 // 模块名,这里填“monitor” 525 Module *string `json:"Module,omitempty" name:"Module"` 526 527 // 通知模板名称 60字符以内 528 Name *string `json:"Name,omitempty" name:"Name"` 529 530 // 通知类型 ALARM=未恢复通知 OK=已恢复通知 ALL=都通知 531 NoticeType *string `json:"NoticeType,omitempty" name:"NoticeType"` 532 533 // 通知语言 zh-CN=中文 en-US=英文 534 NoticeLanguage *string `json:"NoticeLanguage,omitempty" name:"NoticeLanguage"` 535 536 // 用户通知 最多5个 537 UserNotices []*UserNotice `json:"UserNotices,omitempty" name:"UserNotices"` 538 539 // 回调通知 最多3个 540 URLNotices []*URLNotice `json:"URLNotices,omitempty" name:"URLNotices"` 541} 542 543func (r *CreateAlarmNoticeRequest) ToJsonString() string { 544 b, _ := json.Marshal(r) 545 return string(b) 546} 547 548// FromJsonString It is highly **NOT** recommended to use this function 549// because it has no param check, nor strict type check 550func (r *CreateAlarmNoticeRequest) FromJsonString(s string) error { 551 f := make(map[string]interface{}) 552 if err := json.Unmarshal([]byte(s), &f); err != nil { 553 return err 554 } 555 delete(f, "Module") 556 delete(f, "Name") 557 delete(f, "NoticeType") 558 delete(f, "NoticeLanguage") 559 delete(f, "UserNotices") 560 delete(f, "URLNotices") 561 if len(f) > 0 { 562 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAlarmNoticeRequest has unknown keys!", "") 563 } 564 return json.Unmarshal([]byte(s), &r) 565} 566 567type CreateAlarmNoticeResponse struct { 568 *tchttp.BaseResponse 569 Response *struct { 570 571 // 告警通知模板ID 572 NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` 573 574 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 575 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 576 } `json:"Response"` 577} 578 579func (r *CreateAlarmNoticeResponse) ToJsonString() string { 580 b, _ := json.Marshal(r) 581 return string(b) 582} 583 584// FromJsonString It is highly **NOT** recommended to use this function 585// because it has no param check, nor strict type check 586func (r *CreateAlarmNoticeResponse) FromJsonString(s string) error { 587 return json.Unmarshal([]byte(s), &r) 588} 589 590type CreateAlarmPolicyRequest struct { 591 *tchttp.BaseRequest 592 593 // 固定值,为"monitor" 594 Module *string `json:"Module,omitempty" name:"Module"` 595 596 // 策略名称,不超过20字符 597 PolicyName *string `json:"PolicyName,omitempty" name:"PolicyName"` 598 599 // 监控类型 MT_QCE=云产品监控 600 MonitorType *string `json:"MonitorType,omitempty" name:"MonitorType"` 601 602 // 告警策略类型,由 [DescribeAllNamespaces](https://cloud.tencent.com/document/product/248/48683) 获得,例如 cvm_device 603 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 604 605 // 备注,不超过100字符,仅支持中英文、数字、下划线、- 606 Remark *string `json:"Remark,omitempty" name:"Remark"` 607 608 // 是否启用 0=停用 1=启用,可不传 默认为1 609 Enable *int64 `json:"Enable,omitempty" name:"Enable"` 610 611 // 项目 Id,对于区分项目的产品必须传入非 -1 的值。 -1=无项目 0=默认项目,如不传 默认为 -1。支持的项目 Id 可以在控制台 [账号中心-项目管理](https://console.cloud.tencent.com/project) 中查看。 612 ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` 613 614 // 触发条件模板 Id ,可不传 615 ConditionTemplateId *int64 `json:"ConditionTemplateId,omitempty" name:"ConditionTemplateId"` 616 617 // 指标触发条件,支持的指标可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。 618 Condition *AlarmPolicyCondition `json:"Condition,omitempty" name:"Condition"` 619 620 // 事件触发条件,支持的事件可以从 [DescribeAlarmEvents](https://cloud.tencent.com/document/product/248/51284) 查询。 621 EventCondition *AlarmPolicyEventCondition `json:"EventCondition,omitempty" name:"EventCondition"` 622 623 // 通知规则 Id 列表,由 [DescribeAlarmNotices](https://cloud.tencent.com/document/product/248/51280) 获得 624 NoticeIds []*string `json:"NoticeIds,omitempty" name:"NoticeIds"` 625 626 // 触发任务列表 627 TriggerTasks []*AlarmPolicyTriggerTask `json:"TriggerTasks,omitempty" name:"TriggerTasks"` 628 629 // 全局过滤条件 630 Filter *AlarmPolicyFilter `json:"Filter,omitempty" name:"Filter"` 631 632 // 聚合维度列表,指定按哪些维度 key 来做 group by 633 GroupBy []*string `json:"GroupBy,omitempty" name:"GroupBy"` 634} 635 636func (r *CreateAlarmPolicyRequest) ToJsonString() string { 637 b, _ := json.Marshal(r) 638 return string(b) 639} 640 641// FromJsonString It is highly **NOT** recommended to use this function 642// because it has no param check, nor strict type check 643func (r *CreateAlarmPolicyRequest) FromJsonString(s string) error { 644 f := make(map[string]interface{}) 645 if err := json.Unmarshal([]byte(s), &f); err != nil { 646 return err 647 } 648 delete(f, "Module") 649 delete(f, "PolicyName") 650 delete(f, "MonitorType") 651 delete(f, "Namespace") 652 delete(f, "Remark") 653 delete(f, "Enable") 654 delete(f, "ProjectId") 655 delete(f, "ConditionTemplateId") 656 delete(f, "Condition") 657 delete(f, "EventCondition") 658 delete(f, "NoticeIds") 659 delete(f, "TriggerTasks") 660 delete(f, "Filter") 661 delete(f, "GroupBy") 662 if len(f) > 0 { 663 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAlarmPolicyRequest has unknown keys!", "") 664 } 665 return json.Unmarshal([]byte(s), &r) 666} 667 668type CreateAlarmPolicyResponse struct { 669 *tchttp.BaseResponse 670 Response *struct { 671 672 // 告警策略 ID 673 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 674 675 // 可用于实例、实例组的绑定和解绑接口([BindingPolicyObject](https://cloud.tencent.com/document/product/248/40421)、[UnBindingAllPolicyObject](https://cloud.tencent.com/document/product/248/40568)、[UnBindingPolicyObject](https://cloud.tencent.com/document/product/248/40567))的策略 ID 676 OriginId *string `json:"OriginId,omitempty" name:"OriginId"` 677 678 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 679 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 680 } `json:"Response"` 681} 682 683func (r *CreateAlarmPolicyResponse) ToJsonString() string { 684 b, _ := json.Marshal(r) 685 return string(b) 686} 687 688// FromJsonString It is highly **NOT** recommended to use this function 689// because it has no param check, nor strict type check 690func (r *CreateAlarmPolicyResponse) FromJsonString(s string) error { 691 return json.Unmarshal([]byte(s), &r) 692} 693 694type CreateAlertRuleRequest struct { 695 *tchttp.BaseRequest 696 697 // Prometheus 实例 ID 698 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 699 700 // 规则名称 701 RuleName *string `json:"RuleName,omitempty" name:"RuleName"` 702 703 // 规则表达式 704 Expr *string `json:"Expr,omitempty" name:"Expr"` 705 706 // 告警通知模板 ID 列表 707 Receivers []*string `json:"Receivers,omitempty" name:"Receivers"` 708 709 // 规则状态码,取值如下: 710 // <li>2=RuleEnabled</li> 711 // <li>3=RuleDisabled</li> 712 RuleState *int64 `json:"RuleState,omitempty" name:"RuleState"` 713 714 // 规则报警持续时间 715 Duration *string `json:"Duration,omitempty" name:"Duration"` 716 717 // 标签列表 718 Labels []*PrometheusRuleKV `json:"Labels,omitempty" name:"Labels"` 719 720 // 注释列表。 721 // 722 // 告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。 723 Annotations []*PrometheusRuleKV `json:"Annotations,omitempty" name:"Annotations"` 724 725 // 报警策略模板分类 726 Type *string `json:"Type,omitempty" name:"Type"` 727} 728 729func (r *CreateAlertRuleRequest) ToJsonString() string { 730 b, _ := json.Marshal(r) 731 return string(b) 732} 733 734// FromJsonString It is highly **NOT** recommended to use this function 735// because it has no param check, nor strict type check 736func (r *CreateAlertRuleRequest) FromJsonString(s string) error { 737 f := make(map[string]interface{}) 738 if err := json.Unmarshal([]byte(s), &f); err != nil { 739 return err 740 } 741 delete(f, "InstanceId") 742 delete(f, "RuleName") 743 delete(f, "Expr") 744 delete(f, "Receivers") 745 delete(f, "RuleState") 746 delete(f, "Duration") 747 delete(f, "Labels") 748 delete(f, "Annotations") 749 delete(f, "Type") 750 if len(f) > 0 { 751 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAlertRuleRequest has unknown keys!", "") 752 } 753 return json.Unmarshal([]byte(s), &r) 754} 755 756type CreateAlertRuleResponse struct { 757 *tchttp.BaseResponse 758 Response *struct { 759 760 // 规则 ID 761 // 注意:此字段可能返回 null,表示取不到有效值。 762 RuleId *string `json:"RuleId,omitempty" name:"RuleId"` 763 764 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 765 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 766 } `json:"Response"` 767} 768 769func (r *CreateAlertRuleResponse) ToJsonString() string { 770 b, _ := json.Marshal(r) 771 return string(b) 772} 773 774// FromJsonString It is highly **NOT** recommended to use this function 775// because it has no param check, nor strict type check 776func (r *CreateAlertRuleResponse) FromJsonString(s string) error { 777 return json.Unmarshal([]byte(s), &r) 778} 779 780type CreatePolicyGroupCondition struct { 781 782 // 指标Id 783 MetricId *int64 `json:"MetricId,omitempty" name:"MetricId"` 784 785 // 告警发送收敛类型。0连续告警,1指数告警 786 AlarmNotifyType *int64 `json:"AlarmNotifyType,omitempty" name:"AlarmNotifyType"` 787 788 // 告警发送周期单位秒。<0 不触发, 0 只触发一次, >0 每隔triggerTime秒触发一次 789 AlarmNotifyPeriod *int64 `json:"AlarmNotifyPeriod,omitempty" name:"AlarmNotifyPeriod"` 790 791 // 比较类型,1表示大于,2表示大于等于,3表示小于,4表示小于等于,5表示相等,6表示不相等。如果指标有配置默认比较类型值可以不填。 792 CalcType *int64 `json:"CalcType,omitempty" name:"CalcType"` 793 794 // 比较的值,如果指标不必须CalcValue可不填 795 CalcValue *float64 `json:"CalcValue,omitempty" name:"CalcValue"` 796 797 // 数据聚合周期(单位秒),若指标有默认值可不填 798 CalcPeriod *int64 `json:"CalcPeriod,omitempty" name:"CalcPeriod"` 799 800 // 持续几个检测周期触发规则会告警 801 ContinuePeriod *int64 `json:"ContinuePeriod,omitempty" name:"ContinuePeriod"` 802 803 // 如果通过模版创建,需要传入模版中该指标的对应RuleId 804 RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"` 805} 806 807type CreatePolicyGroupEventCondition struct { 808 809 // 告警事件的Id 810 EventId *int64 `json:"EventId,omitempty" name:"EventId"` 811 812 // 告警发送收敛类型。0连续告警,1指数告警 813 AlarmNotifyType *int64 `json:"AlarmNotifyType,omitempty" name:"AlarmNotifyType"` 814 815 // 告警发送周期单位秒。<0 不触发, 0 只触发一次, >0 每隔triggerTime秒触发一次 816 AlarmNotifyPeriod *int64 `json:"AlarmNotifyPeriod,omitempty" name:"AlarmNotifyPeriod"` 817 818 // 如果通过模版创建,需要传入模版中该指标的对应RuleId 819 RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"` 820} 821 822type CreatePolicyGroupRequest struct { 823 *tchttp.BaseRequest 824 825 // 组策略名称 826 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 827 828 // 固定值,为"monitor" 829 Module *string `json:"Module,omitempty" name:"Module"` 830 831 // 策略组所属视图的名称,若通过模版创建,可不传入 832 ViewName *string `json:"ViewName,omitempty" name:"ViewName"` 833 834 // 策略组所属项目Id,会进行鉴权操作 835 ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` 836 837 // 模版策略组Id, 通过模版创建时才需要传 838 ConditionTempGroupId *int64 `json:"ConditionTempGroupId,omitempty" name:"ConditionTempGroupId"` 839 840 // 是否屏蔽策略组,0表示不屏蔽,1表示屏蔽。不填默认为0 841 IsShielded *int64 `json:"IsShielded,omitempty" name:"IsShielded"` 842 843 // 策略组的备注信息 844 Remark *string `json:"Remark,omitempty" name:"Remark"` 845 846 // 插入时间,戳格式为Unix时间戳,不填则按后台处理时间填充 847 InsertTime *int64 `json:"InsertTime,omitempty" name:"InsertTime"` 848 849 // 策略组中的阈值告警规则 850 Conditions []*CreatePolicyGroupCondition `json:"Conditions,omitempty" name:"Conditions"` 851 852 // 策略组中的事件告警规则 853 EventConditions []*CreatePolicyGroupEventCondition `json:"EventConditions,omitempty" name:"EventConditions"` 854 855 // 是否为后端调用。当且仅当值为1时,后台拉取策略模版中的规则填充入Conditions以及EventConditions字段 856 BackEndCall *int64 `json:"BackEndCall,omitempty" name:"BackEndCall"` 857 858 // 指标告警规则的且或关系,0表示或规则(满足任意规则就告警),1表示且规则(满足所有规则才告警) 859 IsUnionRule *int64 `json:"IsUnionRule,omitempty" name:"IsUnionRule"` 860} 861 862func (r *CreatePolicyGroupRequest) ToJsonString() string { 863 b, _ := json.Marshal(r) 864 return string(b) 865} 866 867// FromJsonString It is highly **NOT** recommended to use this function 868// because it has no param check, nor strict type check 869func (r *CreatePolicyGroupRequest) FromJsonString(s string) error { 870 f := make(map[string]interface{}) 871 if err := json.Unmarshal([]byte(s), &f); err != nil { 872 return err 873 } 874 delete(f, "GroupName") 875 delete(f, "Module") 876 delete(f, "ViewName") 877 delete(f, "ProjectId") 878 delete(f, "ConditionTempGroupId") 879 delete(f, "IsShielded") 880 delete(f, "Remark") 881 delete(f, "InsertTime") 882 delete(f, "Conditions") 883 delete(f, "EventConditions") 884 delete(f, "BackEndCall") 885 delete(f, "IsUnionRule") 886 if len(f) > 0 { 887 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePolicyGroupRequest has unknown keys!", "") 888 } 889 return json.Unmarshal([]byte(s), &r) 890} 891 892type CreatePolicyGroupResponse struct { 893 *tchttp.BaseResponse 894 Response *struct { 895 896 // 创建成功的策略组Id 897 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 898 899 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 900 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 901 } `json:"Response"` 902} 903 904func (r *CreatePolicyGroupResponse) ToJsonString() string { 905 b, _ := json.Marshal(r) 906 return string(b) 907} 908 909// FromJsonString It is highly **NOT** recommended to use this function 910// because it has no param check, nor strict type check 911func (r *CreatePolicyGroupResponse) FromJsonString(s string) error { 912 return json.Unmarshal([]byte(s), &r) 913} 914 915type CreateServiceDiscoveryRequest struct { 916 *tchttp.BaseRequest 917 918 // Prometheus 实例 ID 919 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 920 921 // <li>类型为TKE:对应集成的腾讯云容器服务集群 ID</li> 922 KubeClusterId *string `json:"KubeClusterId,omitempty" name:"KubeClusterId"` 923 924 // 用户 Kubernetes 集群类型: 925 // <li> 1 = 容器服务集群(TKE) </li> 926 KubeType *int64 `json:"KubeType,omitempty" name:"KubeType"` 927 928 // 服务发现类型,取值如下: 929 // <li> 1 = ServiceMonitor</li> 930 // <li> 2 = PodMonitor</li> 931 // <li> 3 = JobMonitor</li> 932 Type *int64 `json:"Type,omitempty" name:"Type"` 933 934 // 服务发现配置信息 935 Yaml *string `json:"Yaml,omitempty" name:"Yaml"` 936} 937 938func (r *CreateServiceDiscoveryRequest) ToJsonString() string { 939 b, _ := json.Marshal(r) 940 return string(b) 941} 942 943// FromJsonString It is highly **NOT** recommended to use this function 944// because it has no param check, nor strict type check 945func (r *CreateServiceDiscoveryRequest) FromJsonString(s string) error { 946 f := make(map[string]interface{}) 947 if err := json.Unmarshal([]byte(s), &f); err != nil { 948 return err 949 } 950 delete(f, "InstanceId") 951 delete(f, "KubeClusterId") 952 delete(f, "KubeType") 953 delete(f, "Type") 954 delete(f, "Yaml") 955 if len(f) > 0 { 956 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateServiceDiscoveryRequest has unknown keys!", "") 957 } 958 return json.Unmarshal([]byte(s), &r) 959} 960 961type CreateServiceDiscoveryResponse struct { 962 *tchttp.BaseResponse 963 Response *struct { 964 965 // 创建成功之后,返回对应服务发现信息 966 ServiceDiscovery *ServiceDiscoveryItem `json:"ServiceDiscovery,omitempty" name:"ServiceDiscovery"` 967 968 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 969 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 970 } `json:"Response"` 971} 972 973func (r *CreateServiceDiscoveryResponse) ToJsonString() string { 974 b, _ := json.Marshal(r) 975 return string(b) 976} 977 978// FromJsonString It is highly **NOT** recommended to use this function 979// because it has no param check, nor strict type check 980func (r *CreateServiceDiscoveryResponse) FromJsonString(s string) error { 981 return json.Unmarshal([]byte(s), &r) 982} 983 984type DataPoint struct { 985 986 // 实例对象维度组合 987 Dimensions []*Dimension `json:"Dimensions,omitempty" name:"Dimensions"` 988 989 // 时间戳数组,表示那些时间点有数据,缺失的时间戳,没有数据点,可以理解为掉点了 990 Timestamps []*float64 `json:"Timestamps,omitempty" name:"Timestamps"` 991 992 // 监控值数组,该数组和Timestamps一一对应 993 Values []*float64 `json:"Values,omitempty" name:"Values"` 994} 995 996type DeleteAlarmNoticesRequest struct { 997 *tchttp.BaseRequest 998 999 // 模块名,这里填“monitor” 1000 Module *string `json:"Module,omitempty" name:"Module"` 1001 1002 // 告警通知模板id列表 1003 NoticeIds []*string `json:"NoticeIds,omitempty" name:"NoticeIds"` 1004} 1005 1006func (r *DeleteAlarmNoticesRequest) ToJsonString() string { 1007 b, _ := json.Marshal(r) 1008 return string(b) 1009} 1010 1011// FromJsonString It is highly **NOT** recommended to use this function 1012// because it has no param check, nor strict type check 1013func (r *DeleteAlarmNoticesRequest) FromJsonString(s string) error { 1014 f := make(map[string]interface{}) 1015 if err := json.Unmarshal([]byte(s), &f); err != nil { 1016 return err 1017 } 1018 delete(f, "Module") 1019 delete(f, "NoticeIds") 1020 if len(f) > 0 { 1021 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAlarmNoticesRequest has unknown keys!", "") 1022 } 1023 return json.Unmarshal([]byte(s), &r) 1024} 1025 1026type DeleteAlarmNoticesResponse struct { 1027 *tchttp.BaseResponse 1028 Response *struct { 1029 1030 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1031 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1032 } `json:"Response"` 1033} 1034 1035func (r *DeleteAlarmNoticesResponse) ToJsonString() string { 1036 b, _ := json.Marshal(r) 1037 return string(b) 1038} 1039 1040// FromJsonString It is highly **NOT** recommended to use this function 1041// because it has no param check, nor strict type check 1042func (r *DeleteAlarmNoticesResponse) FromJsonString(s string) error { 1043 return json.Unmarshal([]byte(s), &r) 1044} 1045 1046type DeleteAlarmPolicyRequest struct { 1047 *tchttp.BaseRequest 1048 1049 // 模块名,固定值 monitor 1050 Module *string `json:"Module,omitempty" name:"Module"` 1051 1052 // 告警策略 ID 列表 1053 PolicyIds []*string `json:"PolicyIds,omitempty" name:"PolicyIds"` 1054} 1055 1056func (r *DeleteAlarmPolicyRequest) ToJsonString() string { 1057 b, _ := json.Marshal(r) 1058 return string(b) 1059} 1060 1061// FromJsonString It is highly **NOT** recommended to use this function 1062// because it has no param check, nor strict type check 1063func (r *DeleteAlarmPolicyRequest) FromJsonString(s string) error { 1064 f := make(map[string]interface{}) 1065 if err := json.Unmarshal([]byte(s), &f); err != nil { 1066 return err 1067 } 1068 delete(f, "Module") 1069 delete(f, "PolicyIds") 1070 if len(f) > 0 { 1071 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAlarmPolicyRequest has unknown keys!", "") 1072 } 1073 return json.Unmarshal([]byte(s), &r) 1074} 1075 1076type DeleteAlarmPolicyResponse struct { 1077 *tchttp.BaseResponse 1078 Response *struct { 1079 1080 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1081 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1082 } `json:"Response"` 1083} 1084 1085func (r *DeleteAlarmPolicyResponse) ToJsonString() string { 1086 b, _ := json.Marshal(r) 1087 return string(b) 1088} 1089 1090// FromJsonString It is highly **NOT** recommended to use this function 1091// because it has no param check, nor strict type check 1092func (r *DeleteAlarmPolicyResponse) FromJsonString(s string) error { 1093 return json.Unmarshal([]byte(s), &r) 1094} 1095 1096type DeleteAlertRulesRequest struct { 1097 *tchttp.BaseRequest 1098 1099 // 规则 ID 列表 1100 RuleIds []*string `json:"RuleIds,omitempty" name:"RuleIds"` 1101 1102 // Prometheus 实例 ID 1103 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 1104} 1105 1106func (r *DeleteAlertRulesRequest) ToJsonString() string { 1107 b, _ := json.Marshal(r) 1108 return string(b) 1109} 1110 1111// FromJsonString It is highly **NOT** recommended to use this function 1112// because it has no param check, nor strict type check 1113func (r *DeleteAlertRulesRequest) FromJsonString(s string) error { 1114 f := make(map[string]interface{}) 1115 if err := json.Unmarshal([]byte(s), &f); err != nil { 1116 return err 1117 } 1118 delete(f, "RuleIds") 1119 delete(f, "InstanceId") 1120 if len(f) > 0 { 1121 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAlertRulesRequest has unknown keys!", "") 1122 } 1123 return json.Unmarshal([]byte(s), &r) 1124} 1125 1126type DeleteAlertRulesResponse struct { 1127 *tchttp.BaseResponse 1128 Response *struct { 1129 1130 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1131 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1132 } `json:"Response"` 1133} 1134 1135func (r *DeleteAlertRulesResponse) ToJsonString() string { 1136 b, _ := json.Marshal(r) 1137 return string(b) 1138} 1139 1140// FromJsonString It is highly **NOT** recommended to use this function 1141// because it has no param check, nor strict type check 1142func (r *DeleteAlertRulesResponse) FromJsonString(s string) error { 1143 return json.Unmarshal([]byte(s), &r) 1144} 1145 1146type DeletePolicyGroupRequest struct { 1147 *tchttp.BaseRequest 1148 1149 // 固定值,为"monitor" 1150 Module *string `json:"Module,omitempty" name:"Module"` 1151 1152 // 策略组id 1153 GroupId []*int64 `json:"GroupId,omitempty" name:"GroupId"` 1154} 1155 1156func (r *DeletePolicyGroupRequest) ToJsonString() string { 1157 b, _ := json.Marshal(r) 1158 return string(b) 1159} 1160 1161// FromJsonString It is highly **NOT** recommended to use this function 1162// because it has no param check, nor strict type check 1163func (r *DeletePolicyGroupRequest) FromJsonString(s string) error { 1164 f := make(map[string]interface{}) 1165 if err := json.Unmarshal([]byte(s), &f); err != nil { 1166 return err 1167 } 1168 delete(f, "Module") 1169 delete(f, "GroupId") 1170 if len(f) > 0 { 1171 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePolicyGroupRequest has unknown keys!", "") 1172 } 1173 return json.Unmarshal([]byte(s), &r) 1174} 1175 1176type DeletePolicyGroupResponse struct { 1177 *tchttp.BaseResponse 1178 Response *struct { 1179 1180 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1181 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1182 } `json:"Response"` 1183} 1184 1185func (r *DeletePolicyGroupResponse) ToJsonString() string { 1186 b, _ := json.Marshal(r) 1187 return string(b) 1188} 1189 1190// FromJsonString It is highly **NOT** recommended to use this function 1191// because it has no param check, nor strict type check 1192func (r *DeletePolicyGroupResponse) FromJsonString(s string) error { 1193 return json.Unmarshal([]byte(s), &r) 1194} 1195 1196type DeleteServiceDiscoveryRequest struct { 1197 *tchttp.BaseRequest 1198 1199 // Prometheus 实例 ID 1200 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 1201 1202 // <li>类型是 TKE,为对应的腾讯云容器服务集群 ID</li> 1203 KubeClusterId *string `json:"KubeClusterId,omitempty" name:"KubeClusterId"` 1204 1205 // 用户 Kubernetes 集群类型: 1206 // <li> 1 = 容器服务集群(TKE) </li> 1207 KubeType *int64 `json:"KubeType,omitempty" name:"KubeType"` 1208 1209 // 服务发现类型,取值如下: 1210 // <li> 1 = ServiceMonitor</li> 1211 // <li> 2 = PodMonitor</li> 1212 // <li> 3 = PodMonitor</li> 1213 Type *int64 `json:"Type,omitempty" name:"Type"` 1214 1215 // 服务发现配置信息 1216 Yaml *string `json:"Yaml,omitempty" name:"Yaml"` 1217} 1218 1219func (r *DeleteServiceDiscoveryRequest) ToJsonString() string { 1220 b, _ := json.Marshal(r) 1221 return string(b) 1222} 1223 1224// FromJsonString It is highly **NOT** recommended to use this function 1225// because it has no param check, nor strict type check 1226func (r *DeleteServiceDiscoveryRequest) FromJsonString(s string) error { 1227 f := make(map[string]interface{}) 1228 if err := json.Unmarshal([]byte(s), &f); err != nil { 1229 return err 1230 } 1231 delete(f, "InstanceId") 1232 delete(f, "KubeClusterId") 1233 delete(f, "KubeType") 1234 delete(f, "Type") 1235 delete(f, "Yaml") 1236 if len(f) > 0 { 1237 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteServiceDiscoveryRequest has unknown keys!", "") 1238 } 1239 return json.Unmarshal([]byte(s), &r) 1240} 1241 1242type DeleteServiceDiscoveryResponse struct { 1243 *tchttp.BaseResponse 1244 Response *struct { 1245 1246 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1247 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1248 } `json:"Response"` 1249} 1250 1251func (r *DeleteServiceDiscoveryResponse) ToJsonString() string { 1252 b, _ := json.Marshal(r) 1253 return string(b) 1254} 1255 1256// FromJsonString It is highly **NOT** recommended to use this function 1257// because it has no param check, nor strict type check 1258func (r *DeleteServiceDiscoveryResponse) FromJsonString(s string) error { 1259 return json.Unmarshal([]byte(s), &r) 1260} 1261 1262type DescribeAccidentEventListAlarms struct { 1263 1264 // 事件分类 1265 // 注意:此字段可能返回 null,表示取不到有效值。 1266 BusinessTypeDesc *string `json:"BusinessTypeDesc,omitempty" name:"BusinessTypeDesc"` 1267 1268 // 事件类型 1269 // 注意:此字段可能返回 null,表示取不到有效值。 1270 AccidentTypeDesc *string `json:"AccidentTypeDesc,omitempty" name:"AccidentTypeDesc"` 1271 1272 // 事件分类的ID,1表示服务问题,2表示其他订阅 1273 // 注意:此字段可能返回 null,表示取不到有效值。 1274 BusinessID *int64 `json:"BusinessID,omitempty" name:"BusinessID"` 1275 1276 // 事件状态的ID,0表示已恢复,1表示未恢复 1277 // 注意:此字段可能返回 null,表示取不到有效值。 1278 EventStatus *int64 `json:"EventStatus,omitempty" name:"EventStatus"` 1279 1280 // 影响的对象 1281 // 注意:此字段可能返回 null,表示取不到有效值。 1282 AffectResource *string `json:"AffectResource,omitempty" name:"AffectResource"` 1283 1284 // 事件的地域 1285 // 注意:此字段可能返回 null,表示取不到有效值。 1286 Region *string `json:"Region,omitempty" name:"Region"` 1287 1288 // 事件发生的时间 1289 // 注意:此字段可能返回 null,表示取不到有效值。 1290 OccurTime *string `json:"OccurTime,omitempty" name:"OccurTime"` 1291 1292 // 更新时间 1293 // 注意:此字段可能返回 null,表示取不到有效值。 1294 UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` 1295} 1296 1297type DescribeAccidentEventListRequest struct { 1298 *tchttp.BaseRequest 1299 1300 // 接口模块名,当前接口取值monitor 1301 Module *string `json:"Module,omitempty" name:"Module"` 1302 1303 // 起始时间,默认一天前的时间戳 1304 StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"` 1305 1306 // 结束时间,默认当前时间戳 1307 EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"` 1308 1309 // 分页参数,每页返回的数量,取值1~100,默认20 1310 Limit *int64 `json:"Limit,omitempty" name:"Limit"` 1311 1312 // 分页参数,页偏移量,从0开始计数,默认0 1313 Offset *int64 `json:"Offset,omitempty" name:"Offset"` 1314 1315 // 根据UpdateTime排序的规则,取值asc或desc 1316 UpdateTimeOrder *string `json:"UpdateTimeOrder,omitempty" name:"UpdateTimeOrder"` 1317 1318 // 根据OccurTime排序的规则,取值asc或desc(优先根据UpdateTimeOrder排序) 1319 OccurTimeOrder *string `json:"OccurTimeOrder,omitempty" name:"OccurTimeOrder"` 1320 1321 // 根据事件类型过滤,1表示服务问题,2表示其他订阅 1322 AccidentType []*int64 `json:"AccidentType,omitempty" name:"AccidentType"` 1323 1324 // 根据事件过滤,1表示云服务器存储问题,2表示云服务器网络连接问题,3表示云服务器运行异常,202表示运营商网络抖动 1325 AccidentEvent []*int64 `json:"AccidentEvent,omitempty" name:"AccidentEvent"` 1326 1327 // 根据事件状态过滤,0表示已恢复,1表示未恢复 1328 AccidentStatus []*int64 `json:"AccidentStatus,omitempty" name:"AccidentStatus"` 1329 1330 // 根据事件地域过滤,gz表示广州,sh表示上海等 1331 AccidentRegion []*string `json:"AccidentRegion,omitempty" name:"AccidentRegion"` 1332 1333 // 根据影响资源过滤,比如ins-19a06bka 1334 AffectResource *string `json:"AffectResource,omitempty" name:"AffectResource"` 1335} 1336 1337func (r *DescribeAccidentEventListRequest) ToJsonString() string { 1338 b, _ := json.Marshal(r) 1339 return string(b) 1340} 1341 1342// FromJsonString It is highly **NOT** recommended to use this function 1343// because it has no param check, nor strict type check 1344func (r *DescribeAccidentEventListRequest) FromJsonString(s string) error { 1345 f := make(map[string]interface{}) 1346 if err := json.Unmarshal([]byte(s), &f); err != nil { 1347 return err 1348 } 1349 delete(f, "Module") 1350 delete(f, "StartTime") 1351 delete(f, "EndTime") 1352 delete(f, "Limit") 1353 delete(f, "Offset") 1354 delete(f, "UpdateTimeOrder") 1355 delete(f, "OccurTimeOrder") 1356 delete(f, "AccidentType") 1357 delete(f, "AccidentEvent") 1358 delete(f, "AccidentStatus") 1359 delete(f, "AccidentRegion") 1360 delete(f, "AffectResource") 1361 if len(f) > 0 { 1362 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAccidentEventListRequest has unknown keys!", "") 1363 } 1364 return json.Unmarshal([]byte(s), &r) 1365} 1366 1367type DescribeAccidentEventListResponse struct { 1368 *tchttp.BaseResponse 1369 Response *struct { 1370 1371 // 平台事件列表 1372 // 注意:此字段可能返回 null,表示取不到有效值。 1373 Alarms []*DescribeAccidentEventListAlarms `json:"Alarms,omitempty" name:"Alarms"` 1374 1375 // 平台事件的总数 1376 // 注意:此字段可能返回 null,表示取不到有效值。 1377 Total *int64 `json:"Total,omitempty" name:"Total"` 1378 1379 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1380 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1381 } `json:"Response"` 1382} 1383 1384func (r *DescribeAccidentEventListResponse) ToJsonString() string { 1385 b, _ := json.Marshal(r) 1386 return string(b) 1387} 1388 1389// FromJsonString It is highly **NOT** recommended to use this function 1390// because it has no param check, nor strict type check 1391func (r *DescribeAccidentEventListResponse) FromJsonString(s string) error { 1392 return json.Unmarshal([]byte(s), &r) 1393} 1394 1395type DescribeAlarmEventsRequest struct { 1396 *tchttp.BaseRequest 1397 1398 // 模块名,固定值 monitor 1399 Module *string `json:"Module,omitempty" name:"Module"` 1400 1401 // 告警策略类型,由 DescribeAllNamespaces 获得,例如 cvm_device 1402 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 1403 1404 // 监控类型,如 MT_QCE。如果不填默认为 MT_QCE。 1405 MonitorType *string `json:"MonitorType,omitempty" name:"MonitorType"` 1406} 1407 1408func (r *DescribeAlarmEventsRequest) ToJsonString() string { 1409 b, _ := json.Marshal(r) 1410 return string(b) 1411} 1412 1413// FromJsonString It is highly **NOT** recommended to use this function 1414// because it has no param check, nor strict type check 1415func (r *DescribeAlarmEventsRequest) FromJsonString(s string) error { 1416 f := make(map[string]interface{}) 1417 if err := json.Unmarshal([]byte(s), &f); err != nil { 1418 return err 1419 } 1420 delete(f, "Module") 1421 delete(f, "Namespace") 1422 delete(f, "MonitorType") 1423 if len(f) > 0 { 1424 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlarmEventsRequest has unknown keys!", "") 1425 } 1426 return json.Unmarshal([]byte(s), &r) 1427} 1428 1429type DescribeAlarmEventsResponse struct { 1430 *tchttp.BaseResponse 1431 Response *struct { 1432 1433 // 告警事件列表 1434 Events []*AlarmEvent `json:"Events,omitempty" name:"Events"` 1435 1436 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1437 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1438 } `json:"Response"` 1439} 1440 1441func (r *DescribeAlarmEventsResponse) ToJsonString() string { 1442 b, _ := json.Marshal(r) 1443 return string(b) 1444} 1445 1446// FromJsonString It is highly **NOT** recommended to use this function 1447// because it has no param check, nor strict type check 1448func (r *DescribeAlarmEventsResponse) FromJsonString(s string) error { 1449 return json.Unmarshal([]byte(s), &r) 1450} 1451 1452type DescribeAlarmHistoriesRequest struct { 1453 *tchttp.BaseRequest 1454 1455 // 固定值,为"monitor" 1456 Module *string `json:"Module,omitempty" name:"Module"` 1457 1458 // 页数,从 1 开始计数,默认 1 1459 PageNumber *int64 `json:"PageNumber,omitempty" name:"PageNumber"` 1460 1461 // 每页的数量,取值1~100,默认20 1462 PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"` 1463 1464 // 默认按首次出现时间倒序排列 "ASC"=正序 "DESC"=逆序 1465 Order *string `json:"Order,omitempty" name:"Order"` 1466 1467 // 起始时间,默认一天前的时间戳。对应 `FirstOccurTime` 告警首次出现时间,告警历史的 `FirstOccurTime` 晚于 `StartTime` 才可能被搜索到。 1468 StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"` 1469 1470 // 结束时间,默认当前时间戳。对应 `FirstOccurTime` 告警首次出现时间,告警历史的 `FirstOccurTime` 早于 `EndTime` 才可能被搜索到。 1471 EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"` 1472 1473 // 根据监控类型过滤 不选默认查所有类型 "MT_QCE"=云产品监控 1474 MonitorTypes []*string `json:"MonitorTypes,omitempty" name:"MonitorTypes"` 1475 1476 // 根据告警对象过滤 字符串模糊搜索 1477 AlarmObject *string `json:"AlarmObject,omitempty" name:"AlarmObject"` 1478 1479 // 根据告警状态过滤 ALARM=未恢复 OK=已恢复 NO_CONF=已失效 NO_DATA=数据不足,不选默认查所有 1480 AlarmStatus []*string `json:"AlarmStatus,omitempty" name:"AlarmStatus"` 1481 1482 // 根据项目ID过滤,-1=无项目 0=默认项目 1483 // 可在此页面查询 [项目管理](https://console.cloud.tencent.com/project) 1484 ProjectIds []*int64 `json:"ProjectIds,omitempty" name:"ProjectIds"` 1485 1486 // 根据实例组ID过滤 1487 InstanceGroupIds []*int64 `json:"InstanceGroupIds,omitempty" name:"InstanceGroupIds"` 1488 1489 // 根据策略类型过滤,策略类型是监控类型之下的概念,在这里两者都需要传入,例如 `[{"MonitorType": "MT_QCE", "Namespace": "cvm_device"}]` 1490 // 可使用 [查询所有名字空间 DescribeAllNamespaces](https://cloud.tencent.com/document/product/248/48683) 接口查询 1491 Namespaces []*MonitorTypeNamespace `json:"Namespaces,omitempty" name:"Namespaces"` 1492 1493 // 根据指标名过滤 1494 MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"` 1495 1496 // 根据策略名称模糊搜索 1497 PolicyName *string `json:"PolicyName,omitempty" name:"PolicyName"` 1498 1499 // 根据告警内容模糊搜索 1500 Content *string `json:"Content,omitempty" name:"Content"` 1501 1502 // 根据接收人搜索,可以使用“访问管理”的 [拉取子用户 ListUsers](https://cloud.tencent.com/document/product/598/34587) 接口获取用户列表 或 [查询子用户 GetUser](https://cloud.tencent.com/document/product/598/34590) 接口查询子用户详情,此处填入返回结果中的 `Uid` 字段 1503 ReceiverUids []*int64 `json:"ReceiverUids,omitempty" name:"ReceiverUids"` 1504 1505 // 根据接收组搜索,可以使用“访问管理”的 [查询用户组列表 ListGroups](https://cloud.tencent.com/document/product/598/34589) 接口获取用户组列表 或 [列出用户关联的用户组 ListGroupsForUser](https://cloud.tencent.com/document/product/598/34588) 查询某个子用户所在的用户组列表 ,此处填入返回结果中的 `GroupId ` 字段 1506 ReceiverGroups []*int64 `json:"ReceiverGroups,omitempty" name:"ReceiverGroups"` 1507 1508 // 根据告警策略 Id 列表搜索 1509 PolicyIds []*string `json:"PolicyIds,omitempty" name:"PolicyIds"` 1510} 1511 1512func (r *DescribeAlarmHistoriesRequest) ToJsonString() string { 1513 b, _ := json.Marshal(r) 1514 return string(b) 1515} 1516 1517// FromJsonString It is highly **NOT** recommended to use this function 1518// because it has no param check, nor strict type check 1519func (r *DescribeAlarmHistoriesRequest) FromJsonString(s string) error { 1520 f := make(map[string]interface{}) 1521 if err := json.Unmarshal([]byte(s), &f); err != nil { 1522 return err 1523 } 1524 delete(f, "Module") 1525 delete(f, "PageNumber") 1526 delete(f, "PageSize") 1527 delete(f, "Order") 1528 delete(f, "StartTime") 1529 delete(f, "EndTime") 1530 delete(f, "MonitorTypes") 1531 delete(f, "AlarmObject") 1532 delete(f, "AlarmStatus") 1533 delete(f, "ProjectIds") 1534 delete(f, "InstanceGroupIds") 1535 delete(f, "Namespaces") 1536 delete(f, "MetricNames") 1537 delete(f, "PolicyName") 1538 delete(f, "Content") 1539 delete(f, "ReceiverUids") 1540 delete(f, "ReceiverGroups") 1541 delete(f, "PolicyIds") 1542 if len(f) > 0 { 1543 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlarmHistoriesRequest has unknown keys!", "") 1544 } 1545 return json.Unmarshal([]byte(s), &r) 1546} 1547 1548type DescribeAlarmHistoriesResponse struct { 1549 *tchttp.BaseResponse 1550 Response *struct { 1551 1552 // 总数 1553 TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` 1554 1555 // 告警历史列表 1556 Histories []*AlarmHistory `json:"Histories,omitempty" name:"Histories"` 1557 1558 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1559 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1560 } `json:"Response"` 1561} 1562 1563func (r *DescribeAlarmHistoriesResponse) ToJsonString() string { 1564 b, _ := json.Marshal(r) 1565 return string(b) 1566} 1567 1568// FromJsonString It is highly **NOT** recommended to use this function 1569// because it has no param check, nor strict type check 1570func (r *DescribeAlarmHistoriesResponse) FromJsonString(s string) error { 1571 return json.Unmarshal([]byte(s), &r) 1572} 1573 1574type DescribeAlarmMetricsRequest struct { 1575 *tchttp.BaseRequest 1576 1577 // 固定值,为"monitor" 1578 Module *string `json:"Module,omitempty" name:"Module"` 1579 1580 // 监控类型过滤 "MT_QCE"=云产品监控 1581 MonitorType *string `json:"MonitorType,omitempty" name:"MonitorType"` 1582 1583 // 告警策略类型,由 DescribeAllNamespaces 获得,例如 cvm_device 1584 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 1585} 1586 1587func (r *DescribeAlarmMetricsRequest) ToJsonString() string { 1588 b, _ := json.Marshal(r) 1589 return string(b) 1590} 1591 1592// FromJsonString It is highly **NOT** recommended to use this function 1593// because it has no param check, nor strict type check 1594func (r *DescribeAlarmMetricsRequest) FromJsonString(s string) error { 1595 f := make(map[string]interface{}) 1596 if err := json.Unmarshal([]byte(s), &f); err != nil { 1597 return err 1598 } 1599 delete(f, "Module") 1600 delete(f, "MonitorType") 1601 delete(f, "Namespace") 1602 if len(f) > 0 { 1603 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlarmMetricsRequest has unknown keys!", "") 1604 } 1605 return json.Unmarshal([]byte(s), &r) 1606} 1607 1608type DescribeAlarmMetricsResponse struct { 1609 *tchttp.BaseResponse 1610 Response *struct { 1611 1612 // 告警指标列表 1613 Metrics []*Metric `json:"Metrics,omitempty" name:"Metrics"` 1614 1615 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1616 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1617 } `json:"Response"` 1618} 1619 1620func (r *DescribeAlarmMetricsResponse) ToJsonString() string { 1621 b, _ := json.Marshal(r) 1622 return string(b) 1623} 1624 1625// FromJsonString It is highly **NOT** recommended to use this function 1626// because it has no param check, nor strict type check 1627func (r *DescribeAlarmMetricsResponse) FromJsonString(s string) error { 1628 return json.Unmarshal([]byte(s), &r) 1629} 1630 1631type DescribeAlarmNoticeCallbacksRequest struct { 1632 *tchttp.BaseRequest 1633 1634 // 模块名,这里填“monitor” 1635 Module *string `json:"Module,omitempty" name:"Module"` 1636} 1637 1638func (r *DescribeAlarmNoticeCallbacksRequest) ToJsonString() string { 1639 b, _ := json.Marshal(r) 1640 return string(b) 1641} 1642 1643// FromJsonString It is highly **NOT** recommended to use this function 1644// because it has no param check, nor strict type check 1645func (r *DescribeAlarmNoticeCallbacksRequest) FromJsonString(s string) error { 1646 f := make(map[string]interface{}) 1647 if err := json.Unmarshal([]byte(s), &f); err != nil { 1648 return err 1649 } 1650 delete(f, "Module") 1651 if len(f) > 0 { 1652 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlarmNoticeCallbacksRequest has unknown keys!", "") 1653 } 1654 return json.Unmarshal([]byte(s), &r) 1655} 1656 1657type DescribeAlarmNoticeCallbacksResponse struct { 1658 *tchttp.BaseResponse 1659 Response *struct { 1660 1661 // 告警回调通知 1662 // 注意:此字段可能返回 null,表示取不到有效值。 1663 URLNotices []*URLNotice `json:"URLNotices,omitempty" name:"URLNotices"` 1664 1665 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1666 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1667 } `json:"Response"` 1668} 1669 1670func (r *DescribeAlarmNoticeCallbacksResponse) ToJsonString() string { 1671 b, _ := json.Marshal(r) 1672 return string(b) 1673} 1674 1675// FromJsonString It is highly **NOT** recommended to use this function 1676// because it has no param check, nor strict type check 1677func (r *DescribeAlarmNoticeCallbacksResponse) FromJsonString(s string) error { 1678 return json.Unmarshal([]byte(s), &r) 1679} 1680 1681type DescribeAlarmNoticeRequest struct { 1682 *tchttp.BaseRequest 1683 1684 // 模块名,这里填“monitor” 1685 Module *string `json:"Module,omitempty" name:"Module"` 1686 1687 // 告警通知模板 id 1688 NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` 1689} 1690 1691func (r *DescribeAlarmNoticeRequest) ToJsonString() string { 1692 b, _ := json.Marshal(r) 1693 return string(b) 1694} 1695 1696// FromJsonString It is highly **NOT** recommended to use this function 1697// because it has no param check, nor strict type check 1698func (r *DescribeAlarmNoticeRequest) FromJsonString(s string) error { 1699 f := make(map[string]interface{}) 1700 if err := json.Unmarshal([]byte(s), &f); err != nil { 1701 return err 1702 } 1703 delete(f, "Module") 1704 delete(f, "NoticeId") 1705 if len(f) > 0 { 1706 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlarmNoticeRequest has unknown keys!", "") 1707 } 1708 return json.Unmarshal([]byte(s), &r) 1709} 1710 1711type DescribeAlarmNoticeResponse struct { 1712 *tchttp.BaseResponse 1713 Response *struct { 1714 1715 // 告警通知模板详细信息 1716 Notice *AlarmNotice `json:"Notice,omitempty" name:"Notice"` 1717 1718 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1719 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1720 } `json:"Response"` 1721} 1722 1723func (r *DescribeAlarmNoticeResponse) ToJsonString() string { 1724 b, _ := json.Marshal(r) 1725 return string(b) 1726} 1727 1728// FromJsonString It is highly **NOT** recommended to use this function 1729// because it has no param check, nor strict type check 1730func (r *DescribeAlarmNoticeResponse) FromJsonString(s string) error { 1731 return json.Unmarshal([]byte(s), &r) 1732} 1733 1734type DescribeAlarmNoticesRequest struct { 1735 *tchttp.BaseRequest 1736 1737 // 模块名,这里填“monitor” 1738 Module *string `json:"Module,omitempty" name:"Module"` 1739 1740 // 页码 最小为1 1741 PageNumber *int64 `json:"PageNumber,omitempty" name:"PageNumber"` 1742 1743 // 分页大小 1~200 1744 PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"` 1745 1746 // 按更新时间排序方式 ASC=正序 DESC=倒序 1747 Order *string `json:"Order,omitempty" name:"Order"` 1748 1749 // 主账号 uid 用于创建预设通知 1750 OwnerUid *int64 `json:"OwnerUid,omitempty" name:"OwnerUid"` 1751 1752 // 告警通知模板名称 用来模糊搜索 1753 Name *string `json:"Name,omitempty" name:"Name"` 1754 1755 // 根据接收人过滤告警通知模板需要选定通知用户类型 USER=用户 GROUP=用户组 传空=不按接收人过滤 1756 ReceiverType *string `json:"ReceiverType,omitempty" name:"ReceiverType"` 1757 1758 // 接收对象列表 1759 UserIds []*int64 `json:"UserIds,omitempty" name:"UserIds"` 1760 1761 // 接收组列表 1762 GroupIds []*int64 `json:"GroupIds,omitempty" name:"GroupIds"` 1763} 1764 1765func (r *DescribeAlarmNoticesRequest) ToJsonString() string { 1766 b, _ := json.Marshal(r) 1767 return string(b) 1768} 1769 1770// FromJsonString It is highly **NOT** recommended to use this function 1771// because it has no param check, nor strict type check 1772func (r *DescribeAlarmNoticesRequest) FromJsonString(s string) error { 1773 f := make(map[string]interface{}) 1774 if err := json.Unmarshal([]byte(s), &f); err != nil { 1775 return err 1776 } 1777 delete(f, "Module") 1778 delete(f, "PageNumber") 1779 delete(f, "PageSize") 1780 delete(f, "Order") 1781 delete(f, "OwnerUid") 1782 delete(f, "Name") 1783 delete(f, "ReceiverType") 1784 delete(f, "UserIds") 1785 delete(f, "GroupIds") 1786 if len(f) > 0 { 1787 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlarmNoticesRequest has unknown keys!", "") 1788 } 1789 return json.Unmarshal([]byte(s), &r) 1790} 1791 1792type DescribeAlarmNoticesResponse struct { 1793 *tchttp.BaseResponse 1794 Response *struct { 1795 1796 // 告警通知模板总数 1797 TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` 1798 1799 // 告警通知模板列表 1800 Notices []*AlarmNotice `json:"Notices,omitempty" name:"Notices"` 1801 1802 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1803 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1804 } `json:"Response"` 1805} 1806 1807func (r *DescribeAlarmNoticesResponse) ToJsonString() string { 1808 b, _ := json.Marshal(r) 1809 return string(b) 1810} 1811 1812// FromJsonString It is highly **NOT** recommended to use this function 1813// because it has no param check, nor strict type check 1814func (r *DescribeAlarmNoticesResponse) FromJsonString(s string) error { 1815 return json.Unmarshal([]byte(s), &r) 1816} 1817 1818type DescribeAlarmPoliciesRequest struct { 1819 *tchttp.BaseRequest 1820 1821 // 固定值,为"monitor" 1822 Module *string `json:"Module,omitempty" name:"Module"` 1823 1824 // 页数,从 1 开始计数,默认 1 1825 PageNumber *int64 `json:"PageNumber,omitempty" name:"PageNumber"` 1826 1827 // 每页的数量,取值1~100,默认20 1828 PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"` 1829 1830 // 按策略名称模糊搜索 1831 PolicyName *string `json:"PolicyName,omitempty" name:"PolicyName"` 1832 1833 // 根据监控类型过滤 不选默认查所有类型 "MT_QCE"=云产品监控 1834 MonitorTypes []*string `json:"MonitorTypes,omitempty" name:"MonitorTypes"` 1835 1836 // 根据命名空间过滤,不同策略类型的值详见 1837 // [策略类型列表](https://cloud.tencent.com/document/product/248/50397) 1838 Namespaces []*string `json:"Namespaces,omitempty" name:"Namespaces"` 1839 1840 // 告警对象列表,JSON 字符串。外层数组,对应多个实例,内层为对象的维度。例如“云服务器-基础监控”可写为: 1841 // `[ {"Dimensions": {"unInstanceId": "ins-qr8d555g"}}, {"Dimensions": {"unInstanceId": "ins-qr8d555h"}} ]` 1842 // 具体也可以参考下方的示例 2。 1843 // 1844 // 不同云产品参数示例详见 [维度信息Dimensions列表](https://cloud.tencent.com/document/product/248/50397) 1845 Dimensions *string `json:"Dimensions,omitempty" name:"Dimensions"` 1846 1847 // 根据接收人搜索,可以使用“访问管理”的 [拉取子用户 ListUsers](https://cloud.tencent.com/document/product/598/34587) 接口获取用户列表 或 [查询子用户 GetUser](https://cloud.tencent.com/document/product/598/34590) 接口查询子用户详情,此处填入返回结果中的 `Uid` 字段 1848 ReceiverUids []*int64 `json:"ReceiverUids,omitempty" name:"ReceiverUids"` 1849 1850 // 根据接收组搜索,可以使用“访问管理”的 [查询用户组列表 ListGroups](https://cloud.tencent.com/document/product/598/34589) 接口获取用户组列表 或 [列出用户关联的用户组 ListGroupsForUser](https://cloud.tencent.com/document/product/598/34588) 查询某个子用户所在的用户组列表 ,此处填入返回结果中的 `GroupId ` 字段 1851 ReceiverGroups []*int64 `json:"ReceiverGroups,omitempty" name:"ReceiverGroups"` 1852 1853 // 根据默认策略筛选 不传展示全部策略 DEFAULT=展示默认策略 NOT_DEFAULT=展示非默认策略 1854 PolicyType []*string `json:"PolicyType,omitempty" name:"PolicyType"` 1855 1856 // 排序字段,例如按照最后修改时间排序,Field: "UpdateTime" 1857 Field *string `json:"Field,omitempty" name:"Field"` 1858 1859 // 排序顺序:升序:ASC 降序:DESC 1860 Order *string `json:"Order,omitempty" name:"Order"` 1861 1862 // 策略所属项目的id数组,可在此页面查看 1863 // [项目管理](https://console.cloud.tencent.com/project) 1864 ProjectIds []*int64 `json:"ProjectIds,omitempty" name:"ProjectIds"` 1865 1866 // 通知模版的id列表,可查询通知模版列表获取。 1867 // 可使用 [查询通知模板列表](https://cloud.tencent.com/document/product/248/51280) 接口查询。 1868 NoticeIds []*string `json:"NoticeIds,omitempty" name:"NoticeIds"` 1869 1870 // 根据触发条件筛选 不传展示全部策略 STATIC=展示静态阈值策略 DYNAMIC=展示动态阈值策略 1871 RuleTypes []*string `json:"RuleTypes,omitempty" name:"RuleTypes"` 1872 1873 // 告警启停筛选,[1]:启用 [0]:停止,全部[0, 1] 1874 Enable []*int64 `json:"Enable,omitempty" name:"Enable"` 1875 1876 // 传 1 查询未配置通知规则的告警策略;不传或传其他数值,查询所有策略。 1877 NotBindingNoticeRule *int64 `json:"NotBindingNoticeRule,omitempty" name:"NotBindingNoticeRule"` 1878 1879 // 实例分组id 1880 InstanceGroupId *int64 `json:"InstanceGroupId,omitempty" name:"InstanceGroupId"` 1881} 1882 1883func (r *DescribeAlarmPoliciesRequest) ToJsonString() string { 1884 b, _ := json.Marshal(r) 1885 return string(b) 1886} 1887 1888// FromJsonString It is highly **NOT** recommended to use this function 1889// because it has no param check, nor strict type check 1890func (r *DescribeAlarmPoliciesRequest) FromJsonString(s string) error { 1891 f := make(map[string]interface{}) 1892 if err := json.Unmarshal([]byte(s), &f); err != nil { 1893 return err 1894 } 1895 delete(f, "Module") 1896 delete(f, "PageNumber") 1897 delete(f, "PageSize") 1898 delete(f, "PolicyName") 1899 delete(f, "MonitorTypes") 1900 delete(f, "Namespaces") 1901 delete(f, "Dimensions") 1902 delete(f, "ReceiverUids") 1903 delete(f, "ReceiverGroups") 1904 delete(f, "PolicyType") 1905 delete(f, "Field") 1906 delete(f, "Order") 1907 delete(f, "ProjectIds") 1908 delete(f, "NoticeIds") 1909 delete(f, "RuleTypes") 1910 delete(f, "Enable") 1911 delete(f, "NotBindingNoticeRule") 1912 delete(f, "InstanceGroupId") 1913 if len(f) > 0 { 1914 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlarmPoliciesRequest has unknown keys!", "") 1915 } 1916 return json.Unmarshal([]byte(s), &r) 1917} 1918 1919type DescribeAlarmPoliciesResponse struct { 1920 *tchttp.BaseResponse 1921 Response *struct { 1922 1923 // 策略总数 1924 TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` 1925 1926 // 策略数组 1927 Policies []*AlarmPolicy `json:"Policies,omitempty" name:"Policies"` 1928 1929 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1930 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1931 } `json:"Response"` 1932} 1933 1934func (r *DescribeAlarmPoliciesResponse) ToJsonString() string { 1935 b, _ := json.Marshal(r) 1936 return string(b) 1937} 1938 1939// FromJsonString It is highly **NOT** recommended to use this function 1940// because it has no param check, nor strict type check 1941func (r *DescribeAlarmPoliciesResponse) FromJsonString(s string) error { 1942 return json.Unmarshal([]byte(s), &r) 1943} 1944 1945type DescribeAlarmPolicyRequest struct { 1946 *tchttp.BaseRequest 1947 1948 // 固定值,为"monitor" 1949 Module *string `json:"Module,omitempty" name:"Module"` 1950 1951 // 告警策略ID 1952 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 1953} 1954 1955func (r *DescribeAlarmPolicyRequest) ToJsonString() string { 1956 b, _ := json.Marshal(r) 1957 return string(b) 1958} 1959 1960// FromJsonString It is highly **NOT** recommended to use this function 1961// because it has no param check, nor strict type check 1962func (r *DescribeAlarmPolicyRequest) FromJsonString(s string) error { 1963 f := make(map[string]interface{}) 1964 if err := json.Unmarshal([]byte(s), &f); err != nil { 1965 return err 1966 } 1967 delete(f, "Module") 1968 delete(f, "PolicyId") 1969 if len(f) > 0 { 1970 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlarmPolicyRequest has unknown keys!", "") 1971 } 1972 return json.Unmarshal([]byte(s), &r) 1973} 1974 1975type DescribeAlarmPolicyResponse struct { 1976 *tchttp.BaseResponse 1977 Response *struct { 1978 1979 // 策略详情 1980 Policy *AlarmPolicy `json:"Policy,omitempty" name:"Policy"` 1981 1982 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1983 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1984 } `json:"Response"` 1985} 1986 1987func (r *DescribeAlarmPolicyResponse) ToJsonString() string { 1988 b, _ := json.Marshal(r) 1989 return string(b) 1990} 1991 1992// FromJsonString It is highly **NOT** recommended to use this function 1993// because it has no param check, nor strict type check 1994func (r *DescribeAlarmPolicyResponse) FromJsonString(s string) error { 1995 return json.Unmarshal([]byte(s), &r) 1996} 1997 1998type DescribeAlertRulesRequest struct { 1999 *tchttp.BaseRequest 2000 2001 // Prometheus 实例 ID 2002 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 2003 2004 // 返回数量,默认为 20,最大值为 100 2005 Limit *int64 `json:"Limit,omitempty" name:"Limit"` 2006 2007 // 偏移量,默认为 0 2008 Offset *int64 `json:"Offset,omitempty" name:"Offset"` 2009 2010 // 规则 ID 2011 RuleId *string `json:"RuleId,omitempty" name:"RuleId"` 2012 2013 // 规则状态码,取值如下: 2014 // <li>2=RuleEnabled</li> 2015 // <li>3=RuleDisabled</li> 2016 RuleState *int64 `json:"RuleState,omitempty" name:"RuleState"` 2017 2018 // 规则名称 2019 RuleName *string `json:"RuleName,omitempty" name:"RuleName"` 2020 2021 // 报警策略模板分类 2022 Type *string `json:"Type,omitempty" name:"Type"` 2023} 2024 2025func (r *DescribeAlertRulesRequest) ToJsonString() string { 2026 b, _ := json.Marshal(r) 2027 return string(b) 2028} 2029 2030// FromJsonString It is highly **NOT** recommended to use this function 2031// because it has no param check, nor strict type check 2032func (r *DescribeAlertRulesRequest) FromJsonString(s string) error { 2033 f := make(map[string]interface{}) 2034 if err := json.Unmarshal([]byte(s), &f); err != nil { 2035 return err 2036 } 2037 delete(f, "InstanceId") 2038 delete(f, "Limit") 2039 delete(f, "Offset") 2040 delete(f, "RuleId") 2041 delete(f, "RuleState") 2042 delete(f, "RuleName") 2043 delete(f, "Type") 2044 if len(f) > 0 { 2045 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlertRulesRequest has unknown keys!", "") 2046 } 2047 return json.Unmarshal([]byte(s), &r) 2048} 2049 2050type DescribeAlertRulesResponse struct { 2051 *tchttp.BaseResponse 2052 Response *struct { 2053 2054 // 报警规则数量 2055 TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` 2056 2057 // 报警规则详情 2058 // 注意:此字段可能返回 null,表示取不到有效值。 2059 AlertRuleSet []*PrometheusRuleSet `json:"AlertRuleSet,omitempty" name:"AlertRuleSet"` 2060 2061 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2062 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2063 } `json:"Response"` 2064} 2065 2066func (r *DescribeAlertRulesResponse) ToJsonString() string { 2067 b, _ := json.Marshal(r) 2068 return string(b) 2069} 2070 2071// FromJsonString It is highly **NOT** recommended to use this function 2072// because it has no param check, nor strict type check 2073func (r *DescribeAlertRulesResponse) FromJsonString(s string) error { 2074 return json.Unmarshal([]byte(s), &r) 2075} 2076 2077type DescribeAllNamespacesRequest struct { 2078 *tchttp.BaseRequest 2079 2080 // 根据使用场景过滤 目前仅有"ST_ALARM"=告警类型 2081 SceneType *string `json:"SceneType,omitempty" name:"SceneType"` 2082 2083 // 固定值,为"monitor" 2084 Module *string `json:"Module,omitempty" name:"Module"` 2085 2086 // 根据监控类型过滤 不填默认查所有类型 "MT_QCE"=云产品监控 2087 MonitorTypes []*string `json:"MonitorTypes,omitempty" name:"MonitorTypes"` 2088 2089 // 根据namespace的Id过滤 不填默认查询所有 2090 Ids []*string `json:"Ids,omitempty" name:"Ids"` 2091} 2092 2093func (r *DescribeAllNamespacesRequest) ToJsonString() string { 2094 b, _ := json.Marshal(r) 2095 return string(b) 2096} 2097 2098// FromJsonString It is highly **NOT** recommended to use this function 2099// because it has no param check, nor strict type check 2100func (r *DescribeAllNamespacesRequest) FromJsonString(s string) error { 2101 f := make(map[string]interface{}) 2102 if err := json.Unmarshal([]byte(s), &f); err != nil { 2103 return err 2104 } 2105 delete(f, "SceneType") 2106 delete(f, "Module") 2107 delete(f, "MonitorTypes") 2108 delete(f, "Ids") 2109 if len(f) > 0 { 2110 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAllNamespacesRequest has unknown keys!", "") 2111 } 2112 return json.Unmarshal([]byte(s), &r) 2113} 2114 2115type DescribeAllNamespacesResponse struct { 2116 *tchttp.BaseResponse 2117 Response *struct { 2118 2119 // 云产品的告警策略类型,已废弃 2120 QceNamespaces *CommonNamespace `json:"QceNamespaces,omitempty" name:"QceNamespaces"` 2121 2122 // 其他告警策略类型,已废弃 2123 CustomNamespaces *CommonNamespace `json:"CustomNamespaces,omitempty" name:"CustomNamespaces"` 2124 2125 // 云产品的告警策略类型 2126 QceNamespacesNew []*CommonNamespace `json:"QceNamespacesNew,omitempty" name:"QceNamespacesNew"` 2127 2128 // 其他告警策略类型,暂不支持 2129 CustomNamespacesNew []*CommonNamespace `json:"CustomNamespacesNew,omitempty" name:"CustomNamespacesNew"` 2130 2131 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2132 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2133 } `json:"Response"` 2134} 2135 2136func (r *DescribeAllNamespacesResponse) ToJsonString() string { 2137 b, _ := json.Marshal(r) 2138 return string(b) 2139} 2140 2141// FromJsonString It is highly **NOT** recommended to use this function 2142// because it has no param check, nor strict type check 2143func (r *DescribeAllNamespacesResponse) FromJsonString(s string) error { 2144 return json.Unmarshal([]byte(s), &r) 2145} 2146 2147type DescribeBaseMetricsRequest struct { 2148 *tchttp.BaseRequest 2149 2150 // 业务命名空间,各个云产品的业务命名空间不同。如需获取业务命名空间,请前往各产品监控指标文档,例如云服务器的命名空间,可参见 [云服务器监控指标](https://cloud.tencent.com/document/product/248/6843) 2151 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 2152 2153 // 指标名,各个云产品的指标名不同。如需获取指标名,请前往各产品监控指标文档,例如云服务器的指标名,可参见 [云服务器监控指标](https://cloud.tencent.com/document/product/248/6843) 2154 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 2155} 2156 2157func (r *DescribeBaseMetricsRequest) ToJsonString() string { 2158 b, _ := json.Marshal(r) 2159 return string(b) 2160} 2161 2162// FromJsonString It is highly **NOT** recommended to use this function 2163// because it has no param check, nor strict type check 2164func (r *DescribeBaseMetricsRequest) FromJsonString(s string) error { 2165 f := make(map[string]interface{}) 2166 if err := json.Unmarshal([]byte(s), &f); err != nil { 2167 return err 2168 } 2169 delete(f, "Namespace") 2170 delete(f, "MetricName") 2171 if len(f) > 0 { 2172 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBaseMetricsRequest has unknown keys!", "") 2173 } 2174 return json.Unmarshal([]byte(s), &r) 2175} 2176 2177type DescribeBaseMetricsResponse struct { 2178 *tchttp.BaseResponse 2179 Response *struct { 2180 2181 // 查询得到的指标描述列表 2182 MetricSet []*MetricSet `json:"MetricSet,omitempty" name:"MetricSet"` 2183 2184 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2185 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2186 } `json:"Response"` 2187} 2188 2189func (r *DescribeBaseMetricsResponse) ToJsonString() string { 2190 b, _ := json.Marshal(r) 2191 return string(b) 2192} 2193 2194// FromJsonString It is highly **NOT** recommended to use this function 2195// because it has no param check, nor strict type check 2196func (r *DescribeBaseMetricsResponse) FromJsonString(s string) error { 2197 return json.Unmarshal([]byte(s), &r) 2198} 2199 2200type DescribeBasicAlarmListAlarms struct { 2201 2202 // 该条告警的ID 2203 Id *uint64 `json:"Id,omitempty" name:"Id"` 2204 2205 // 项目ID 2206 // 注意:此字段可能返回 null,表示取不到有效值。 2207 ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` 2208 2209 // 项目名称 2210 // 注意:此字段可能返回 null,表示取不到有效值。 2211 ProjectName *string `json:"ProjectName,omitempty" name:"ProjectName"` 2212 2213 // 告警状态ID,0表示未恢复;1表示已恢复;2,3,5表示数据不足;4表示已失效 2214 // 注意:此字段可能返回 null,表示取不到有效值。 2215 Status *int64 `json:"Status,omitempty" name:"Status"` 2216 2217 // 告警状态,ALARM表示未恢复;OK表示已恢复;NO_DATA表示数据不足;NO_CONF表示已失效 2218 // 注意:此字段可能返回 null,表示取不到有效值。 2219 AlarmStatus *string `json:"AlarmStatus,omitempty" name:"AlarmStatus"` 2220 2221 // 策略组ID 2222 // 注意:此字段可能返回 null,表示取不到有效值。 2223 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 2224 2225 // 策略组名 2226 // 注意:此字段可能返回 null,表示取不到有效值。 2227 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 2228 2229 // 发生时间 2230 // 注意:此字段可能返回 null,表示取不到有效值。 2231 FirstOccurTime *string `json:"FirstOccurTime,omitempty" name:"FirstOccurTime"` 2232 2233 // 持续时间,单位s 2234 // 注意:此字段可能返回 null,表示取不到有效值。 2235 Duration *int64 `json:"Duration,omitempty" name:"Duration"` 2236 2237 // 结束时间 2238 // 注意:此字段可能返回 null,表示取不到有效值。 2239 LastOccurTime *string `json:"LastOccurTime,omitempty" name:"LastOccurTime"` 2240 2241 // 告警内容 2242 // 注意:此字段可能返回 null,表示取不到有效值。 2243 Content *string `json:"Content,omitempty" name:"Content"` 2244 2245 // 告警对象 2246 // 注意:此字段可能返回 null,表示取不到有效值。 2247 ObjName *string `json:"ObjName,omitempty" name:"ObjName"` 2248 2249 // 告警对象ID 2250 // 注意:此字段可能返回 null,表示取不到有效值。 2251 ObjId *string `json:"ObjId,omitempty" name:"ObjId"` 2252 2253 // 策略类型 2254 // 注意:此字段可能返回 null,表示取不到有效值。 2255 ViewName *string `json:"ViewName,omitempty" name:"ViewName"` 2256 2257 // VPC,只有CVM有 2258 // 注意:此字段可能返回 null,表示取不到有效值。 2259 Vpc *string `json:"Vpc,omitempty" name:"Vpc"` 2260 2261 // 指标ID 2262 // 注意:此字段可能返回 null,表示取不到有效值。 2263 MetricId *int64 `json:"MetricId,omitempty" name:"MetricId"` 2264 2265 // 指标名 2266 // 注意:此字段可能返回 null,表示取不到有效值。 2267 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 2268 2269 // 告警类型,0表示指标告警,2表示产品事件告警,3表示平台事件告警 2270 // 注意:此字段可能返回 null,表示取不到有效值。 2271 AlarmType *int64 `json:"AlarmType,omitempty" name:"AlarmType"` 2272 2273 // 地域 2274 // 注意:此字段可能返回 null,表示取不到有效值。 2275 Region *string `json:"Region,omitempty" name:"Region"` 2276 2277 // 告警对象维度信息 2278 // 注意:此字段可能返回 null,表示取不到有效值。 2279 Dimensions *string `json:"Dimensions,omitempty" name:"Dimensions"` 2280 2281 // 通知方式 2282 // 注意:此字段可能返回 null,表示取不到有效值。 2283 NotifyWay []*string `json:"NotifyWay,omitempty" name:"NotifyWay"` 2284 2285 // 所属实例组信息 2286 // 注意:此字段可能返回 null,表示取不到有效值。 2287 InstanceGroup []*InstanceGroup `json:"InstanceGroup,omitempty" name:"InstanceGroup"` 2288} 2289 2290type DescribeBasicAlarmListRequest struct { 2291 *tchttp.BaseRequest 2292 2293 // 接口模块名,当前取值monitor 2294 Module *string `json:"Module,omitempty" name:"Module"` 2295 2296 // 起始时间,默认一天前的时间戳 2297 StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"` 2298 2299 // 结束时间,默认当前时间戳 2300 EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"` 2301 2302 // 分页参数,每页返回的数量,取值1~100,默认20 2303 Limit *int64 `json:"Limit,omitempty" name:"Limit"` 2304 2305 // 分页参数,页偏移量,从0开始计数,默认0 2306 Offset *int64 `json:"Offset,omitempty" name:"Offset"` 2307 2308 // 根据发生时间排序,取值ASC或DESC 2309 OccurTimeOrder *string `json:"OccurTimeOrder,omitempty" name:"OccurTimeOrder"` 2310 2311 // 根据项目ID过滤 2312 ProjectIds []*int64 `json:"ProjectIds,omitempty" name:"ProjectIds"` 2313 2314 // 根据策略类型过滤 2315 ViewNames []*string `json:"ViewNames,omitempty" name:"ViewNames"` 2316 2317 // 根据告警状态过滤 2318 AlarmStatus []*int64 `json:"AlarmStatus,omitempty" name:"AlarmStatus"` 2319 2320 // 根据告警对象过滤 2321 ObjLike *string `json:"ObjLike,omitempty" name:"ObjLike"` 2322 2323 // 根据实例组ID过滤 2324 InstanceGroupIds []*int64 `json:"InstanceGroupIds,omitempty" name:"InstanceGroupIds"` 2325 2326 // 根据指标名过滤 2327 MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"` 2328} 2329 2330func (r *DescribeBasicAlarmListRequest) ToJsonString() string { 2331 b, _ := json.Marshal(r) 2332 return string(b) 2333} 2334 2335// FromJsonString It is highly **NOT** recommended to use this function 2336// because it has no param check, nor strict type check 2337func (r *DescribeBasicAlarmListRequest) FromJsonString(s string) error { 2338 f := make(map[string]interface{}) 2339 if err := json.Unmarshal([]byte(s), &f); err != nil { 2340 return err 2341 } 2342 delete(f, "Module") 2343 delete(f, "StartTime") 2344 delete(f, "EndTime") 2345 delete(f, "Limit") 2346 delete(f, "Offset") 2347 delete(f, "OccurTimeOrder") 2348 delete(f, "ProjectIds") 2349 delete(f, "ViewNames") 2350 delete(f, "AlarmStatus") 2351 delete(f, "ObjLike") 2352 delete(f, "InstanceGroupIds") 2353 delete(f, "MetricNames") 2354 if len(f) > 0 { 2355 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBasicAlarmListRequest has unknown keys!", "") 2356 } 2357 return json.Unmarshal([]byte(s), &r) 2358} 2359 2360type DescribeBasicAlarmListResponse struct { 2361 *tchttp.BaseResponse 2362 Response *struct { 2363 2364 // 告警列表 2365 // 注意:此字段可能返回 null,表示取不到有效值。 2366 Alarms []*DescribeBasicAlarmListAlarms `json:"Alarms,omitempty" name:"Alarms"` 2367 2368 // 总数 2369 // 注意:此字段可能返回 null,表示取不到有效值。 2370 Total *int64 `json:"Total,omitempty" name:"Total"` 2371 2372 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2373 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2374 } `json:"Response"` 2375} 2376 2377func (r *DescribeBasicAlarmListResponse) ToJsonString() string { 2378 b, _ := json.Marshal(r) 2379 return string(b) 2380} 2381 2382// FromJsonString It is highly **NOT** recommended to use this function 2383// because it has no param check, nor strict type check 2384func (r *DescribeBasicAlarmListResponse) FromJsonString(s string) error { 2385 return json.Unmarshal([]byte(s), &r) 2386} 2387 2388type DescribeBindingPolicyObjectListDimension struct { 2389 2390 // 地域id 2391 RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"` 2392 2393 // 地域简称 2394 Region *string `json:"Region,omitempty" name:"Region"` 2395 2396 // 维度组合json字符串 2397 Dimensions *string `json:"Dimensions,omitempty" name:"Dimensions"` 2398 2399 // 事件维度组合json字符串 2400 EventDimensions *string `json:"EventDimensions,omitempty" name:"EventDimensions"` 2401} 2402 2403type DescribeBindingPolicyObjectListInstance struct { 2404 2405 // 对象唯一id 2406 UniqueId *string `json:"UniqueId,omitempty" name:"UniqueId"` 2407 2408 // 表示对象实例的维度集合,jsonObj字符串 2409 Dimensions *string `json:"Dimensions,omitempty" name:"Dimensions"` 2410 2411 // 对象是否被屏蔽,0表示未屏蔽,1表示被屏蔽 2412 IsShielded *int64 `json:"IsShielded,omitempty" name:"IsShielded"` 2413 2414 // 对象所在的地域 2415 Region *string `json:"Region,omitempty" name:"Region"` 2416} 2417 2418type DescribeBindingPolicyObjectListInstanceGroup struct { 2419 2420 // 实例分组id 2421 InstanceGroupId *int64 `json:"InstanceGroupId,omitempty" name:"InstanceGroupId"` 2422 2423 // 告警策略类型名称 2424 ViewName *string `json:"ViewName,omitempty" name:"ViewName"` 2425 2426 // 最后编辑uin 2427 LastEditUin *string `json:"LastEditUin,omitempty" name:"LastEditUin"` 2428 2429 // 实例分组名称 2430 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 2431 2432 // 实例数量 2433 InstanceSum *int64 `json:"InstanceSum,omitempty" name:"InstanceSum"` 2434 2435 // 更新时间 2436 UpdateTime *int64 `json:"UpdateTime,omitempty" name:"UpdateTime"` 2437 2438 // 创建时间 2439 InsertTime *int64 `json:"InsertTime,omitempty" name:"InsertTime"` 2440 2441 // 实例所在的地域集合 2442 // 注意:此字段可能返回 null,表示取不到有效值。 2443 Regions []*string `json:"Regions,omitempty" name:"Regions"` 2444} 2445 2446type DescribeBindingPolicyObjectListRequest struct { 2447 *tchttp.BaseRequest 2448 2449 // 固定值,为"monitor" 2450 Module *string `json:"Module,omitempty" name:"Module"` 2451 2452 // 策略组id,如果有形如 policy-xxxx 的 id,请填到 PolicyId 字段中,本字段填 0 2453 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 2454 2455 // 告警策略id,形如 policy-xxxx,如果填入,则GroupId可以填0 2456 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 2457 2458 // 每次返回的数量,取值1~100,默认20 2459 Limit *int64 `json:"Limit,omitempty" name:"Limit"` 2460 2461 // 偏移量,从0开始计数,默认0。举例来说,参数 Offset=0&Limit=20 返回第 0 到 19 项,Offset=20&Limit=20 返回第 20 到 39 项,以此类推 2462 Offset *int64 `json:"Offset,omitempty" name:"Offset"` 2463 2464 // 筛选对象的维度信息 2465 Dimensions []*DescribeBindingPolicyObjectListDimension `json:"Dimensions,omitempty" name:"Dimensions"` 2466} 2467 2468func (r *DescribeBindingPolicyObjectListRequest) ToJsonString() string { 2469 b, _ := json.Marshal(r) 2470 return string(b) 2471} 2472 2473// FromJsonString It is highly **NOT** recommended to use this function 2474// because it has no param check, nor strict type check 2475func (r *DescribeBindingPolicyObjectListRequest) FromJsonString(s string) error { 2476 f := make(map[string]interface{}) 2477 if err := json.Unmarshal([]byte(s), &f); err != nil { 2478 return err 2479 } 2480 delete(f, "Module") 2481 delete(f, "GroupId") 2482 delete(f, "PolicyId") 2483 delete(f, "Limit") 2484 delete(f, "Offset") 2485 delete(f, "Dimensions") 2486 if len(f) > 0 { 2487 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBindingPolicyObjectListRequest has unknown keys!", "") 2488 } 2489 return json.Unmarshal([]byte(s), &r) 2490} 2491 2492type DescribeBindingPolicyObjectListResponse struct { 2493 *tchttp.BaseResponse 2494 Response *struct { 2495 2496 // 绑定的对象实例列表 2497 // 注意:此字段可能返回 null,表示取不到有效值。 2498 List []*DescribeBindingPolicyObjectListInstance `json:"List,omitempty" name:"List"` 2499 2500 // 绑定的对象实例总数 2501 Total *int64 `json:"Total,omitempty" name:"Total"` 2502 2503 // 未屏蔽的对象实例数 2504 NoShieldedSum *int64 `json:"NoShieldedSum,omitempty" name:"NoShieldedSum"` 2505 2506 // 绑定的实例分组信息,没有绑定实例分组则为空 2507 // 注意:此字段可能返回 null,表示取不到有效值。 2508 InstanceGroup *DescribeBindingPolicyObjectListInstanceGroup `json:"InstanceGroup,omitempty" name:"InstanceGroup"` 2509 2510 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2511 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2512 } `json:"Response"` 2513} 2514 2515func (r *DescribeBindingPolicyObjectListResponse) ToJsonString() string { 2516 b, _ := json.Marshal(r) 2517 return string(b) 2518} 2519 2520// FromJsonString It is highly **NOT** recommended to use this function 2521// because it has no param check, nor strict type check 2522func (r *DescribeBindingPolicyObjectListResponse) FromJsonString(s string) error { 2523 return json.Unmarshal([]byte(s), &r) 2524} 2525 2526type DescribeMonitorTypesRequest struct { 2527 *tchttp.BaseRequest 2528 2529 // 模块名,固定值 monitor 2530 Module *string `json:"Module,omitempty" name:"Module"` 2531} 2532 2533func (r *DescribeMonitorTypesRequest) ToJsonString() string { 2534 b, _ := json.Marshal(r) 2535 return string(b) 2536} 2537 2538// FromJsonString It is highly **NOT** recommended to use this function 2539// because it has no param check, nor strict type check 2540func (r *DescribeMonitorTypesRequest) FromJsonString(s string) error { 2541 f := make(map[string]interface{}) 2542 if err := json.Unmarshal([]byte(s), &f); err != nil { 2543 return err 2544 } 2545 delete(f, "Module") 2546 if len(f) > 0 { 2547 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeMonitorTypesRequest has unknown keys!", "") 2548 } 2549 return json.Unmarshal([]byte(s), &r) 2550} 2551 2552type DescribeMonitorTypesResponse struct { 2553 *tchttp.BaseResponse 2554 Response *struct { 2555 2556 // 监控类型,云产品监控为 MT_QCE 2557 MonitorTypes []*string `json:"MonitorTypes,omitempty" name:"MonitorTypes"` 2558 2559 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2560 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2561 } `json:"Response"` 2562} 2563 2564func (r *DescribeMonitorTypesResponse) ToJsonString() string { 2565 b, _ := json.Marshal(r) 2566 return string(b) 2567} 2568 2569// FromJsonString It is highly **NOT** recommended to use this function 2570// because it has no param check, nor strict type check 2571func (r *DescribeMonitorTypesResponse) FromJsonString(s string) error { 2572 return json.Unmarshal([]byte(s), &r) 2573} 2574 2575type DescribePolicyConditionListCondition struct { 2576 2577 // 策略视图名称 2578 PolicyViewName *string `json:"PolicyViewName,omitempty" name:"PolicyViewName"` 2579 2580 // 事件告警条件 2581 // 注意:此字段可能返回 null,表示取不到有效值。 2582 EventMetrics []*DescribePolicyConditionListEventMetric `json:"EventMetrics,omitempty" name:"EventMetrics"` 2583 2584 // 是否支持多地域 2585 IsSupportMultiRegion *bool `json:"IsSupportMultiRegion,omitempty" name:"IsSupportMultiRegion"` 2586 2587 // 指标告警条件 2588 // 注意:此字段可能返回 null,表示取不到有效值。 2589 Metrics []*DescribePolicyConditionListMetric `json:"Metrics,omitempty" name:"Metrics"` 2590 2591 // 策略类型名称 2592 Name *string `json:"Name,omitempty" name:"Name"` 2593 2594 // 排序id 2595 SortId *int64 `json:"SortId,omitempty" name:"SortId"` 2596 2597 // 是否支持默认策略 2598 SupportDefault *bool `json:"SupportDefault,omitempty" name:"SupportDefault"` 2599 2600 // 支持该策略类型的地域列表 2601 // 注意:此字段可能返回 null,表示取不到有效值。 2602 SupportRegions []*string `json:"SupportRegions,omitempty" name:"SupportRegions"` 2603} 2604 2605type DescribePolicyConditionListConfigManual struct { 2606 2607 // 检测方式 2608 // 注意:此字段可能返回 null,表示取不到有效值。 2609 CalcType *DescribePolicyConditionListConfigManualCalcType `json:"CalcType,omitempty" name:"CalcType"` 2610 2611 // 检测阈值 2612 // 注意:此字段可能返回 null,表示取不到有效值。 2613 CalcValue *DescribePolicyConditionListConfigManualCalcValue `json:"CalcValue,omitempty" name:"CalcValue"` 2614 2615 // 持续时间 2616 // 注意:此字段可能返回 null,表示取不到有效值。 2617 ContinueTime *DescribePolicyConditionListConfigManualContinueTime `json:"ContinueTime,omitempty" name:"ContinueTime"` 2618 2619 // 数据周期 2620 // 注意:此字段可能返回 null,表示取不到有效值。 2621 Period *DescribePolicyConditionListConfigManualPeriod `json:"Period,omitempty" name:"Period"` 2622 2623 // 持续周期个数 2624 // 注意:此字段可能返回 null,表示取不到有效值。 2625 PeriodNum *DescribePolicyConditionListConfigManualPeriodNum `json:"PeriodNum,omitempty" name:"PeriodNum"` 2626 2627 // 聚合方式 2628 // 注意:此字段可能返回 null,表示取不到有效值。 2629 StatType *DescribePolicyConditionListConfigManualStatType `json:"StatType,omitempty" name:"StatType"` 2630} 2631 2632type DescribePolicyConditionListConfigManualCalcType struct { 2633 2634 // CalcType 取值 2635 // 注意:此字段可能返回 null,表示取不到有效值。 2636 Keys []*int64 `json:"Keys,omitempty" name:"Keys"` 2637 2638 // 是否必须 2639 Need *bool `json:"Need,omitempty" name:"Need"` 2640} 2641 2642type DescribePolicyConditionListConfigManualCalcValue struct { 2643 2644 // 默认值 2645 // 注意:此字段可能返回 null,表示取不到有效值。 2646 Default *string `json:"Default,omitempty" name:"Default"` 2647 2648 // 固定值 2649 // 注意:此字段可能返回 null,表示取不到有效值。 2650 Fixed *string `json:"Fixed,omitempty" name:"Fixed"` 2651 2652 // 最大值 2653 // 注意:此字段可能返回 null,表示取不到有效值。 2654 Max *string `json:"Max,omitempty" name:"Max"` 2655 2656 // 最小值 2657 // 注意:此字段可能返回 null,表示取不到有效值。 2658 Min *string `json:"Min,omitempty" name:"Min"` 2659 2660 // 是否必须 2661 Need *bool `json:"Need,omitempty" name:"Need"` 2662} 2663 2664type DescribePolicyConditionListConfigManualContinueTime struct { 2665 2666 // 默认持续时间,单位:秒 2667 // 注意:此字段可能返回 null,表示取不到有效值。 2668 Default *int64 `json:"Default,omitempty" name:"Default"` 2669 2670 // 可选持续时间,单位:秒 2671 // 注意:此字段可能返回 null,表示取不到有效值。 2672 Keys []*int64 `json:"Keys,omitempty" name:"Keys"` 2673 2674 // 是否必须 2675 Need *bool `json:"Need,omitempty" name:"Need"` 2676} 2677 2678type DescribePolicyConditionListConfigManualPeriod struct { 2679 2680 // 默认周期,单位:秒 2681 // 注意:此字段可能返回 null,表示取不到有效值。 2682 Default *int64 `json:"Default,omitempty" name:"Default"` 2683 2684 // 可选周期,单位:秒 2685 // 注意:此字段可能返回 null,表示取不到有效值。 2686 Keys []*int64 `json:"Keys,omitempty" name:"Keys"` 2687 2688 // 是否必须 2689 Need *bool `json:"Need,omitempty" name:"Need"` 2690} 2691 2692type DescribePolicyConditionListConfigManualPeriodNum struct { 2693 2694 // 默认周期数 2695 // 注意:此字段可能返回 null,表示取不到有效值。 2696 Default *int64 `json:"Default,omitempty" name:"Default"` 2697 2698 // 可选周期数 2699 // 注意:此字段可能返回 null,表示取不到有效值。 2700 Keys []*int64 `json:"Keys,omitempty" name:"Keys"` 2701 2702 // 是否必须 2703 Need *bool `json:"Need,omitempty" name:"Need"` 2704} 2705 2706type DescribePolicyConditionListConfigManualStatType struct { 2707 2708 // 数据聚合方式,周期5秒 2709 // 注意:此字段可能返回 null,表示取不到有效值。 2710 P5 *string `json:"P5,omitempty" name:"P5"` 2711 2712 // 数据聚合方式,周期10秒 2713 // 注意:此字段可能返回 null,表示取不到有效值。 2714 P10 *string `json:"P10,omitempty" name:"P10"` 2715 2716 // 数据聚合方式,周期1分钟 2717 // 注意:此字段可能返回 null,表示取不到有效值。 2718 P60 *string `json:"P60,omitempty" name:"P60"` 2719 2720 // 数据聚合方式,周期5分钟 2721 // 注意:此字段可能返回 null,表示取不到有效值。 2722 P300 *string `json:"P300,omitempty" name:"P300"` 2723 2724 // 数据聚合方式,周期10分钟 2725 // 注意:此字段可能返回 null,表示取不到有效值。 2726 P600 *string `json:"P600,omitempty" name:"P600"` 2727 2728 // 数据聚合方式,周期30分钟 2729 // 注意:此字段可能返回 null,表示取不到有效值。 2730 P1800 *string `json:"P1800,omitempty" name:"P1800"` 2731 2732 // 数据聚合方式,周期1小时 2733 // 注意:此字段可能返回 null,表示取不到有效值。 2734 P3600 *string `json:"P3600,omitempty" name:"P3600"` 2735 2736 // 数据聚合方式,周期1天 2737 // 注意:此字段可能返回 null,表示取不到有效值。 2738 P86400 *string `json:"P86400,omitempty" name:"P86400"` 2739} 2740 2741type DescribePolicyConditionListEventMetric struct { 2742 2743 // 事件id 2744 EventId *int64 `json:"EventId,omitempty" name:"EventId"` 2745 2746 // 事件名称 2747 EventShowName *string `json:"EventShowName,omitempty" name:"EventShowName"` 2748 2749 // 是否需要恢复 2750 NeedRecovered *bool `json:"NeedRecovered,omitempty" name:"NeedRecovered"` 2751 2752 // 事件类型,预留字段,当前固定取值为2 2753 Type *int64 `json:"Type,omitempty" name:"Type"` 2754} 2755 2756type DescribePolicyConditionListMetric struct { 2757 2758 // 指标配置 2759 // 注意:此字段可能返回 null,表示取不到有效值。 2760 ConfigManual *DescribePolicyConditionListConfigManual `json:"ConfigManual,omitempty" name:"ConfigManual"` 2761 2762 // 指标id 2763 MetricId *int64 `json:"MetricId,omitempty" name:"MetricId"` 2764 2765 // 指标名称 2766 MetricShowName *string `json:"MetricShowName,omitempty" name:"MetricShowName"` 2767 2768 // 指标单位 2769 MetricUnit *string `json:"MetricUnit,omitempty" name:"MetricUnit"` 2770} 2771 2772type DescribePolicyConditionListRequest struct { 2773 *tchttp.BaseRequest 2774 2775 // 固定值,为"monitor" 2776 Module *string `json:"Module,omitempty" name:"Module"` 2777} 2778 2779func (r *DescribePolicyConditionListRequest) ToJsonString() string { 2780 b, _ := json.Marshal(r) 2781 return string(b) 2782} 2783 2784// FromJsonString It is highly **NOT** recommended to use this function 2785// because it has no param check, nor strict type check 2786func (r *DescribePolicyConditionListRequest) FromJsonString(s string) error { 2787 f := make(map[string]interface{}) 2788 if err := json.Unmarshal([]byte(s), &f); err != nil { 2789 return err 2790 } 2791 delete(f, "Module") 2792 if len(f) > 0 { 2793 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePolicyConditionListRequest has unknown keys!", "") 2794 } 2795 return json.Unmarshal([]byte(s), &r) 2796} 2797 2798type DescribePolicyConditionListResponse struct { 2799 *tchttp.BaseResponse 2800 Response *struct { 2801 2802 // 告警策略条件列表 2803 Conditions []*DescribePolicyConditionListCondition `json:"Conditions,omitempty" name:"Conditions"` 2804 2805 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2806 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2807 } `json:"Response"` 2808} 2809 2810func (r *DescribePolicyConditionListResponse) ToJsonString() string { 2811 b, _ := json.Marshal(r) 2812 return string(b) 2813} 2814 2815// FromJsonString It is highly **NOT** recommended to use this function 2816// because it has no param check, nor strict type check 2817func (r *DescribePolicyConditionListResponse) FromJsonString(s string) error { 2818 return json.Unmarshal([]byte(s), &r) 2819} 2820 2821type DescribePolicyGroupInfoCallback struct { 2822 2823 // 用户回调接口地址 2824 CallbackUrl *string `json:"CallbackUrl,omitempty" name:"CallbackUrl"` 2825 2826 // 用户回调接口状态,0表示未验证,1表示已验证,2表示存在url但没有通过验证 2827 ValidFlag *int64 `json:"ValidFlag,omitempty" name:"ValidFlag"` 2828 2829 // 用户回调接口验证码 2830 VerifyCode *string `json:"VerifyCode,omitempty" name:"VerifyCode"` 2831} 2832 2833type DescribePolicyGroupInfoCondition struct { 2834 2835 // 指标名称 2836 MetricShowName *string `json:"MetricShowName,omitempty" name:"MetricShowName"` 2837 2838 // 数据聚合周期(单位秒) 2839 Period *int64 `json:"Period,omitempty" name:"Period"` 2840 2841 // 指标id 2842 MetricId *int64 `json:"MetricId,omitempty" name:"MetricId"` 2843 2844 // 阈值规则id 2845 RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"` 2846 2847 // 指标单位 2848 Unit *string `json:"Unit,omitempty" name:"Unit"` 2849 2850 // 告警发送收敛类型。0连续告警,1指数告警 2851 AlarmNotifyType *int64 `json:"AlarmNotifyType,omitempty" name:"AlarmNotifyType"` 2852 2853 // 告警发送周期单位秒。<0 不触发, 0 只触发一次, >0 每隔triggerTime秒触发一次 2854 AlarmNotifyPeriod *int64 `json:"AlarmNotifyPeriod,omitempty" name:"AlarmNotifyPeriod"` 2855 2856 // 比较类型,1表示大于,2表示大于等于,3表示小于,4表示小于等于,5表示相等,6表示不相等,7表示日同比上涨,8表示日同比下降,9表示周同比上涨,10表示周同比下降,11表示周期环比上涨,12表示周期环比下降 2857 // 注意:此字段可能返回 null,表示取不到有效值。 2858 CalcType *int64 `json:"CalcType,omitempty" name:"CalcType"` 2859 2860 // 检测阈值 2861 // 注意:此字段可能返回 null,表示取不到有效值。 2862 CalcValue *string `json:"CalcValue,omitempty" name:"CalcValue"` 2863 2864 // 持续多长时间触发规则会告警(单位秒) 2865 // 注意:此字段可能返回 null,表示取不到有效值。 2866 ContinueTime *int64 `json:"ContinueTime,omitempty" name:"ContinueTime"` 2867 2868 // 告警指标名 2869 // 注意:此字段可能返回 null,表示取不到有效值。 2870 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 2871} 2872 2873type DescribePolicyGroupInfoConditionTpl struct { 2874 2875 // 策略组id 2876 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 2877 2878 // 策略组名称 2879 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 2880 2881 // 策略类型 2882 ViewName *string `json:"ViewName,omitempty" name:"ViewName"` 2883 2884 // 策略组说明 2885 Remark *string `json:"Remark,omitempty" name:"Remark"` 2886 2887 // 最后编辑的用户uin 2888 LastEditUin *string `json:"LastEditUin,omitempty" name:"LastEditUin"` 2889 2890 // 更新时间 2891 // 注意:此字段可能返回 null,表示取不到有效值。 2892 UpdateTime *int64 `json:"UpdateTime,omitempty" name:"UpdateTime"` 2893 2894 // 创建时间 2895 // 注意:此字段可能返回 null,表示取不到有效值。 2896 InsertTime *int64 `json:"InsertTime,omitempty" name:"InsertTime"` 2897 2898 // 是否且规则 2899 // 注意:此字段可能返回 null,表示取不到有效值。 2900 IsUnionRule *int64 `json:"IsUnionRule,omitempty" name:"IsUnionRule"` 2901} 2902 2903type DescribePolicyGroupInfoEventCondition struct { 2904 2905 // 事件id 2906 EventId *int64 `json:"EventId,omitempty" name:"EventId"` 2907 2908 // 事件告警规则id 2909 RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"` 2910 2911 // 事件名称 2912 EventShowName *string `json:"EventShowName,omitempty" name:"EventShowName"` 2913 2914 // 告警发送周期单位秒。<0 不触发, 0 只触发一次, >0 每隔triggerTime秒触发一次 2915 AlarmNotifyPeriod *int64 `json:"AlarmNotifyPeriod,omitempty" name:"AlarmNotifyPeriod"` 2916 2917 // 告警发送收敛类型。0连续告警,1指数告警 2918 AlarmNotifyType *int64 `json:"AlarmNotifyType,omitempty" name:"AlarmNotifyType"` 2919} 2920 2921type DescribePolicyGroupInfoReceiverInfo struct { 2922 2923 // 告警接收组id列表 2924 ReceiverGroupList []*int64 `json:"ReceiverGroupList,omitempty" name:"ReceiverGroupList"` 2925 2926 // 告警接收人id列表 2927 ReceiverUserList []*int64 `json:"ReceiverUserList,omitempty" name:"ReceiverUserList"` 2928 2929 // 告警时间段开始时间。范围[0,86400),作为unix时间戳转成北京时间后去掉日期,例如7200表示"10:0:0" 2930 StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"` 2931 2932 // 告警时间段结束时间。含义同StartTime 2933 EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"` 2934 2935 // 接收类型。“group”(接收组)或“user”(接收人) 2936 ReceiverType *string `json:"ReceiverType,omitempty" name:"ReceiverType"` 2937 2938 // 告警通知方式。可选 "SMS","SITE","EMAIL","CALL","WECHAT" 2939 NotifyWay []*string `json:"NotifyWay,omitempty" name:"NotifyWay"` 2940 2941 // 电话告警接收者uid 2942 // 注意:此字段可能返回 null,表示取不到有效值。 2943 UidList []*int64 `json:"UidList,omitempty" name:"UidList"` 2944 2945 // 电话告警轮数 2946 RoundNumber *int64 `json:"RoundNumber,omitempty" name:"RoundNumber"` 2947 2948 // 电话告警每轮间隔(秒) 2949 RoundInterval *int64 `json:"RoundInterval,omitempty" name:"RoundInterval"` 2950 2951 // 电话告警对个人间隔(秒) 2952 PersonInterval *int64 `json:"PersonInterval,omitempty" name:"PersonInterval"` 2953 2954 // 是否需要电话告警触达提示。0不需要,1需要 2955 NeedSendNotice *int64 `json:"NeedSendNotice,omitempty" name:"NeedSendNotice"` 2956 2957 // 电话告警通知时机。可选"OCCUR"(告警时通知),"RECOVER"(恢复时通知) 2958 SendFor []*string `json:"SendFor,omitempty" name:"SendFor"` 2959 2960 // 恢复通知方式。可选"SMS" 2961 RecoverNotify []*string `json:"RecoverNotify,omitempty" name:"RecoverNotify"` 2962 2963 // 告警发送语言 2964 // 注意:此字段可能返回 null,表示取不到有效值。 2965 ReceiveLanguage *string `json:"ReceiveLanguage,omitempty" name:"ReceiveLanguage"` 2966} 2967 2968type DescribePolicyGroupInfoRequest struct { 2969 *tchttp.BaseRequest 2970 2971 // 固定值,为"monitor" 2972 Module *string `json:"Module,omitempty" name:"Module"` 2973 2974 // 策略组id 2975 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 2976} 2977 2978func (r *DescribePolicyGroupInfoRequest) ToJsonString() string { 2979 b, _ := json.Marshal(r) 2980 return string(b) 2981} 2982 2983// FromJsonString It is highly **NOT** recommended to use this function 2984// because it has no param check, nor strict type check 2985func (r *DescribePolicyGroupInfoRequest) FromJsonString(s string) error { 2986 f := make(map[string]interface{}) 2987 if err := json.Unmarshal([]byte(s), &f); err != nil { 2988 return err 2989 } 2990 delete(f, "Module") 2991 delete(f, "GroupId") 2992 if len(f) > 0 { 2993 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePolicyGroupInfoRequest has unknown keys!", "") 2994 } 2995 return json.Unmarshal([]byte(s), &r) 2996} 2997 2998type DescribePolicyGroupInfoResponse struct { 2999 *tchttp.BaseResponse 3000 Response *struct { 3001 3002 // 策略组名称 3003 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 3004 3005 // 策略组所属的项目id 3006 ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` 3007 3008 // 是否为默认策略,0表示非默认策略,1表示默认策略 3009 IsDefault *int64 `json:"IsDefault,omitempty" name:"IsDefault"` 3010 3011 // 策略类型 3012 ViewName *string `json:"ViewName,omitempty" name:"ViewName"` 3013 3014 // 策略说明 3015 Remark *string `json:"Remark,omitempty" name:"Remark"` 3016 3017 // 策略类型名称 3018 ShowName *string `json:"ShowName,omitempty" name:"ShowName"` 3019 3020 // 最近编辑的用户uin 3021 LastEditUin *string `json:"LastEditUin,omitempty" name:"LastEditUin"` 3022 3023 // 最近编辑时间 3024 UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` 3025 3026 // 该策略支持的地域 3027 Region []*string `json:"Region,omitempty" name:"Region"` 3028 3029 // 策略类型的维度列表 3030 DimensionGroup []*string `json:"DimensionGroup,omitempty" name:"DimensionGroup"` 3031 3032 // 阈值规则列表 3033 // 注意:此字段可能返回 null,表示取不到有效值。 3034 ConditionsConfig []*DescribePolicyGroupInfoCondition `json:"ConditionsConfig,omitempty" name:"ConditionsConfig"` 3035 3036 // 产品事件规则列表 3037 // 注意:此字段可能返回 null,表示取不到有效值。 3038 EventConfig []*DescribePolicyGroupInfoEventCondition `json:"EventConfig,omitempty" name:"EventConfig"` 3039 3040 // 用户接收人列表 3041 // 注意:此字段可能返回 null,表示取不到有效值。 3042 ReceiverInfos []*DescribePolicyGroupInfoReceiverInfo `json:"ReceiverInfos,omitempty" name:"ReceiverInfos"` 3043 3044 // 用户回调信息 3045 // 注意:此字段可能返回 null,表示取不到有效值。 3046 Callback *DescribePolicyGroupInfoCallback `json:"Callback,omitempty" name:"Callback"` 3047 3048 // 模板策略组 3049 // 注意:此字段可能返回 null,表示取不到有效值。 3050 ConditionsTemp *DescribePolicyGroupInfoConditionTpl `json:"ConditionsTemp,omitempty" name:"ConditionsTemp"` 3051 3052 // 是否可以设置成默认策略 3053 CanSetDefault *bool `json:"CanSetDefault,omitempty" name:"CanSetDefault"` 3054 3055 // 是否且规则 3056 // 注意:此字段可能返回 null,表示取不到有效值。 3057 IsUnionRule *int64 `json:"IsUnionRule,omitempty" name:"IsUnionRule"` 3058 3059 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3060 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3061 } `json:"Response"` 3062} 3063 3064func (r *DescribePolicyGroupInfoResponse) ToJsonString() string { 3065 b, _ := json.Marshal(r) 3066 return string(b) 3067} 3068 3069// FromJsonString It is highly **NOT** recommended to use this function 3070// because it has no param check, nor strict type check 3071func (r *DescribePolicyGroupInfoResponse) FromJsonString(s string) error { 3072 return json.Unmarshal([]byte(s), &r) 3073} 3074 3075type DescribePolicyGroupListGroup struct { 3076 3077 // 策略组id 3078 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 3079 3080 // 策略组名称 3081 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 3082 3083 // 是否开启 3084 IsOpen *bool `json:"IsOpen,omitempty" name:"IsOpen"` 3085 3086 // 策略视图名称 3087 ViewName *string `json:"ViewName,omitempty" name:"ViewName"` 3088 3089 // 最近编辑的用户uin 3090 LastEditUin *string `json:"LastEditUin,omitempty" name:"LastEditUin"` 3091 3092 // 最后修改时间 3093 UpdateTime *int64 `json:"UpdateTime,omitempty" name:"UpdateTime"` 3094 3095 // 创建时间 3096 InsertTime *int64 `json:"InsertTime,omitempty" name:"InsertTime"` 3097 3098 // 策略组绑定的实例数 3099 UseSum *int64 `json:"UseSum,omitempty" name:"UseSum"` 3100 3101 // 策略组绑定的未屏蔽实例数 3102 NoShieldedSum *int64 `json:"NoShieldedSum,omitempty" name:"NoShieldedSum"` 3103 3104 // 是否为默认策略,0表示非默认策略,1表示默认策略 3105 IsDefault *int64 `json:"IsDefault,omitempty" name:"IsDefault"` 3106 3107 // 是否可以设置成默认策略 3108 CanSetDefault *bool `json:"CanSetDefault,omitempty" name:"CanSetDefault"` 3109 3110 // 父策略组id 3111 ParentGroupId *int64 `json:"ParentGroupId,omitempty" name:"ParentGroupId"` 3112 3113 // 策略组备注 3114 Remark *string `json:"Remark,omitempty" name:"Remark"` 3115 3116 // 策略组所属项目id 3117 ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` 3118 3119 // 阈值规则列表 3120 // 注意:此字段可能返回 null,表示取不到有效值。 3121 Conditions []*DescribePolicyGroupInfoCondition `json:"Conditions,omitempty" name:"Conditions"` 3122 3123 // 产品事件规则列表 3124 // 注意:此字段可能返回 null,表示取不到有效值。 3125 EventConditions []*DescribePolicyGroupInfoEventCondition `json:"EventConditions,omitempty" name:"EventConditions"` 3126 3127 // 用户接收人列表 3128 // 注意:此字段可能返回 null,表示取不到有效值。 3129 ReceiverInfos []*DescribePolicyGroupInfoReceiverInfo `json:"ReceiverInfos,omitempty" name:"ReceiverInfos"` 3130 3131 // 模板策略组 3132 // 注意:此字段可能返回 null,表示取不到有效值。 3133 ConditionsTemp *DescribePolicyGroupInfoConditionTpl `json:"ConditionsTemp,omitempty" name:"ConditionsTemp"` 3134 3135 // 策略组绑定的实例组信息 3136 // 注意:此字段可能返回 null,表示取不到有效值。 3137 InstanceGroup *DescribePolicyGroupListGroupInstanceGroup `json:"InstanceGroup,omitempty" name:"InstanceGroup"` 3138 3139 // 且或规则标识, 0表示或规则(任意一条规则满足阈值条件就告警), 1表示且规则(所有规则都满足阈值条件才告警) 3140 // 注意:此字段可能返回 null,表示取不到有效值。 3141 IsUnionRule *int64 `json:"IsUnionRule,omitempty" name:"IsUnionRule"` 3142} 3143 3144type DescribePolicyGroupListGroupInstanceGroup struct { 3145 3146 // 实例分组名称id 3147 InstanceGroupId *int64 `json:"InstanceGroupId,omitempty" name:"InstanceGroupId"` 3148 3149 // 策略类型视图名称 3150 ViewName *string `json:"ViewName,omitempty" name:"ViewName"` 3151 3152 // 最近编辑的用户uin 3153 LastEditUin *string `json:"LastEditUin,omitempty" name:"LastEditUin"` 3154 3155 // 实例分组名称 3156 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 3157 3158 // 实例数量 3159 InstanceSum *int64 `json:"InstanceSum,omitempty" name:"InstanceSum"` 3160 3161 // 更新时间 3162 UpdateTime *int64 `json:"UpdateTime,omitempty" name:"UpdateTime"` 3163 3164 // 创建时间 3165 InsertTime *int64 `json:"InsertTime,omitempty" name:"InsertTime"` 3166} 3167 3168type DescribePolicyGroupListRequest struct { 3169 *tchttp.BaseRequest 3170 3171 // 固定值,为"monitor" 3172 Module *string `json:"Module,omitempty" name:"Module"` 3173 3174 // 分页参数,每页返回的数量,取值1~100 3175 Limit *int64 `json:"Limit,omitempty" name:"Limit"` 3176 3177 // 分页参数,页偏移量,从0开始计数 3178 Offset *int64 `json:"Offset,omitempty" name:"Offset"` 3179 3180 // 按策略名搜索 3181 Like *string `json:"Like,omitempty" name:"Like"` 3182 3183 // 实例分组id 3184 InstanceGroupId *int64 `json:"InstanceGroupId,omitempty" name:"InstanceGroupId"` 3185 3186 // 按更新时间排序, asc 或者 desc 3187 UpdateTimeOrder *string `json:"UpdateTimeOrder,omitempty" name:"UpdateTimeOrder"` 3188 3189 // 项目id列表 3190 ProjectIds []*int64 `json:"ProjectIds,omitempty" name:"ProjectIds"` 3191 3192 // 告警策略类型列表 3193 ViewNames []*string `json:"ViewNames,omitempty" name:"ViewNames"` 3194 3195 // 是否过滤无接收人策略组, 1表示过滤, 0表示不过滤 3196 FilterUnuseReceiver *int64 `json:"FilterUnuseReceiver,omitempty" name:"FilterUnuseReceiver"` 3197 3198 // 过滤条件, 接收组列表 3199 Receivers []*string `json:"Receivers,omitempty" name:"Receivers"` 3200 3201 // 过滤条件, 接收人列表 3202 ReceiverUserList []*string `json:"ReceiverUserList,omitempty" name:"ReceiverUserList"` 3203 3204 // 维度组合字段(json字符串), 例如[[{"name":"unInstanceId","value":"ins-6e4b2aaa"}]] 3205 Dimensions *string `json:"Dimensions,omitempty" name:"Dimensions"` 3206 3207 // 模板策略组id, 多个id用逗号分隔 3208 ConditionTempGroupId *string `json:"ConditionTempGroupId,omitempty" name:"ConditionTempGroupId"` 3209 3210 // 过滤条件, 接收人或者接收组, user表示接收人, group表示接收组 3211 ReceiverType *string `json:"ReceiverType,omitempty" name:"ReceiverType"` 3212 3213 // 过滤条件,告警策略是否已启动或停止 3214 IsOpen *bool `json:"IsOpen,omitempty" name:"IsOpen"` 3215} 3216 3217func (r *DescribePolicyGroupListRequest) ToJsonString() string { 3218 b, _ := json.Marshal(r) 3219 return string(b) 3220} 3221 3222// FromJsonString It is highly **NOT** recommended to use this function 3223// because it has no param check, nor strict type check 3224func (r *DescribePolicyGroupListRequest) FromJsonString(s string) error { 3225 f := make(map[string]interface{}) 3226 if err := json.Unmarshal([]byte(s), &f); err != nil { 3227 return err 3228 } 3229 delete(f, "Module") 3230 delete(f, "Limit") 3231 delete(f, "Offset") 3232 delete(f, "Like") 3233 delete(f, "InstanceGroupId") 3234 delete(f, "UpdateTimeOrder") 3235 delete(f, "ProjectIds") 3236 delete(f, "ViewNames") 3237 delete(f, "FilterUnuseReceiver") 3238 delete(f, "Receivers") 3239 delete(f, "ReceiverUserList") 3240 delete(f, "Dimensions") 3241 delete(f, "ConditionTempGroupId") 3242 delete(f, "ReceiverType") 3243 delete(f, "IsOpen") 3244 if len(f) > 0 { 3245 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePolicyGroupListRequest has unknown keys!", "") 3246 } 3247 return json.Unmarshal([]byte(s), &r) 3248} 3249 3250type DescribePolicyGroupListResponse struct { 3251 *tchttp.BaseResponse 3252 Response *struct { 3253 3254 // 策略组列表 3255 // 注意:此字段可能返回 null,表示取不到有效值。 3256 GroupList []*DescribePolicyGroupListGroup `json:"GroupList,omitempty" name:"GroupList"` 3257 3258 // 策略组总数 3259 Total *int64 `json:"Total,omitempty" name:"Total"` 3260 3261 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3262 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3263 } `json:"Response"` 3264} 3265 3266func (r *DescribePolicyGroupListResponse) ToJsonString() string { 3267 b, _ := json.Marshal(r) 3268 return string(b) 3269} 3270 3271// FromJsonString It is highly **NOT** recommended to use this function 3272// because it has no param check, nor strict type check 3273func (r *DescribePolicyGroupListResponse) FromJsonString(s string) error { 3274 return json.Unmarshal([]byte(s), &r) 3275} 3276 3277type DescribeProductEventListDimensions struct { 3278 3279 // 维度名 3280 Name *string `json:"Name,omitempty" name:"Name"` 3281 3282 // 维度值 3283 Value *string `json:"Value,omitempty" name:"Value"` 3284} 3285 3286type DescribeProductEventListEvents struct { 3287 3288 // 事件ID 3289 // 注意:此字段可能返回 null,表示取不到有效值。 3290 EventId *int64 `json:"EventId,omitempty" name:"EventId"` 3291 3292 // 事件中文名 3293 // 注意:此字段可能返回 null,表示取不到有效值。 3294 EventCName *string `json:"EventCName,omitempty" name:"EventCName"` 3295 3296 // 事件英文名 3297 // 注意:此字段可能返回 null,表示取不到有效值。 3298 EventEName *string `json:"EventEName,omitempty" name:"EventEName"` 3299 3300 // 事件简称 3301 // 注意:此字段可能返回 null,表示取不到有效值。 3302 EventName *string `json:"EventName,omitempty" name:"EventName"` 3303 3304 // 产品中文名 3305 // 注意:此字段可能返回 null,表示取不到有效值。 3306 ProductCName *string `json:"ProductCName,omitempty" name:"ProductCName"` 3307 3308 // 产品英文名 3309 // 注意:此字段可能返回 null,表示取不到有效值。 3310 ProductEName *string `json:"ProductEName,omitempty" name:"ProductEName"` 3311 3312 // 产品简称 3313 // 注意:此字段可能返回 null,表示取不到有效值。 3314 ProductName *string `json:"ProductName,omitempty" name:"ProductName"` 3315 3316 // 实例ID 3317 // 注意:此字段可能返回 null,表示取不到有效值。 3318 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 3319 3320 // 实例名称 3321 // 注意:此字段可能返回 null,表示取不到有效值。 3322 InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` 3323 3324 // 项目ID 3325 // 注意:此字段可能返回 null,表示取不到有效值。 3326 ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"` 3327 3328 // 地域 3329 // 注意:此字段可能返回 null,表示取不到有效值。 3330 Region *string `json:"Region,omitempty" name:"Region"` 3331 3332 // 状态 3333 // 注意:此字段可能返回 null,表示取不到有效值。 3334 Status *string `json:"Status,omitempty" name:"Status"` 3335 3336 // 是否支持告警 3337 // 注意:此字段可能返回 null,表示取不到有效值。 3338 SupportAlarm *int64 `json:"SupportAlarm,omitempty" name:"SupportAlarm"` 3339 3340 // 事件类型 3341 // 注意:此字段可能返回 null,表示取不到有效值。 3342 Type *string `json:"Type,omitempty" name:"Type"` 3343 3344 // 开始时间 3345 // 注意:此字段可能返回 null,表示取不到有效值。 3346 StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"` 3347 3348 // 更新时间 3349 // 注意:此字段可能返回 null,表示取不到有效值。 3350 UpdateTime *int64 `json:"UpdateTime,omitempty" name:"UpdateTime"` 3351 3352 // 实例对象信息 3353 // 注意:此字段可能返回 null,表示取不到有效值。 3354 Dimensions []*DescribeProductEventListEventsDimensions `json:"Dimensions,omitempty" name:"Dimensions"` 3355 3356 // 实例对象附加信息 3357 // 注意:此字段可能返回 null,表示取不到有效值。 3358 AdditionMsg []*DescribeProductEventListEventsDimensions `json:"AdditionMsg,omitempty" name:"AdditionMsg"` 3359 3360 // 是否配置告警 3361 // 注意:此字段可能返回 null,表示取不到有效值。 3362 IsAlarmConfig *int64 `json:"IsAlarmConfig,omitempty" name:"IsAlarmConfig"` 3363 3364 // 策略信息 3365 // 注意:此字段可能返回 null,表示取不到有效值。 3366 GroupInfo []*DescribeProductEventListEventsGroupInfo `json:"GroupInfo,omitempty" name:"GroupInfo"` 3367 3368 // 显示名称ViewName 3369 // 注意:此字段可能返回 null,表示取不到有效值。 3370 ViewName *string `json:"ViewName,omitempty" name:"ViewName"` 3371} 3372 3373type DescribeProductEventListEventsDimensions struct { 3374 3375 // 维度名(英文) 3376 // 注意:此字段可能返回 null,表示取不到有效值。 3377 Key *string `json:"Key,omitempty" name:"Key"` 3378 3379 // 维度名(中文) 3380 // 注意:此字段可能返回 null,表示取不到有效值。 3381 Name *string `json:"Name,omitempty" name:"Name"` 3382 3383 // 维度值 3384 // 注意:此字段可能返回 null,表示取不到有效值。 3385 Value *string `json:"Value,omitempty" name:"Value"` 3386} 3387 3388type DescribeProductEventListEventsGroupInfo struct { 3389 3390 // 策略ID 3391 // 注意:此字段可能返回 null,表示取不到有效值。 3392 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 3393 3394 // 策略名 3395 // 注意:此字段可能返回 null,表示取不到有效值。 3396 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 3397} 3398 3399type DescribeProductEventListOverView struct { 3400 3401 // 状态变更的事件数量 3402 // 注意:此字段可能返回 null,表示取不到有效值。 3403 StatusChangeAmount *int64 `json:"StatusChangeAmount,omitempty" name:"StatusChangeAmount"` 3404 3405 // 告警状态未配置的事件数量 3406 // 注意:此字段可能返回 null,表示取不到有效值。 3407 UnConfigAlarmAmount *int64 `json:"UnConfigAlarmAmount,omitempty" name:"UnConfigAlarmAmount"` 3408 3409 // 异常事件数量 3410 // 注意:此字段可能返回 null,表示取不到有效值。 3411 UnNormalEventAmount *int64 `json:"UnNormalEventAmount,omitempty" name:"UnNormalEventAmount"` 3412 3413 // 未恢复的事件数量 3414 // 注意:此字段可能返回 null,表示取不到有效值。 3415 UnRecoverAmount *int64 `json:"UnRecoverAmount,omitempty" name:"UnRecoverAmount"` 3416} 3417 3418type DescribeProductEventListRequest struct { 3419 *tchttp.BaseRequest 3420 3421 // 接口模块名,固定值"monitor" 3422 Module *string `json:"Module,omitempty" name:"Module"` 3423 3424 // 产品类型过滤,比如"cvm"表示云服务器 3425 ProductName []*string `json:"ProductName,omitempty" name:"ProductName"` 3426 3427 // 事件名称过滤,比如"guest_reboot"表示机器重启 3428 EventName []*string `json:"EventName,omitempty" name:"EventName"` 3429 3430 // 影响对象,比如"ins-19708ino" 3431 InstanceId []*string `json:"InstanceId,omitempty" name:"InstanceId"` 3432 3433 // 维度过滤,比如外网IP:10.0.0.1 3434 Dimensions []*DescribeProductEventListDimensions `json:"Dimensions,omitempty" name:"Dimensions"` 3435 3436 // 产品事件地域过滤参数,比如gz,各地域缩写可参见[地域列表](https://cloud.tencent.com/document/product/248/50863) 3437 RegionList []*string `json:"RegionList,omitempty" name:"RegionList"` 3438 3439 // 事件类型过滤,取值范围["status_change","abnormal"],分别表示状态变更、异常事件 3440 Type []*string `json:"Type,omitempty" name:"Type"` 3441 3442 // 事件状态过滤,取值范围["recover","alarm","-"],分别表示已恢复、未恢复、无状态 3443 Status []*string `json:"Status,omitempty" name:"Status"` 3444 3445 // 项目ID过滤 3446 Project []*string `json:"Project,omitempty" name:"Project"` 3447 3448 // 告警状态配置过滤,1表示已配置,0表示未配置 3449 IsAlarmConfig *int64 `json:"IsAlarmConfig,omitempty" name:"IsAlarmConfig"` 3450 3451 // 按更新时间排序,ASC表示升序,DESC表示降序,默认DESC 3452 TimeOrder *string `json:"TimeOrder,omitempty" name:"TimeOrder"` 3453 3454 // 起始时间,默认一天前的时间戳 3455 StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"` 3456 3457 // 结束时间,默认当前时间戳 3458 EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"` 3459 3460 // 页偏移量,默认0 3461 Offset *int64 `json:"Offset,omitempty" name:"Offset"` 3462 3463 // 每页返回的数量,默认20 3464 Limit *int64 `json:"Limit,omitempty" name:"Limit"` 3465} 3466 3467func (r *DescribeProductEventListRequest) ToJsonString() string { 3468 b, _ := json.Marshal(r) 3469 return string(b) 3470} 3471 3472// FromJsonString It is highly **NOT** recommended to use this function 3473// because it has no param check, nor strict type check 3474func (r *DescribeProductEventListRequest) FromJsonString(s string) error { 3475 f := make(map[string]interface{}) 3476 if err := json.Unmarshal([]byte(s), &f); err != nil { 3477 return err 3478 } 3479 delete(f, "Module") 3480 delete(f, "ProductName") 3481 delete(f, "EventName") 3482 delete(f, "InstanceId") 3483 delete(f, "Dimensions") 3484 delete(f, "RegionList") 3485 delete(f, "Type") 3486 delete(f, "Status") 3487 delete(f, "Project") 3488 delete(f, "IsAlarmConfig") 3489 delete(f, "TimeOrder") 3490 delete(f, "StartTime") 3491 delete(f, "EndTime") 3492 delete(f, "Offset") 3493 delete(f, "Limit") 3494 if len(f) > 0 { 3495 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeProductEventListRequest has unknown keys!", "") 3496 } 3497 return json.Unmarshal([]byte(s), &r) 3498} 3499 3500type DescribeProductEventListResponse struct { 3501 *tchttp.BaseResponse 3502 Response *struct { 3503 3504 // 事件列表 3505 // 注意:此字段可能返回 null,表示取不到有效值。 3506 Events []*DescribeProductEventListEvents `json:"Events,omitempty" name:"Events"` 3507 3508 // 事件统计 3509 OverView *DescribeProductEventListOverView `json:"OverView,omitempty" name:"OverView"` 3510 3511 // 事件总数 3512 // 注意:此字段可能返回 null,表示取不到有效值。 3513 Total *int64 `json:"Total,omitempty" name:"Total"` 3514 3515 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3516 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3517 } `json:"Response"` 3518} 3519 3520func (r *DescribeProductEventListResponse) ToJsonString() string { 3521 b, _ := json.Marshal(r) 3522 return string(b) 3523} 3524 3525// FromJsonString It is highly **NOT** recommended to use this function 3526// because it has no param check, nor strict type check 3527func (r *DescribeProductEventListResponse) FromJsonString(s string) error { 3528 return json.Unmarshal([]byte(s), &r) 3529} 3530 3531type DescribeProductListRequest struct { 3532 *tchttp.BaseRequest 3533 3534 // 固定传值monitor 3535 Module *string `json:"Module,omitempty" name:"Module"` 3536 3537 // 排序方式:DESC/ASC(区分大小写),默认值DESC 3538 Order *string `json:"Order,omitempty" name:"Order"` 3539 3540 // 分页查询的偏移量,默认值0 3541 Offset *uint64 `json:"Offset,omitempty" name:"Offset"` 3542 3543 // 分页查询的每页数据量,默认值20 3544 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` 3545} 3546 3547func (r *DescribeProductListRequest) ToJsonString() string { 3548 b, _ := json.Marshal(r) 3549 return string(b) 3550} 3551 3552// FromJsonString It is highly **NOT** recommended to use this function 3553// because it has no param check, nor strict type check 3554func (r *DescribeProductListRequest) FromJsonString(s string) error { 3555 f := make(map[string]interface{}) 3556 if err := json.Unmarshal([]byte(s), &f); err != nil { 3557 return err 3558 } 3559 delete(f, "Module") 3560 delete(f, "Order") 3561 delete(f, "Offset") 3562 delete(f, "Limit") 3563 if len(f) > 0 { 3564 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeProductListRequest has unknown keys!", "") 3565 } 3566 return json.Unmarshal([]byte(s), &r) 3567} 3568 3569type DescribeProductListResponse struct { 3570 *tchttp.BaseResponse 3571 Response *struct { 3572 3573 // 产品信息列表 3574 // 注意:此字段可能返回 null,表示取不到有效值。 3575 ProductList []*ProductSimple `json:"ProductList,omitempty" name:"ProductList"` 3576 3577 // 产品总数 3578 // 注意:此字段可能返回 null,表示取不到有效值。 3579 TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` 3580 3581 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3582 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3583 } `json:"Response"` 3584} 3585 3586func (r *DescribeProductListResponse) ToJsonString() string { 3587 b, _ := json.Marshal(r) 3588 return string(b) 3589} 3590 3591// FromJsonString It is highly **NOT** recommended to use this function 3592// because it has no param check, nor strict type check 3593func (r *DescribeProductListResponse) FromJsonString(s string) error { 3594 return json.Unmarshal([]byte(s), &r) 3595} 3596 3597type DescribeServiceDiscoveryRequest struct { 3598 *tchttp.BaseRequest 3599 3600 // Prometheus 实例 ID 3601 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 3602 3603 // <li>类型是 TKE,为对应的腾讯云容器服务集群 ID</li> 3604 KubeClusterId *string `json:"KubeClusterId,omitempty" name:"KubeClusterId"` 3605 3606 // 用户 Kubernetes 集群类型: 3607 // <li> 1 = 容器服务集群(TKE) </li> 3608 KubeType *int64 `json:"KubeType,omitempty" name:"KubeType"` 3609} 3610 3611func (r *DescribeServiceDiscoveryRequest) ToJsonString() string { 3612 b, _ := json.Marshal(r) 3613 return string(b) 3614} 3615 3616// FromJsonString It is highly **NOT** recommended to use this function 3617// because it has no param check, nor strict type check 3618func (r *DescribeServiceDiscoveryRequest) FromJsonString(s string) error { 3619 f := make(map[string]interface{}) 3620 if err := json.Unmarshal([]byte(s), &f); err != nil { 3621 return err 3622 } 3623 delete(f, "InstanceId") 3624 delete(f, "KubeClusterId") 3625 delete(f, "KubeType") 3626 if len(f) > 0 { 3627 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeServiceDiscoveryRequest has unknown keys!", "") 3628 } 3629 return json.Unmarshal([]byte(s), &r) 3630} 3631 3632type DescribeServiceDiscoveryResponse struct { 3633 *tchttp.BaseResponse 3634 Response *struct { 3635 3636 // 返回服务发现列表信息 3637 // 注意:此字段可能返回 null,表示取不到有效值。 3638 ServiceDiscoverySet []*ServiceDiscoveryItem `json:"ServiceDiscoverySet,omitempty" name:"ServiceDiscoverySet"` 3639 3640 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3641 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3642 } `json:"Response"` 3643} 3644 3645func (r *DescribeServiceDiscoveryResponse) ToJsonString() string { 3646 b, _ := json.Marshal(r) 3647 return string(b) 3648} 3649 3650// FromJsonString It is highly **NOT** recommended to use this function 3651// because it has no param check, nor strict type check 3652func (r *DescribeServiceDiscoveryResponse) FromJsonString(s string) error { 3653 return json.Unmarshal([]byte(s), &r) 3654} 3655 3656type DescribeStatisticDataRequest struct { 3657 *tchttp.BaseRequest 3658 3659 // 所属模块,固定值,为monitor 3660 Module *string `json:"Module,omitempty" name:"Module"` 3661 3662 // 命名空间,目前只支持QCE/TKE 3663 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 3664 3665 // 指标名列表 3666 MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"` 3667 3668 // 维度条件,操作符支持=、in 3669 Conditions []*MidQueryCondition `json:"Conditions,omitempty" name:"Conditions"` 3670 3671 // 统计粒度。默认取值为300,单位为s 3672 Period *uint64 `json:"Period,omitempty" name:"Period"` 3673 3674 // 起始时间,默认为当前时间,如2020-12-08T19:51:23+08:00 3675 StartTime *string `json:"StartTime,omitempty" name:"StartTime"` 3676 3677 // 结束时间,默认为当前时间,如2020-12-08T19:51:23+08:00 3678 EndTime *string `json:"EndTime,omitempty" name:"EndTime"` 3679 3680 // 按指定维度groupBy 3681 GroupBys []*string `json:"GroupBys,omitempty" name:"GroupBys"` 3682} 3683 3684func (r *DescribeStatisticDataRequest) ToJsonString() string { 3685 b, _ := json.Marshal(r) 3686 return string(b) 3687} 3688 3689// FromJsonString It is highly **NOT** recommended to use this function 3690// because it has no param check, nor strict type check 3691func (r *DescribeStatisticDataRequest) FromJsonString(s string) error { 3692 f := make(map[string]interface{}) 3693 if err := json.Unmarshal([]byte(s), &f); err != nil { 3694 return err 3695 } 3696 delete(f, "Module") 3697 delete(f, "Namespace") 3698 delete(f, "MetricNames") 3699 delete(f, "Conditions") 3700 delete(f, "Period") 3701 delete(f, "StartTime") 3702 delete(f, "EndTime") 3703 delete(f, "GroupBys") 3704 if len(f) > 0 { 3705 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeStatisticDataRequest has unknown keys!", "") 3706 } 3707 return json.Unmarshal([]byte(s), &r) 3708} 3709 3710type DescribeStatisticDataResponse struct { 3711 *tchttp.BaseResponse 3712 Response *struct { 3713 3714 // 统计周期 3715 Period *uint64 `json:"Period,omitempty" name:"Period"` 3716 3717 // 开始时间 3718 StartTime *string `json:"StartTime,omitempty" name:"StartTime"` 3719 3720 // 结束时间 3721 EndTime *string `json:"EndTime,omitempty" name:"EndTime"` 3722 3723 // 监控数据 3724 Data []*MetricData `json:"Data,omitempty" name:"Data"` 3725 3726 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3727 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3728 } `json:"Response"` 3729} 3730 3731func (r *DescribeStatisticDataResponse) ToJsonString() string { 3732 b, _ := json.Marshal(r) 3733 return string(b) 3734} 3735 3736// FromJsonString It is highly **NOT** recommended to use this function 3737// because it has no param check, nor strict type check 3738func (r *DescribeStatisticDataResponse) FromJsonString(s string) error { 3739 return json.Unmarshal([]byte(s), &r) 3740} 3741 3742type Dimension struct { 3743 3744 // 实例维度名称 3745 Name *string `json:"Name,omitempty" name:"Name"` 3746 3747 // 实例维度值 3748 Value *string `json:"Value,omitempty" name:"Value"` 3749} 3750 3751type DimensionsDesc struct { 3752 3753 // 维度名数组 3754 Dimensions []*string `json:"Dimensions,omitempty" name:"Dimensions"` 3755} 3756 3757type GetMonitorDataRequest struct { 3758 *tchttp.BaseRequest 3759 3760 // 命名空间,如QCE/CVM。各个云产品的详细命名空间说明请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档 3761 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 3762 3763 // 指标名称,如CPUUsage,仅支持单指标拉取。各个云产品的详细指标说明请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档,对应的指标英文名即为MetricName 3764 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 3765 3766 // 实例对象的维度组合,格式为key-value键值对形式的集合。不同类型的实例字段完全不同,如CVM为[{"Name":"InstanceId","Value":"ins-j0hk02zo"}],Ckafka为[{"Name":"instanceId","Value":"ckafka-l49k54dd"}],COS为[{"Name":"appid","Value":"1258344699"},{"Name":"bucket","Value":"rig-1258344699"}]。各个云产品的维度请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档,对应的维度列即为维度组合的key,value为key对应的值。单请求最多支持批量拉取10个实例的监控数据。 3767 Instances []*Instance `json:"Instances,omitempty" name:"Instances"` 3768 3769 // 监控统计周期,如60。默认为取值为300,单位为s。每个指标支持的统计周期不一定相同,各个云产品支持的统计周期请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档,对应的统计周期列即为支持的统计周期。单请求的数据点数限制为1440个。 3770 Period *uint64 `json:"Period,omitempty" name:"Period"` 3771 3772 // 起始时间,如2018-09-22T19:51:23+08:00 3773 StartTime *string `json:"StartTime,omitempty" name:"StartTime"` 3774 3775 // 结束时间,如2018-09-22T20:51:23+08:00,默认为当前时间。 EndTime不能小于StartTime 3776 EndTime *string `json:"EndTime,omitempty" name:"EndTime"` 3777} 3778 3779func (r *GetMonitorDataRequest) ToJsonString() string { 3780 b, _ := json.Marshal(r) 3781 return string(b) 3782} 3783 3784// FromJsonString It is highly **NOT** recommended to use this function 3785// because it has no param check, nor strict type check 3786func (r *GetMonitorDataRequest) FromJsonString(s string) error { 3787 f := make(map[string]interface{}) 3788 if err := json.Unmarshal([]byte(s), &f); err != nil { 3789 return err 3790 } 3791 delete(f, "Namespace") 3792 delete(f, "MetricName") 3793 delete(f, "Instances") 3794 delete(f, "Period") 3795 delete(f, "StartTime") 3796 delete(f, "EndTime") 3797 if len(f) > 0 { 3798 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetMonitorDataRequest has unknown keys!", "") 3799 } 3800 return json.Unmarshal([]byte(s), &r) 3801} 3802 3803type GetMonitorDataResponse struct { 3804 *tchttp.BaseResponse 3805 Response *struct { 3806 3807 // 统计周期 3808 Period *uint64 `json:"Period,omitempty" name:"Period"` 3809 3810 // 指标名 3811 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 3812 3813 // 数据点数组 3814 DataPoints []*DataPoint `json:"DataPoints,omitempty" name:"DataPoints"` 3815 3816 // 开始时间 3817 StartTime *string `json:"StartTime,omitempty" name:"StartTime"` 3818 3819 // 结束时间 3820 EndTime *string `json:"EndTime,omitempty" name:"EndTime"` 3821 3822 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3823 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3824 } `json:"Response"` 3825} 3826 3827func (r *GetMonitorDataResponse) ToJsonString() string { 3828 b, _ := json.Marshal(r) 3829 return string(b) 3830} 3831 3832// FromJsonString It is highly **NOT** recommended to use this function 3833// because it has no param check, nor strict type check 3834func (r *GetMonitorDataResponse) FromJsonString(s string) error { 3835 return json.Unmarshal([]byte(s), &r) 3836} 3837 3838type Instance struct { 3839 3840 // 实例的维度组合 3841 Dimensions []*Dimension `json:"Dimensions,omitempty" name:"Dimensions"` 3842} 3843 3844type InstanceGroup struct { 3845 3846 // 实例组ID 3847 // 注意:此字段可能返回 null,表示取不到有效值。 3848 InstanceGroupId *int64 `json:"InstanceGroupId,omitempty" name:"InstanceGroupId"` 3849 3850 // 实例组名 3851 // 注意:此字段可能返回 null,表示取不到有效值。 3852 InstanceGroupName *string `json:"InstanceGroupName,omitempty" name:"InstanceGroupName"` 3853} 3854 3855type InstanceGroups struct { 3856 3857 // 实例组 Id 3858 Id *int64 `json:"Id,omitempty" name:"Id"` 3859 3860 // 实例组名称 3861 Name *string `json:"Name,omitempty" name:"Name"` 3862} 3863 3864type Metric struct { 3865 3866 // 告警策略类型 3867 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 3868 3869 // 指标名 3870 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 3871 3872 // 指标展示名 3873 Description *string `json:"Description,omitempty" name:"Description"` 3874 3875 // 最小值 3876 Min *float64 `json:"Min,omitempty" name:"Min"` 3877 3878 // 最大值 3879 Max *float64 `json:"Max,omitempty" name:"Max"` 3880 3881 // 维度列表 3882 Dimensions []*string `json:"Dimensions,omitempty" name:"Dimensions"` 3883 3884 // 单位 3885 Unit *string `json:"Unit,omitempty" name:"Unit"` 3886 3887 // 指标配置 3888 // 注意:此字段可能返回 null,表示取不到有效值。 3889 MetricConfig *MetricConfig `json:"MetricConfig,omitempty" name:"MetricConfig"` 3890} 3891 3892type MetricConfig struct { 3893 3894 // 允许使用的运算符 3895 Operator []*string `json:"Operator,omitempty" name:"Operator"` 3896 3897 // 允许配置的数据周期,以秒为单位 3898 Period []*int64 `json:"Period,omitempty" name:"Period"` 3899 3900 // 允许配置的持续周期个数 3901 ContinuePeriod []*int64 `json:"ContinuePeriod,omitempty" name:"ContinuePeriod"` 3902} 3903 3904type MetricData struct { 3905 3906 // 指标名 3907 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 3908 3909 // 监控数据点 3910 Points []*MetricDataPoint `json:"Points,omitempty" name:"Points"` 3911} 3912 3913type MetricDataPoint struct { 3914 3915 // 实例对象维度组合 3916 Dimensions []*Dimension `json:"Dimensions,omitempty" name:"Dimensions"` 3917 3918 // 数据点列表 3919 Values []*Point `json:"Values,omitempty" name:"Values"` 3920} 3921 3922type MetricDatum struct { 3923 3924 // 指标名称 3925 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 3926 3927 // 指标的值 3928 Value *uint64 `json:"Value,omitempty" name:"Value"` 3929} 3930 3931type MetricObjectMeaning struct { 3932 3933 // 指标英文解释 3934 En *string `json:"En,omitempty" name:"En"` 3935 3936 // 指标中文解释 3937 Zh *string `json:"Zh,omitempty" name:"Zh"` 3938} 3939 3940type MetricSet struct { 3941 3942 // 命名空间,每个云产品会有一个命名空间 3943 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 3944 3945 // 指标名称 3946 MetricName *string `json:"MetricName,omitempty" name:"MetricName"` 3947 3948 // 指标使用的单位 3949 Unit *string `json:"Unit,omitempty" name:"Unit"` 3950 3951 // 指标使用的单位 3952 UnitCname *string `json:"UnitCname,omitempty" name:"UnitCname"` 3953 3954 // 指标支持的统计周期,单位是秒,如60、300 3955 Period []*int64 `json:"Period,omitempty" name:"Period"` 3956 3957 // 统计周期内指标方式 3958 Periods []*PeriodsSt `json:"Periods,omitempty" name:"Periods"` 3959 3960 // 统计指标含义解释 3961 Meaning *MetricObjectMeaning `json:"Meaning,omitempty" name:"Meaning"` 3962 3963 // 维度描述信息 3964 Dimensions []*DimensionsDesc `json:"Dimensions,omitempty" name:"Dimensions"` 3965} 3966 3967type MidQueryCondition struct { 3968 3969 // 维度 3970 Key *string `json:"Key,omitempty" name:"Key"` 3971 3972 // 操作符,支持等于(eq)、不等于(ne),以及in 3973 Operator *string `json:"Operator,omitempty" name:"Operator"` 3974 3975 // 维度值,当Op是eq、ne时,只使用第一个元素 3976 Value []*string `json:"Value,omitempty" name:"Value"` 3977} 3978 3979type ModifyAlarmNoticeRequest struct { 3980 *tchttp.BaseRequest 3981 3982 // 模块名,这里填“monitor” 3983 Module *string `json:"Module,omitempty" name:"Module"` 3984 3985 // 告警通知规则名称 60字符以内 3986 Name *string `json:"Name,omitempty" name:"Name"` 3987 3988 // 通知类型 ALARM=未恢复通知 OK=已恢复通知 ALL=都通知 3989 NoticeType *string `json:"NoticeType,omitempty" name:"NoticeType"` 3990 3991 // 通知语言 zh-CN=中文 en-US=英文 3992 NoticeLanguage *string `json:"NoticeLanguage,omitempty" name:"NoticeLanguage"` 3993 3994 // 告警通知模板 ID 3995 NoticeId *string `json:"NoticeId,omitempty" name:"NoticeId"` 3996 3997 // 用户通知 最多5个 3998 UserNotices []*UserNotice `json:"UserNotices,omitempty" name:"UserNotices"` 3999 4000 // 回调通知 最多3个 4001 URLNotices []*URLNotice `json:"URLNotices,omitempty" name:"URLNotices"` 4002} 4003 4004func (r *ModifyAlarmNoticeRequest) ToJsonString() string { 4005 b, _ := json.Marshal(r) 4006 return string(b) 4007} 4008 4009// FromJsonString It is highly **NOT** recommended to use this function 4010// because it has no param check, nor strict type check 4011func (r *ModifyAlarmNoticeRequest) FromJsonString(s string) error { 4012 f := make(map[string]interface{}) 4013 if err := json.Unmarshal([]byte(s), &f); err != nil { 4014 return err 4015 } 4016 delete(f, "Module") 4017 delete(f, "Name") 4018 delete(f, "NoticeType") 4019 delete(f, "NoticeLanguage") 4020 delete(f, "NoticeId") 4021 delete(f, "UserNotices") 4022 delete(f, "URLNotices") 4023 if len(f) > 0 { 4024 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAlarmNoticeRequest has unknown keys!", "") 4025 } 4026 return json.Unmarshal([]byte(s), &r) 4027} 4028 4029type ModifyAlarmNoticeResponse struct { 4030 *tchttp.BaseResponse 4031 Response *struct { 4032 4033 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4034 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4035 } `json:"Response"` 4036} 4037 4038func (r *ModifyAlarmNoticeResponse) ToJsonString() string { 4039 b, _ := json.Marshal(r) 4040 return string(b) 4041} 4042 4043// FromJsonString It is highly **NOT** recommended to use this function 4044// because it has no param check, nor strict type check 4045func (r *ModifyAlarmNoticeResponse) FromJsonString(s string) error { 4046 return json.Unmarshal([]byte(s), &r) 4047} 4048 4049type ModifyAlarmPolicyConditionRequest struct { 4050 *tchttp.BaseRequest 4051 4052 // 模块名,固定值 monitor 4053 Module *string `json:"Module,omitempty" name:"Module"` 4054 4055 // 告警策略 ID 4056 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 4057 4058 // 触发条件模板 Id,可不传 4059 ConditionTemplateId *int64 `json:"ConditionTemplateId,omitempty" name:"ConditionTemplateId"` 4060 4061 // 指标触发条件 4062 Condition *AlarmPolicyCondition `json:"Condition,omitempty" name:"Condition"` 4063 4064 // 事件触发条件 4065 EventCondition *AlarmPolicyEventCondition `json:"EventCondition,omitempty" name:"EventCondition"` 4066 4067 // 全局过滤条件 4068 Filter *AlarmPolicyFilter `json:"Filter,omitempty" name:"Filter"` 4069 4070 // 聚合维度列表,指定按哪些维度 key 来做 group by 4071 GroupBy []*string `json:"GroupBy,omitempty" name:"GroupBy"` 4072} 4073 4074func (r *ModifyAlarmPolicyConditionRequest) ToJsonString() string { 4075 b, _ := json.Marshal(r) 4076 return string(b) 4077} 4078 4079// FromJsonString It is highly **NOT** recommended to use this function 4080// because it has no param check, nor strict type check 4081func (r *ModifyAlarmPolicyConditionRequest) FromJsonString(s string) error { 4082 f := make(map[string]interface{}) 4083 if err := json.Unmarshal([]byte(s), &f); err != nil { 4084 return err 4085 } 4086 delete(f, "Module") 4087 delete(f, "PolicyId") 4088 delete(f, "ConditionTemplateId") 4089 delete(f, "Condition") 4090 delete(f, "EventCondition") 4091 delete(f, "Filter") 4092 delete(f, "GroupBy") 4093 if len(f) > 0 { 4094 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAlarmPolicyConditionRequest has unknown keys!", "") 4095 } 4096 return json.Unmarshal([]byte(s), &r) 4097} 4098 4099type ModifyAlarmPolicyConditionResponse struct { 4100 *tchttp.BaseResponse 4101 Response *struct { 4102 4103 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4104 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4105 } `json:"Response"` 4106} 4107 4108func (r *ModifyAlarmPolicyConditionResponse) ToJsonString() string { 4109 b, _ := json.Marshal(r) 4110 return string(b) 4111} 4112 4113// FromJsonString It is highly **NOT** recommended to use this function 4114// because it has no param check, nor strict type check 4115func (r *ModifyAlarmPolicyConditionResponse) FromJsonString(s string) error { 4116 return json.Unmarshal([]byte(s), &r) 4117} 4118 4119type ModifyAlarmPolicyInfoRequest struct { 4120 *tchttp.BaseRequest 4121 4122 // 模块名,这里填“monitor” 4123 Module *string `json:"Module,omitempty" name:"Module"` 4124 4125 // 告警策略 ID 4126 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 4127 4128 // 要修改的字段 NAME=策略名称 REMARK=策略备注 4129 Key *string `json:"Key,omitempty" name:"Key"` 4130 4131 // 修改后的值 4132 Value *string `json:"Value,omitempty" name:"Value"` 4133} 4134 4135func (r *ModifyAlarmPolicyInfoRequest) ToJsonString() string { 4136 b, _ := json.Marshal(r) 4137 return string(b) 4138} 4139 4140// FromJsonString It is highly **NOT** recommended to use this function 4141// because it has no param check, nor strict type check 4142func (r *ModifyAlarmPolicyInfoRequest) FromJsonString(s string) error { 4143 f := make(map[string]interface{}) 4144 if err := json.Unmarshal([]byte(s), &f); err != nil { 4145 return err 4146 } 4147 delete(f, "Module") 4148 delete(f, "PolicyId") 4149 delete(f, "Key") 4150 delete(f, "Value") 4151 if len(f) > 0 { 4152 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAlarmPolicyInfoRequest has unknown keys!", "") 4153 } 4154 return json.Unmarshal([]byte(s), &r) 4155} 4156 4157type ModifyAlarmPolicyInfoResponse struct { 4158 *tchttp.BaseResponse 4159 Response *struct { 4160 4161 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4162 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4163 } `json:"Response"` 4164} 4165 4166func (r *ModifyAlarmPolicyInfoResponse) ToJsonString() string { 4167 b, _ := json.Marshal(r) 4168 return string(b) 4169} 4170 4171// FromJsonString It is highly **NOT** recommended to use this function 4172// because it has no param check, nor strict type check 4173func (r *ModifyAlarmPolicyInfoResponse) FromJsonString(s string) error { 4174 return json.Unmarshal([]byte(s), &r) 4175} 4176 4177type ModifyAlarmPolicyNoticeRequest struct { 4178 *tchttp.BaseRequest 4179 4180 // 模块名,这里填“monitor” 4181 Module *string `json:"Module,omitempty" name:"Module"` 4182 4183 // 告警策略 ID 4184 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 4185 4186 // 告警通知模板 ID 列表 4187 NoticeIds []*string `json:"NoticeIds,omitempty" name:"NoticeIds"` 4188} 4189 4190func (r *ModifyAlarmPolicyNoticeRequest) ToJsonString() string { 4191 b, _ := json.Marshal(r) 4192 return string(b) 4193} 4194 4195// FromJsonString It is highly **NOT** recommended to use this function 4196// because it has no param check, nor strict type check 4197func (r *ModifyAlarmPolicyNoticeRequest) FromJsonString(s string) error { 4198 f := make(map[string]interface{}) 4199 if err := json.Unmarshal([]byte(s), &f); err != nil { 4200 return err 4201 } 4202 delete(f, "Module") 4203 delete(f, "PolicyId") 4204 delete(f, "NoticeIds") 4205 if len(f) > 0 { 4206 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAlarmPolicyNoticeRequest has unknown keys!", "") 4207 } 4208 return json.Unmarshal([]byte(s), &r) 4209} 4210 4211type ModifyAlarmPolicyNoticeResponse struct { 4212 *tchttp.BaseResponse 4213 Response *struct { 4214 4215 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4216 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4217 } `json:"Response"` 4218} 4219 4220func (r *ModifyAlarmPolicyNoticeResponse) ToJsonString() string { 4221 b, _ := json.Marshal(r) 4222 return string(b) 4223} 4224 4225// FromJsonString It is highly **NOT** recommended to use this function 4226// because it has no param check, nor strict type check 4227func (r *ModifyAlarmPolicyNoticeResponse) FromJsonString(s string) error { 4228 return json.Unmarshal([]byte(s), &r) 4229} 4230 4231type ModifyAlarmPolicyStatusRequest struct { 4232 *tchttp.BaseRequest 4233 4234 // 模块名,固定值 monitor 4235 Module *string `json:"Module,omitempty" name:"Module"` 4236 4237 // 告警策略 ID 4238 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 4239 4240 // 启停状态 0=停用 1=启用 4241 Enable *int64 `json:"Enable,omitempty" name:"Enable"` 4242} 4243 4244func (r *ModifyAlarmPolicyStatusRequest) ToJsonString() string { 4245 b, _ := json.Marshal(r) 4246 return string(b) 4247} 4248 4249// FromJsonString It is highly **NOT** recommended to use this function 4250// because it has no param check, nor strict type check 4251func (r *ModifyAlarmPolicyStatusRequest) FromJsonString(s string) error { 4252 f := make(map[string]interface{}) 4253 if err := json.Unmarshal([]byte(s), &f); err != nil { 4254 return err 4255 } 4256 delete(f, "Module") 4257 delete(f, "PolicyId") 4258 delete(f, "Enable") 4259 if len(f) > 0 { 4260 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAlarmPolicyStatusRequest has unknown keys!", "") 4261 } 4262 return json.Unmarshal([]byte(s), &r) 4263} 4264 4265type ModifyAlarmPolicyStatusResponse struct { 4266 *tchttp.BaseResponse 4267 Response *struct { 4268 4269 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4270 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4271 } `json:"Response"` 4272} 4273 4274func (r *ModifyAlarmPolicyStatusResponse) ToJsonString() string { 4275 b, _ := json.Marshal(r) 4276 return string(b) 4277} 4278 4279// FromJsonString It is highly **NOT** recommended to use this function 4280// because it has no param check, nor strict type check 4281func (r *ModifyAlarmPolicyStatusResponse) FromJsonString(s string) error { 4282 return json.Unmarshal([]byte(s), &r) 4283} 4284 4285type ModifyAlarmPolicyTasksRequest struct { 4286 *tchttp.BaseRequest 4287 4288 // 模块名,这里填“monitor” 4289 Module *string `json:"Module,omitempty" name:"Module"` 4290 4291 // 告警策略 ID 4292 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 4293 4294 // 告警策略触发任务列表,空数据代表解绑 4295 TriggerTasks []*AlarmPolicyTriggerTask `json:"TriggerTasks,omitempty" name:"TriggerTasks"` 4296} 4297 4298func (r *ModifyAlarmPolicyTasksRequest) ToJsonString() string { 4299 b, _ := json.Marshal(r) 4300 return string(b) 4301} 4302 4303// FromJsonString It is highly **NOT** recommended to use this function 4304// because it has no param check, nor strict type check 4305func (r *ModifyAlarmPolicyTasksRequest) FromJsonString(s string) error { 4306 f := make(map[string]interface{}) 4307 if err := json.Unmarshal([]byte(s), &f); err != nil { 4308 return err 4309 } 4310 delete(f, "Module") 4311 delete(f, "PolicyId") 4312 delete(f, "TriggerTasks") 4313 if len(f) > 0 { 4314 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAlarmPolicyTasksRequest has unknown keys!", "") 4315 } 4316 return json.Unmarshal([]byte(s), &r) 4317} 4318 4319type ModifyAlarmPolicyTasksResponse struct { 4320 *tchttp.BaseResponse 4321 Response *struct { 4322 4323 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4324 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4325 } `json:"Response"` 4326} 4327 4328func (r *ModifyAlarmPolicyTasksResponse) ToJsonString() string { 4329 b, _ := json.Marshal(r) 4330 return string(b) 4331} 4332 4333// FromJsonString It is highly **NOT** recommended to use this function 4334// because it has no param check, nor strict type check 4335func (r *ModifyAlarmPolicyTasksResponse) FromJsonString(s string) error { 4336 return json.Unmarshal([]byte(s), &r) 4337} 4338 4339type ModifyAlarmReceiversRequest struct { 4340 *tchttp.BaseRequest 4341 4342 // 需要修改接收人的策略组Id 4343 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 4344 4345 // 必填。固定为“monitor” 4346 Module *string `json:"Module,omitempty" name:"Module"` 4347 4348 // 新接收人信息, 没有填写则删除所有接收人 4349 ReceiverInfos []*ReceiverInfo `json:"ReceiverInfos,omitempty" name:"ReceiverInfos"` 4350} 4351 4352func (r *ModifyAlarmReceiversRequest) ToJsonString() string { 4353 b, _ := json.Marshal(r) 4354 return string(b) 4355} 4356 4357// FromJsonString It is highly **NOT** recommended to use this function 4358// because it has no param check, nor strict type check 4359func (r *ModifyAlarmReceiversRequest) FromJsonString(s string) error { 4360 f := make(map[string]interface{}) 4361 if err := json.Unmarshal([]byte(s), &f); err != nil { 4362 return err 4363 } 4364 delete(f, "GroupId") 4365 delete(f, "Module") 4366 delete(f, "ReceiverInfos") 4367 if len(f) > 0 { 4368 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAlarmReceiversRequest has unknown keys!", "") 4369 } 4370 return json.Unmarshal([]byte(s), &r) 4371} 4372 4373type ModifyAlarmReceiversResponse struct { 4374 *tchttp.BaseResponse 4375 Response *struct { 4376 4377 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4378 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4379 } `json:"Response"` 4380} 4381 4382func (r *ModifyAlarmReceiversResponse) ToJsonString() string { 4383 b, _ := json.Marshal(r) 4384 return string(b) 4385} 4386 4387// FromJsonString It is highly **NOT** recommended to use this function 4388// because it has no param check, nor strict type check 4389func (r *ModifyAlarmReceiversResponse) FromJsonString(s string) error { 4390 return json.Unmarshal([]byte(s), &r) 4391} 4392 4393type ModifyPolicyGroupCondition struct { 4394 4395 // 指标id 4396 MetricId *int64 `json:"MetricId,omitempty" name:"MetricId"` 4397 4398 // 比较类型,1表示大于,2表示大于等于,3表示小于,4表示小于等于,5表示相等,6表示不相等 4399 CalcType *int64 `json:"CalcType,omitempty" name:"CalcType"` 4400 4401 // 检测阈值 4402 CalcValue *string `json:"CalcValue,omitempty" name:"CalcValue"` 4403 4404 // 检测指标的数据周期 4405 CalcPeriod *int64 `json:"CalcPeriod,omitempty" name:"CalcPeriod"` 4406 4407 // 持续周期个数 4408 ContinuePeriod *int64 `json:"ContinuePeriod,omitempty" name:"ContinuePeriod"` 4409 4410 // 告警发送收敛类型。0连续告警,1指数告警 4411 AlarmNotifyType *int64 `json:"AlarmNotifyType,omitempty" name:"AlarmNotifyType"` 4412 4413 // 告警发送周期单位秒。<0 不触发, 0 只触发一次, >0 每隔triggerTime秒触发一次 4414 AlarmNotifyPeriod *int64 `json:"AlarmNotifyPeriod,omitempty" name:"AlarmNotifyPeriod"` 4415 4416 // 规则id,不填表示新增,填写了ruleId表示在已存在的规则基础上进行修改 4417 RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"` 4418} 4419 4420type ModifyPolicyGroupEventCondition struct { 4421 4422 // 事件id 4423 EventId *int64 `json:"EventId,omitempty" name:"EventId"` 4424 4425 // 告警发送收敛类型。0连续告警,1指数告警 4426 AlarmNotifyType *int64 `json:"AlarmNotifyType,omitempty" name:"AlarmNotifyType"` 4427 4428 // 告警发送周期单位秒。<0 不触发, 0 只触发一次, >0 每隔triggerTime秒触发一次 4429 AlarmNotifyPeriod *int64 `json:"AlarmNotifyPeriod,omitempty" name:"AlarmNotifyPeriod"` 4430 4431 // 规则id,不填表示新增,填写了ruleId表示在已存在的规则基础上进行修改 4432 RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"` 4433} 4434 4435type ModifyPolicyGroupRequest struct { 4436 *tchttp.BaseRequest 4437 4438 // 固定值,为"monitor" 4439 Module *string `json:"Module,omitempty" name:"Module"` 4440 4441 // 策略组id 4442 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 4443 4444 // 告警类型 4445 ViewName *string `json:"ViewName,omitempty" name:"ViewName"` 4446 4447 // 策略组名称 4448 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 4449 4450 // 指标告警条件的且或关系,1表示且告警,所有指标告警条件都达到才告警,0表示或告警,任意指标告警条件达到都告警 4451 IsUnionRule *int64 `json:"IsUnionRule,omitempty" name:"IsUnionRule"` 4452 4453 // 指标告警条件规则,不填表示删除已有的所有指标告警条件规则 4454 Conditions []*ModifyPolicyGroupCondition `json:"Conditions,omitempty" name:"Conditions"` 4455 4456 // 事件告警条件,不填表示删除已有的事件告警条件 4457 EventConditions []*ModifyPolicyGroupEventCondition `json:"EventConditions,omitempty" name:"EventConditions"` 4458 4459 // 模板策略组id 4460 ConditionTempGroupId *int64 `json:"ConditionTempGroupId,omitempty" name:"ConditionTempGroupId"` 4461} 4462 4463func (r *ModifyPolicyGroupRequest) ToJsonString() string { 4464 b, _ := json.Marshal(r) 4465 return string(b) 4466} 4467 4468// FromJsonString It is highly **NOT** recommended to use this function 4469// because it has no param check, nor strict type check 4470func (r *ModifyPolicyGroupRequest) FromJsonString(s string) error { 4471 f := make(map[string]interface{}) 4472 if err := json.Unmarshal([]byte(s), &f); err != nil { 4473 return err 4474 } 4475 delete(f, "Module") 4476 delete(f, "GroupId") 4477 delete(f, "ViewName") 4478 delete(f, "GroupName") 4479 delete(f, "IsUnionRule") 4480 delete(f, "Conditions") 4481 delete(f, "EventConditions") 4482 delete(f, "ConditionTempGroupId") 4483 if len(f) > 0 { 4484 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPolicyGroupRequest has unknown keys!", "") 4485 } 4486 return json.Unmarshal([]byte(s), &r) 4487} 4488 4489type ModifyPolicyGroupResponse struct { 4490 *tchttp.BaseResponse 4491 Response *struct { 4492 4493 // 策略组id 4494 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 4495 4496 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4497 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4498 } `json:"Response"` 4499} 4500 4501func (r *ModifyPolicyGroupResponse) ToJsonString() string { 4502 b, _ := json.Marshal(r) 4503 return string(b) 4504} 4505 4506// FromJsonString It is highly **NOT** recommended to use this function 4507// because it has no param check, nor strict type check 4508func (r *ModifyPolicyGroupResponse) FromJsonString(s string) error { 4509 return json.Unmarshal([]byte(s), &r) 4510} 4511 4512type MonitorTypeNamespace struct { 4513 4514 // 监控类型 4515 MonitorType *string `json:"MonitorType,omitempty" name:"MonitorType"` 4516 4517 // 策略类型值 4518 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 4519} 4520 4521type PeriodsSt struct { 4522 4523 // 周期 4524 Period *string `json:"Period,omitempty" name:"Period"` 4525 4526 // 统计方式 4527 StatType []*string `json:"StatType,omitempty" name:"StatType"` 4528} 4529 4530type Point struct { 4531 4532 // 该监控数据点生成的时间点 4533 Timestamp *uint64 `json:"Timestamp,omitempty" name:"Timestamp"` 4534 4535 // 监控数据点的值 4536 // 注意:此字段可能返回 null,表示取不到有效值。 4537 Value *float64 `json:"Value,omitempty" name:"Value"` 4538} 4539 4540type ProductSimple struct { 4541 4542 // 命名空间 4543 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 4544 4545 // 产品中文名称 4546 ProductName *string `json:"ProductName,omitempty" name:"ProductName"` 4547 4548 // 产品英文名称 4549 // 注意:此字段可能返回 null,表示取不到有效值。 4550 ProductEnName *string `json:"ProductEnName,omitempty" name:"ProductEnName"` 4551} 4552 4553type PrometheusRuleKV struct { 4554 4555 // 键 4556 Key *string `json:"Key,omitempty" name:"Key"` 4557 4558 // 值 4559 Value *string `json:"Value,omitempty" name:"Value"` 4560} 4561 4562type PrometheusRuleSet struct { 4563 4564 // 规则 ID 4565 RuleId *string `json:"RuleId,omitempty" name:"RuleId"` 4566 4567 // 规则名称 4568 RuleName *string `json:"RuleName,omitempty" name:"RuleName"` 4569 4570 // 规则状态码 4571 RuleState *int64 `json:"RuleState,omitempty" name:"RuleState"` 4572 4573 // 规则类别 4574 // 注意:此字段可能返回 null,表示取不到有效值。 4575 Type *string `json:"Type,omitempty" name:"Type"` 4576 4577 // 规则标签列表 4578 // 注意:此字段可能返回 null,表示取不到有效值。 4579 Labels []*PrometheusRuleKV `json:"Labels,omitempty" name:"Labels"` 4580 4581 // 规则注释列表 4582 // 注意:此字段可能返回 null,表示取不到有效值。 4583 Annotations []*PrometheusRuleKV `json:"Annotations,omitempty" name:"Annotations"` 4584 4585 // 规则表达式 4586 // 注意:此字段可能返回 null,表示取不到有效值。 4587 Expr *string `json:"Expr,omitempty" name:"Expr"` 4588 4589 // 规则报警持续时间 4590 // 注意:此字段可能返回 null,表示取不到有效值。 4591 Duration *string `json:"Duration,omitempty" name:"Duration"` 4592 4593 // 报警接收组列表 4594 // 注意:此字段可能返回 null,表示取不到有效值。 4595 Receivers []*string `json:"Receivers,omitempty" name:"Receivers"` 4596 4597 // 规则运行健康状态,取值如下: 4598 // <li>unknown 未知状态</li> 4599 // <li>pending 加载中</li> 4600 // <li>ok 运行正常</li> 4601 // <li>err 运行错误</li> 4602 Health *string `json:"Health,omitempty" name:"Health"` 4603 4604 // 规则创建时间 4605 // 注意:此字段可能返回 null,表示取不到有效值。 4606 CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` 4607 4608 // 规则更新时间 4609 // 注意:此字段可能返回 null,表示取不到有效值。 4610 UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` 4611} 4612 4613type PutMonitorDataRequest struct { 4614 *tchttp.BaseRequest 4615 4616 // 一组指标和数据 4617 Metrics []*MetricDatum `json:"Metrics,omitempty" name:"Metrics"` 4618 4619 // 上报时自行指定的 IP 4620 AnnounceIp *string `json:"AnnounceIp,omitempty" name:"AnnounceIp"` 4621 4622 // 上报时自行指定的时间戳 4623 AnnounceTimestamp *uint64 `json:"AnnounceTimestamp,omitempty" name:"AnnounceTimestamp"` 4624 4625 // 上报时自行指定的 IP 或 产品实例ID 4626 AnnounceInstance *string `json:"AnnounceInstance,omitempty" name:"AnnounceInstance"` 4627} 4628 4629func (r *PutMonitorDataRequest) ToJsonString() string { 4630 b, _ := json.Marshal(r) 4631 return string(b) 4632} 4633 4634// FromJsonString It is highly **NOT** recommended to use this function 4635// because it has no param check, nor strict type check 4636func (r *PutMonitorDataRequest) FromJsonString(s string) error { 4637 f := make(map[string]interface{}) 4638 if err := json.Unmarshal([]byte(s), &f); err != nil { 4639 return err 4640 } 4641 delete(f, "Metrics") 4642 delete(f, "AnnounceIp") 4643 delete(f, "AnnounceTimestamp") 4644 delete(f, "AnnounceInstance") 4645 if len(f) > 0 { 4646 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "PutMonitorDataRequest has unknown keys!", "") 4647 } 4648 return json.Unmarshal([]byte(s), &r) 4649} 4650 4651type PutMonitorDataResponse struct { 4652 *tchttp.BaseResponse 4653 Response *struct { 4654 4655 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4656 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4657 } `json:"Response"` 4658} 4659 4660func (r *PutMonitorDataResponse) ToJsonString() string { 4661 b, _ := json.Marshal(r) 4662 return string(b) 4663} 4664 4665// FromJsonString It is highly **NOT** recommended to use this function 4666// because it has no param check, nor strict type check 4667func (r *PutMonitorDataResponse) FromJsonString(s string) error { 4668 return json.Unmarshal([]byte(s), &r) 4669} 4670 4671type ReceiverInfo struct { 4672 4673 // 告警时间段开始时间。范围[0,86400),作为unix时间戳转成北京时间后去掉日期,例如7200表示"10:0:0" 4674 StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"` 4675 4676 // 告警时间段结束时间。含义同StartTime 4677 EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"` 4678 4679 // 告警通知方式。可选 "SMS","SITE","EMAIL","CALL","WECHAT" 4680 NotifyWay []*string `json:"NotifyWay,omitempty" name:"NotifyWay"` 4681 4682 // 接收人类型。“group” 或 “user” 4683 ReceiverType *string `json:"ReceiverType,omitempty" name:"ReceiverType"` 4684 4685 // ReceiverId 4686 Id *int64 `json:"Id,omitempty" name:"Id"` 4687 4688 // 电话告警通知时机。可选"OCCUR"(告警时通知),"RECOVER"(恢复时通知) 4689 SendFor []*string `json:"SendFor,omitempty" name:"SendFor"` 4690 4691 // 电话告警接收者uid 4692 UidList []*int64 `json:"UidList,omitempty" name:"UidList"` 4693 4694 // 电话告警轮数 4695 RoundNumber *int64 `json:"RoundNumber,omitempty" name:"RoundNumber"` 4696 4697 // 电话告警对个人间隔(秒) 4698 PersonInterval *int64 `json:"PersonInterval,omitempty" name:"PersonInterval"` 4699 4700 // 电话告警每轮间隔(秒) 4701 RoundInterval *int64 `json:"RoundInterval,omitempty" name:"RoundInterval"` 4702 4703 // 恢复通知方式。可选"SMS" 4704 RecoverNotify []*string `json:"RecoverNotify,omitempty" name:"RecoverNotify"` 4705 4706 // 是否需要电话告警触达提示。0不需要,1需要 4707 NeedSendNotice *int64 `json:"NeedSendNotice,omitempty" name:"NeedSendNotice"` 4708 4709 // 接收组列表。通过平台接口查询到的接收组id列表 4710 ReceiverGroupList []*int64 `json:"ReceiverGroupList,omitempty" name:"ReceiverGroupList"` 4711 4712 // 接收人列表。通过平台接口查询到的接收人id列表 4713 ReceiverUserList []*int64 `json:"ReceiverUserList,omitempty" name:"ReceiverUserList"` 4714 4715 // 告警接收语言,枚举值(zh-CN,en-US) 4716 ReceiveLanguage *string `json:"ReceiveLanguage,omitempty" name:"ReceiveLanguage"` 4717} 4718 4719type SendCustomAlarmMsgRequest struct { 4720 *tchttp.BaseRequest 4721 4722 // 接口模块名,当前取值monitor 4723 Module *string `json:"Module,omitempty" name:"Module"` 4724 4725 // 消息策略ID,在云监控自定义消息页面配置 4726 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 4727 4728 // 用户想要发送的自定义消息内容 4729 Msg *string `json:"Msg,omitempty" name:"Msg"` 4730} 4731 4732func (r *SendCustomAlarmMsgRequest) ToJsonString() string { 4733 b, _ := json.Marshal(r) 4734 return string(b) 4735} 4736 4737// FromJsonString It is highly **NOT** recommended to use this function 4738// because it has no param check, nor strict type check 4739func (r *SendCustomAlarmMsgRequest) FromJsonString(s string) error { 4740 f := make(map[string]interface{}) 4741 if err := json.Unmarshal([]byte(s), &f); err != nil { 4742 return err 4743 } 4744 delete(f, "Module") 4745 delete(f, "PolicyId") 4746 delete(f, "Msg") 4747 if len(f) > 0 { 4748 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SendCustomAlarmMsgRequest has unknown keys!", "") 4749 } 4750 return json.Unmarshal([]byte(s), &r) 4751} 4752 4753type SendCustomAlarmMsgResponse struct { 4754 *tchttp.BaseResponse 4755 Response *struct { 4756 4757 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4758 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4759 } `json:"Response"` 4760} 4761 4762func (r *SendCustomAlarmMsgResponse) ToJsonString() string { 4763 b, _ := json.Marshal(r) 4764 return string(b) 4765} 4766 4767// FromJsonString It is highly **NOT** recommended to use this function 4768// because it has no param check, nor strict type check 4769func (r *SendCustomAlarmMsgResponse) FromJsonString(s string) error { 4770 return json.Unmarshal([]byte(s), &r) 4771} 4772 4773type ServiceDiscoveryItem struct { 4774 4775 // 服务发现名称 4776 Name *string `json:"Name,omitempty" name:"Name"` 4777 4778 // 服务发现属于的 Namespace 4779 Namespace *string `json:"Namespace,omitempty" name:"Namespace"` 4780 4781 // 服务发现类型: ServiceMonitor/PodMonitor 4782 Kind *string `json:"Kind,omitempty" name:"Kind"` 4783 4784 // Namespace 选取方式 4785 // 注意:此字段可能返回 null,表示取不到有效值。 4786 NamespaceSelector *string `json:"NamespaceSelector,omitempty" name:"NamespaceSelector"` 4787 4788 // Label 选取方式 4789 // 注意:此字段可能返回 null,表示取不到有效值。 4790 Selector *string `json:"Selector,omitempty" name:"Selector"` 4791 4792 // Endpoints 信息(PodMonitor 不含该参数) 4793 Endpoints *string `json:"Endpoints,omitempty" name:"Endpoints"` 4794 4795 // 服务发现对应的配置信息 4796 // 注意:此字段可能返回 null,表示取不到有效值。 4797 Yaml *string `json:"Yaml,omitempty" name:"Yaml"` 4798} 4799 4800type SetDefaultAlarmPolicyRequest struct { 4801 *tchttp.BaseRequest 4802 4803 // 模块名,固定值 monitor 4804 Module *string `json:"Module,omitempty" name:"Module"` 4805 4806 // 告警策略 ID 4807 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 4808} 4809 4810func (r *SetDefaultAlarmPolicyRequest) ToJsonString() string { 4811 b, _ := json.Marshal(r) 4812 return string(b) 4813} 4814 4815// FromJsonString It is highly **NOT** recommended to use this function 4816// because it has no param check, nor strict type check 4817func (r *SetDefaultAlarmPolicyRequest) FromJsonString(s string) error { 4818 f := make(map[string]interface{}) 4819 if err := json.Unmarshal([]byte(s), &f); err != nil { 4820 return err 4821 } 4822 delete(f, "Module") 4823 delete(f, "PolicyId") 4824 if len(f) > 0 { 4825 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SetDefaultAlarmPolicyRequest has unknown keys!", "") 4826 } 4827 return json.Unmarshal([]byte(s), &r) 4828} 4829 4830type SetDefaultAlarmPolicyResponse struct { 4831 *tchttp.BaseResponse 4832 Response *struct { 4833 4834 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4835 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4836 } `json:"Response"` 4837} 4838 4839func (r *SetDefaultAlarmPolicyResponse) ToJsonString() string { 4840 b, _ := json.Marshal(r) 4841 return string(b) 4842} 4843 4844// FromJsonString It is highly **NOT** recommended to use this function 4845// because it has no param check, nor strict type check 4846func (r *SetDefaultAlarmPolicyResponse) FromJsonString(s string) error { 4847 return json.Unmarshal([]byte(s), &r) 4848} 4849 4850type TagInstance struct { 4851 4852 // 标签Key 4853 // 注意:此字段可能返回 null,表示取不到有效值。 4854 Key *string `json:"Key,omitempty" name:"Key"` 4855 4856 // 标签Value 4857 // 注意:此字段可能返回 null,表示取不到有效值。 4858 Value *string `json:"Value,omitempty" name:"Value"` 4859 4860 // 实例个数 4861 // 注意:此字段可能返回 null,表示取不到有效值。 4862 InstanceSum *int64 `json:"InstanceSum,omitempty" name:"InstanceSum"` 4863 4864 // 产品类型,如:cvm 4865 // 注意:此字段可能返回 null,表示取不到有效值。 4866 ServiceType *string `json:"ServiceType,omitempty" name:"ServiceType"` 4867 4868 // 地域ID 4869 // 注意:此字段可能返回 null,表示取不到有效值。 4870 RegionId *string `json:"RegionId,omitempty" name:"RegionId"` 4871 4872 // 绑定状态,2:绑定成功,1:绑定中 4873 // 注意:此字段可能返回 null,表示取不到有效值。 4874 BindingStatus *int64 `json:"BindingStatus,omitempty" name:"BindingStatus"` 4875 4876 // 标签状态,2:标签存在,1:标签不存在 4877 // 注意:此字段可能返回 null,表示取不到有效值。 4878 TagStatus *int64 `json:"TagStatus,omitempty" name:"TagStatus"` 4879} 4880 4881type URLNotice struct { 4882 4883 // 回调 url(限长256字符) 4884 // 注意:此字段可能返回 null,表示取不到有效值。 4885 URL *string `json:"URL,omitempty" name:"URL"` 4886 4887 // 是否通过验证 0=否 1=是 4888 // 注意:此字段可能返回 null,表示取不到有效值。 4889 IsValid *int64 `json:"IsValid,omitempty" name:"IsValid"` 4890 4891 // 验证码 4892 // 注意:此字段可能返回 null,表示取不到有效值。 4893 ValidationCode *string `json:"ValidationCode,omitempty" name:"ValidationCode"` 4894} 4895 4896type UnBindingAllPolicyObjectRequest struct { 4897 *tchttp.BaseRequest 4898 4899 // 固定值,为"monitor" 4900 Module *string `json:"Module,omitempty" name:"Module"` 4901 4902 // 策略组id,如传入 PolicyId 则该字段被忽略可传入任意值如 0 4903 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 4904 4905 // 告警策略ID,使用此字段时 GroupId 会被忽略 4906 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 4907} 4908 4909func (r *UnBindingAllPolicyObjectRequest) ToJsonString() string { 4910 b, _ := json.Marshal(r) 4911 return string(b) 4912} 4913 4914// FromJsonString It is highly **NOT** recommended to use this function 4915// because it has no param check, nor strict type check 4916func (r *UnBindingAllPolicyObjectRequest) FromJsonString(s string) error { 4917 f := make(map[string]interface{}) 4918 if err := json.Unmarshal([]byte(s), &f); err != nil { 4919 return err 4920 } 4921 delete(f, "Module") 4922 delete(f, "GroupId") 4923 delete(f, "PolicyId") 4924 if len(f) > 0 { 4925 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UnBindingAllPolicyObjectRequest has unknown keys!", "") 4926 } 4927 return json.Unmarshal([]byte(s), &r) 4928} 4929 4930type UnBindingAllPolicyObjectResponse struct { 4931 *tchttp.BaseResponse 4932 Response *struct { 4933 4934 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4935 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4936 } `json:"Response"` 4937} 4938 4939func (r *UnBindingAllPolicyObjectResponse) ToJsonString() string { 4940 b, _ := json.Marshal(r) 4941 return string(b) 4942} 4943 4944// FromJsonString It is highly **NOT** recommended to use this function 4945// because it has no param check, nor strict type check 4946func (r *UnBindingAllPolicyObjectResponse) FromJsonString(s string) error { 4947 return json.Unmarshal([]byte(s), &r) 4948} 4949 4950type UnBindingPolicyObjectRequest struct { 4951 *tchttp.BaseRequest 4952 4953 // 固定值,为"monitor" 4954 Module *string `json:"Module,omitempty" name:"Module"` 4955 4956 // 策略组id,如传入 PolicyId 则该字段被忽略可传入任意值如 0 4957 GroupId *int64 `json:"GroupId,omitempty" name:"GroupId"` 4958 4959 // 待删除对象实例的唯一id列表,UniqueId从调用[获取已绑定对象列表接口](https://cloud.tencent.com/document/api/248/40570)的出参的List中得到 4960 UniqueId []*string `json:"UniqueId,omitempty" name:"UniqueId"` 4961 4962 // 实例分组id,如果按实例分组删除的话UniqueId参数是无效的 4963 InstanceGroupId *int64 `json:"InstanceGroupId,omitempty" name:"InstanceGroupId"` 4964 4965 // 告警策略ID,使用此字段时 GroupId 会被忽略 4966 PolicyId *string `json:"PolicyId,omitempty" name:"PolicyId"` 4967} 4968 4969func (r *UnBindingPolicyObjectRequest) ToJsonString() string { 4970 b, _ := json.Marshal(r) 4971 return string(b) 4972} 4973 4974// FromJsonString It is highly **NOT** recommended to use this function 4975// because it has no param check, nor strict type check 4976func (r *UnBindingPolicyObjectRequest) FromJsonString(s string) error { 4977 f := make(map[string]interface{}) 4978 if err := json.Unmarshal([]byte(s), &f); err != nil { 4979 return err 4980 } 4981 delete(f, "Module") 4982 delete(f, "GroupId") 4983 delete(f, "UniqueId") 4984 delete(f, "InstanceGroupId") 4985 delete(f, "PolicyId") 4986 if len(f) > 0 { 4987 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UnBindingPolicyObjectRequest has unknown keys!", "") 4988 } 4989 return json.Unmarshal([]byte(s), &r) 4990} 4991 4992type UnBindingPolicyObjectResponse struct { 4993 *tchttp.BaseResponse 4994 Response *struct { 4995 4996 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 4997 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 4998 } `json:"Response"` 4999} 5000 5001func (r *UnBindingPolicyObjectResponse) ToJsonString() string { 5002 b, _ := json.Marshal(r) 5003 return string(b) 5004} 5005 5006// FromJsonString It is highly **NOT** recommended to use this function 5007// because it has no param check, nor strict type check 5008func (r *UnBindingPolicyObjectResponse) FromJsonString(s string) error { 5009 return json.Unmarshal([]byte(s), &r) 5010} 5011 5012type UpdateAlertRuleRequest struct { 5013 *tchttp.BaseRequest 5014 5015 // Prometheus 报警规则 ID 5016 RuleId *string `json:"RuleId,omitempty" name:"RuleId"` 5017 5018 // Prometheus 实例 ID 5019 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 5020 5021 // 规则状态码,取值如下: 5022 // <li>1=RuleDeleted</li> 5023 // <li>2=RuleEnabled</li> 5024 // <li>3=RuleDisabled</li> 5025 // 默认状态码为 2 启用。 5026 RuleState *int64 `json:"RuleState,omitempty" name:"RuleState"` 5027 5028 // 报警规则名称 5029 RuleName *string `json:"RuleName,omitempty" name:"RuleName"` 5030 5031 // 报警规则表达式 5032 Expr *string `json:"Expr,omitempty" name:"Expr"` 5033 5034 // 报警规则持续时间 5035 Duration *string `json:"Duration,omitempty" name:"Duration"` 5036 5037 // 报警规则接收组列表 5038 Receivers []*string `json:"Receivers,omitempty" name:"Receivers"` 5039 5040 // 报警规则标签列表 5041 Labels []*PrometheusRuleKV `json:"Labels,omitempty" name:"Labels"` 5042 5043 // 报警规则注释列表。 5044 // 5045 // 告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。 5046 Annotations []*PrometheusRuleKV `json:"Annotations,omitempty" name:"Annotations"` 5047 5048 // 报警策略模板分类 5049 Type *string `json:"Type,omitempty" name:"Type"` 5050} 5051 5052func (r *UpdateAlertRuleRequest) ToJsonString() string { 5053 b, _ := json.Marshal(r) 5054 return string(b) 5055} 5056 5057// FromJsonString It is highly **NOT** recommended to use this function 5058// because it has no param check, nor strict type check 5059func (r *UpdateAlertRuleRequest) FromJsonString(s string) error { 5060 f := make(map[string]interface{}) 5061 if err := json.Unmarshal([]byte(s), &f); err != nil { 5062 return err 5063 } 5064 delete(f, "RuleId") 5065 delete(f, "InstanceId") 5066 delete(f, "RuleState") 5067 delete(f, "RuleName") 5068 delete(f, "Expr") 5069 delete(f, "Duration") 5070 delete(f, "Receivers") 5071 delete(f, "Labels") 5072 delete(f, "Annotations") 5073 delete(f, "Type") 5074 if len(f) > 0 { 5075 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateAlertRuleRequest has unknown keys!", "") 5076 } 5077 return json.Unmarshal([]byte(s), &r) 5078} 5079 5080type UpdateAlertRuleResponse struct { 5081 *tchttp.BaseResponse 5082 Response *struct { 5083 5084 // 规则 ID 5085 RuleId *string `json:"RuleId,omitempty" name:"RuleId"` 5086 5087 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 5088 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 5089 } `json:"Response"` 5090} 5091 5092func (r *UpdateAlertRuleResponse) ToJsonString() string { 5093 b, _ := json.Marshal(r) 5094 return string(b) 5095} 5096 5097// FromJsonString It is highly **NOT** recommended to use this function 5098// because it has no param check, nor strict type check 5099func (r *UpdateAlertRuleResponse) FromJsonString(s string) error { 5100 return json.Unmarshal([]byte(s), &r) 5101} 5102 5103type UpdateAlertRuleStateRequest struct { 5104 *tchttp.BaseRequest 5105 5106 // 规则 ID 列表 5107 RuleIds []*string `json:"RuleIds,omitempty" name:"RuleIds"` 5108 5109 // Prometheus 实例 ID 5110 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 5111 5112 // 规则状态码,取值如下: 5113 // <li>2=RuleEnabled</li> 5114 // <li>3=RuleDisabled</li> 5115 // 默认状态码为 2 启用。 5116 RuleState *int64 `json:"RuleState,omitempty" name:"RuleState"` 5117} 5118 5119func (r *UpdateAlertRuleStateRequest) ToJsonString() string { 5120 b, _ := json.Marshal(r) 5121 return string(b) 5122} 5123 5124// FromJsonString It is highly **NOT** recommended to use this function 5125// because it has no param check, nor strict type check 5126func (r *UpdateAlertRuleStateRequest) FromJsonString(s string) error { 5127 f := make(map[string]interface{}) 5128 if err := json.Unmarshal([]byte(s), &f); err != nil { 5129 return err 5130 } 5131 delete(f, "RuleIds") 5132 delete(f, "InstanceId") 5133 delete(f, "RuleState") 5134 if len(f) > 0 { 5135 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateAlertRuleStateRequest has unknown keys!", "") 5136 } 5137 return json.Unmarshal([]byte(s), &r) 5138} 5139 5140type UpdateAlertRuleStateResponse struct { 5141 *tchttp.BaseResponse 5142 Response *struct { 5143 5144 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 5145 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 5146 } `json:"Response"` 5147} 5148 5149func (r *UpdateAlertRuleStateResponse) ToJsonString() string { 5150 b, _ := json.Marshal(r) 5151 return string(b) 5152} 5153 5154// FromJsonString It is highly **NOT** recommended to use this function 5155// because it has no param check, nor strict type check 5156func (r *UpdateAlertRuleStateResponse) FromJsonString(s string) error { 5157 return json.Unmarshal([]byte(s), &r) 5158} 5159 5160type UpdateServiceDiscoveryRequest struct { 5161 *tchttp.BaseRequest 5162 5163 // Prometheus 实例 ID 5164 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 5165 5166 // <li>类型是 TKE,为对应的腾讯云容器服务集群 ID</li> 5167 KubeClusterId *string `json:"KubeClusterId,omitempty" name:"KubeClusterId"` 5168 5169 // 用户 Kubernetes 集群类型: 5170 // <li> 1 = 容器服务集群(TKE) </li> 5171 KubeType *int64 `json:"KubeType,omitempty" name:"KubeType"` 5172 5173 // 服务发现类型,取值如下: 5174 // <li> 1 = ServiceMonitor</li> 5175 // <li> 2 = PodMonitor</li> 5176 // <li> 3 = JobMonitor</li> 5177 Type *int64 `json:"Type,omitempty" name:"Type"` 5178 5179 // 服务发现配置信息 5180 Yaml *string `json:"Yaml,omitempty" name:"Yaml"` 5181} 5182 5183func (r *UpdateServiceDiscoveryRequest) ToJsonString() string { 5184 b, _ := json.Marshal(r) 5185 return string(b) 5186} 5187 5188// FromJsonString It is highly **NOT** recommended to use this function 5189// because it has no param check, nor strict type check 5190func (r *UpdateServiceDiscoveryRequest) FromJsonString(s string) error { 5191 f := make(map[string]interface{}) 5192 if err := json.Unmarshal([]byte(s), &f); err != nil { 5193 return err 5194 } 5195 delete(f, "InstanceId") 5196 delete(f, "KubeClusterId") 5197 delete(f, "KubeType") 5198 delete(f, "Type") 5199 delete(f, "Yaml") 5200 if len(f) > 0 { 5201 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateServiceDiscoveryRequest has unknown keys!", "") 5202 } 5203 return json.Unmarshal([]byte(s), &r) 5204} 5205 5206type UpdateServiceDiscoveryResponse struct { 5207 *tchttp.BaseResponse 5208 Response *struct { 5209 5210 // 更新成功之后,返回对应服务发现的信息 5211 ServiceDiscovery *ServiceDiscoveryItem `json:"ServiceDiscovery,omitempty" name:"ServiceDiscovery"` 5212 5213 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 5214 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 5215 } `json:"Response"` 5216} 5217 5218func (r *UpdateServiceDiscoveryResponse) ToJsonString() string { 5219 b, _ := json.Marshal(r) 5220 return string(b) 5221} 5222 5223// FromJsonString It is highly **NOT** recommended to use this function 5224// because it has no param check, nor strict type check 5225func (r *UpdateServiceDiscoveryResponse) FromJsonString(s string) error { 5226 return json.Unmarshal([]byte(s), &r) 5227} 5228 5229type UserNotice struct { 5230 5231 // 接收者类型 USER=用户 GROUP=用户组 5232 // 注意:此字段可能返回 null,表示取不到有效值。 5233 ReceiverType *string `json:"ReceiverType,omitempty" name:"ReceiverType"` 5234 5235 // 通知开始时间 00:00:00 开始的秒数(取值范围0-86399) 5236 // 注意:此字段可能返回 null,表示取不到有效值。 5237 StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"` 5238 5239 // 通知结束时间 00:00:00 开始的秒数(取值范围0-86399) 5240 // 注意:此字段可能返回 null,表示取不到有效值。 5241 EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"` 5242 5243 // 通知渠道列表 EMAIL=邮件 SMS=短信 CALL=电话 WECHAT=微信 5244 // 注意:此字段可能返回 null,表示取不到有效值。 5245 NoticeWay []*string `json:"NoticeWay,omitempty" name:"NoticeWay"` 5246 5247 // 用户 uid 列表 5248 // 注意:此字段可能返回 null,表示取不到有效值。 5249 UserIds []*int64 `json:"UserIds,omitempty" name:"UserIds"` 5250 5251 // 用户组 group id 列表 5252 // 注意:此字段可能返回 null,表示取不到有效值。 5253 GroupIds []*int64 `json:"GroupIds,omitempty" name:"GroupIds"` 5254 5255 // 电话轮询列表 5256 // 注意:此字段可能返回 null,表示取不到有效值。 5257 PhoneOrder []*int64 `json:"PhoneOrder,omitempty" name:"PhoneOrder"` 5258 5259 // 电话轮询次数 (取值范围1-5) 5260 // 注意:此字段可能返回 null,表示取不到有效值。 5261 PhoneCircleTimes *int64 `json:"PhoneCircleTimes,omitempty" name:"PhoneCircleTimes"` 5262 5263 // 单次轮询内拨打间隔 秒数 (取值范围60-900) 5264 // 注意:此字段可能返回 null,表示取不到有效值。 5265 PhoneInnerInterval *int64 `json:"PhoneInnerInterval,omitempty" name:"PhoneInnerInterval"` 5266 5267 // 两次轮询间隔 秒数(取值范围60-900) 5268 // 注意:此字段可能返回 null,表示取不到有效值。 5269 PhoneCircleInterval *int64 `json:"PhoneCircleInterval,omitempty" name:"PhoneCircleInterval"` 5270 5271 // 是否需要触达通知 0=否 1=是 5272 // 注意:此字段可能返回 null,表示取不到有效值。 5273 NeedPhoneArriveNotice *int64 `json:"NeedPhoneArriveNotice,omitempty" name:"NeedPhoneArriveNotice"` 5274} 5275