UNPKG

tenyun

Version:

Promise based and chained Tencent Cloud OpenAPI client for NodeJS

2,013 lines (1,892 loc) 243 kB
/// <reference types="node" /> import { AxiosPromise, AxiosRequestConfig } from "axios"; /** 分页请求参数 */ declare interface PageByNoParams { /** 每个分页的数量是多少 */ PerPage?: number | null; /** 第几个分页,从1开始 */ PageNo?: string | null; } declare interface DescribeAlarmNotifyHistoriesRequest { /** 监控类型 */ MonitorType: string; /** 起始时间点,unix秒级时间戳 */ QueryBaseTime: number; /** 从 QueryBaseTime 开始,需要查询往前多久的时间,单位秒 */ QueryBeforeSeconds: number; /** 分页参数 */ PageParams: PageByNoParams; /** 当监控类型为 MT_QCE 时候需要填写,归属的命名空间 */ Namespace?: string; /** 当监控类型为 MT_QCE 时候需要填写, 告警策略类型 */ ModelName?: string; /** 查询某个策略的通知历史 */ PolicyId?: string; } declare interface DescribeAlarmNotifyHistoriesResponse { /** 唯一请求 ID,每次请求都会返回。 */ RequestId?: string; } declare namespace V20180724 { type VersionHeader = { headers: { 'X-TC-Version': '2018-07-24' } } /** 策略过滤条件 */ interface AlarmConditionFilter { /** 类型 */ Type?: string | null; /** 表达式 */ Expression?: string | null; /** 过滤条件 */ Dimensions?: string | null; } /** 告警事件 */ interface AlarmEvent { /** 事件名 */ EventName: string; /** 展示的事件名 */ Description: string; /** 告警策略类型 */ Namespace: string; } /** 聚合条件 */ interface AlarmGroupByItem { /** Item Id */ Id?: string | null; /** 名称 */ Name?: string | null; } /** 通知模板ID及通知等级列表,["Remind","Serious"]表示该通知模板仅接收提醒和严重类别的告警 */ interface AlarmHierarchicalNotice { /** 通知模板ID */ NoticeId?: string | null; /** 通知等级列表,["Remind","Serious"]表示该通知模板仅接收提醒和严重类别的告警 */ Classification?: string[] | null; /** 模板对应的策略id */ PolicyId?: string | null; } /** 告警分级阈值配置 */ interface AlarmHierarchicalValue { /** 提醒等级阈值 */ Remind?: string | null; /** 警告等级阈值 */ Warn?: string | null; /** 严重等级阈值 */ Serious?: string | null; } /** 告警历史数据 */ interface AlarmHistory { /** 告警历史Id */ AlarmId?: string; /** 监控类型 */ MonitorType?: string; /** 策略类型 */ Namespace?: string; /** 告警对象 */ AlarmObject?: string; /** 告警内容 */ Content?: string; /** 时间戳,首次出现时间 */ FirstOccurTime?: number; /** 时间戳,最后出现时间 */ LastOccurTime?: number; /** 告警状态,ALARM=未恢复 OK=已恢复 NO_CONF=已失效 NO_DATA=数据不足 */ AlarmStatus?: string; /** 告警策略 Id */ PolicyId?: string; /** 策略名称 */ PolicyName?: string; /** 基础产品告警的告警对象所属网络 */ VPC?: string; /** 项目 Id */ ProjectId?: number; /** 项目名字 */ ProjectName?: string; /** 告警对象所属实例组 */ InstanceGroup?: InstanceGroups[]; /** 接收人列表 */ ReceiverUids?: number[]; /** 接收组列表 */ ReceiverGroups?: number[]; /** 告警渠道列表 SMS=短信 EMAIL=邮件 CALL=电话 WECHAT=微信 */ NoticeWays?: string[]; /** 可用于实例、实例组的绑定和解绑接口([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 */ OriginId?: string; /** 告警类型 */ AlarmType?: string; /** 事件Id */ EventId?: number; /** 地域 */ Region?: string; /** 策略是否存在 0=不存在 1=存在 */ PolicyExists?: number; /** 指标信息 */ MetricsInfo?: AlarmHistoryMetric[] | null; /** 告警实例的维度信息 */ Dimensions?: string | null; /** 告警等级 */ AlarmLevel?: string | null; /** 是否有配置告警屏蔽规则 */ ShieldFlag?: number | null; /** 屏蔽类型(英文) */ AlarmShieldingType?: string | null; /** 屏蔽时间(英文) */ AlarmShieldingTime?: string | null; /** 屏蔽类型(中文) */ AlarmShieldingShowType?: string | null; /** 屏蔽时间(中文) */ AlarmShieldingShowTime?: string | null; /** 屏蔽原因 */ AlarmShieldReason?: string | null; /** 告警实例的维度信息 */ InternalDimensions?: string | null; /** 指标名称 */ MetricName?: string | null; /** 策略是否有权限 */ PolicyPermissions?: number | null; } /** 告警历史的指标信息 */ interface AlarmHistoryMetric { /** 云产品监控类型查询数据使用的命名空间 */ QceNamespace: string; /** 指标名 */ MetricName: string; /** 统计周期 */ Period: number; /** 触发告警的数值 */ Value: string; /** 指标的展示名 */ Description: string; } /** 告警通知模板详情 */ interface AlarmNotice { /** 告警通知模板 ID */ Id?: string | null; /** 告警通知模板名称 */ Name?: string | null; /** 上次修改时间 */ UpdatedAt?: string | null; /** 上次修改人 */ UpdatedBy?: string | null; /** 告警通知类型 ALARM=未恢复通知 OK=已恢复通知 ALL=全部通知 */ NoticeType?: string | null; /** 用户通知列表 */ UserNotices?: UserNotice[] | null; /** 回调通知列表 */ URLNotices?: URLNotice[] | null; /** 是否是系统预设通知模板 0=否 1=是 */ IsPreset?: number | null; /** 通知语言 zh-CN=中文 en-US=英文 */ NoticeLanguage?: string | null; /** 告警通知模板绑定的告警策略ID列表 */ PolicyIds?: string[] | null; /** 后台 amp consumer id */ AMPConsumerId?: string | null; /** 推送cls渠道 */ CLSNotices?: CLSNotice[] | null; /** 通知模板绑定的标签 */ Tags?: Tag[] | null; } /** 告警策略详情 */ interface AlarmPolicy { /** 告警策略 ID */ PolicyId?: string | null; /** 告警策略名称 */ PolicyName?: string | null; /** 备注信息 */ Remark?: string | null; /** 监控类型 MT_QCE=云产品监控 */ MonitorType?: string | null; /** 启停状态 0=停用 1=启用 */ Enable?: number | null; /** 策略组绑定的实例数 */ UseSum?: number | null; /** 项目 Id -1=无项目 0=默认项目 */ ProjectId?: number | null; /** 项目名 */ ProjectName?: string | null; /** 告警策略类型 */ Namespace?: string | null; /** 触发条件模板 Id */ ConditionTemplateId?: string | null; /** 指标触发条件 */ Condition?: AlarmPolicyCondition | null; /** 事件触发条件 */ EventCondition?: AlarmPolicyEventCondition | null; /** 通知规则 id 列表 */ NoticeIds?: string[] | null; /** 通知规则 列表 */ Notices?: AlarmNotice[] | null; /** 触发任务列表 */ TriggerTasks?: AlarmPolicyTriggerTask[] | null; /** 模板策略组 */ ConditionsTemp?: ConditionsTemp | null; /** 最后编辑的用户uin */ LastEditUin?: string | null; /** 更新时间 */ UpdateTime?: number | null; /** 创建时间 */ InsertTime?: number | null; /** 地域 */ Region?: string[] | null; /** namespace显示名字 */ NamespaceShowName?: string | null; /** 是否默认策略,1是,0否 */ IsDefault?: number | null; /** 能否设置默认策略,1是,0否 */ CanSetDefault?: number | null; /** 实例分组ID */ InstanceGroupId?: number | null; /** 实例分组总实例数 */ InstanceSum?: number | null; /** 实例分组名称 */ InstanceGroupName?: string | null; /** 触发条件类型 STATIC=静态阈值 DYNAMIC=动态类型 */ RuleType?: string | null; /** 用于实例、实例组绑定和解绑接口(BindingPolicyObject、UnBindingAllPolicyObject、UnBindingPolicyObject)的策略 ID */ OriginId?: string | null; /** 标签 */ TagInstances?: TagInstance[] | null; /** 过滤条件 */ Filter?: AlarmConditionFilter | null; /** 聚合条件 */ GroupBy?: AlarmGroupByItem[] | null; /** 策略关联的过滤维度信息 */ FilterDimensionsParam?: string | null; /** 是否为一键告警策略 */ IsOneClick?: number | null; /** 一键告警策略是否开启 */ OneClickStatus?: number | null; /** 高级指标数量 */ AdvancedMetricNumber?: number | null; /** 策略是否是全部对象策略 */ IsBindAll?: number | null; /** 策略标签 */ Tags?: Tag[] | null; /** 是否支持告警标签 */ IsSupportAlarmTag?: number | null; /** 多标签交/并集关系 */ TagOperation?: string | null; /** 通知模板绑定内容模板信息 */ NoticeTmplBindInfos?: NoticeContentTmplBindInfo[]; /** 模板通知的等级 */ HierarchicalNotices?: AlarmHierarchicalNotice[] | null; /** 通知模板绑定内容模板信息,同NoticeTmplBindInfos */ NoticeContentTmplBindInfos?: NoticeContentTmplBindInfo[] | null; /** 预设配置id */ PredefinedConfigID?: string | null; } /** 告警策略指标触发条件 */ interface AlarmPolicyCondition { /** 告警触发条件的判断方式. 0: 任意; 1: 全部; 2: 复合. 当取值为2的时候为复合告警,与参数 ComplexExpression 配合使用. */ IsUnionRule: number | null; /** 告警触发条件列表 */ Rules: AlarmPolicyRule[] | null; /** 复合告警触发条件的判断表达式,当 IsUnionRule 取值为2的时候有效. 其作用是描述多个触发条件需要满足表达式求值为True时才算是满足告警条件. */ ComplexExpression?: string | null; } /** 告警策略事件触发条件 */ interface AlarmPolicyEventCondition { /** 告警触发条件列表 */ Rules: AlarmPolicyRule[] | null; } /** 告警策略过滤条件 */ interface AlarmPolicyFilter { /** 过滤条件类型 DIMENSION=使用 Dimensions 做过滤 */ Type: string | null; /** AlarmPolicyDimension 二维数组序列化后的json字符串,一维数组之间互为或关系,一维数组内的元素互为与关系 */ Dimensions?: string | null; } /** 告警策略触发条件 */ interface AlarmPolicyRule { /** 指标名或事件名,支持的指标可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询,支持的事件可以从 [DescribeAlarmEvents](https://cloud.tencent.com/document/product/248/51284) 查询 。 */ MetricName?: string | null; /** 秒数 统计周期,支持的值可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。 */ Period?: number | null; /** 英文运算符intelligent=无阈值智能检测eq=等于ge=大于等于gt=大于le=小于等于lt=小于ne=不等于day_increase=天同比增长day_decrease=天同比下降day_wave=天同比波动week_increase=周同比增长week_decrease=周同比下降week_wave=周同比波动cycle_increase=环比增长cycle_decrease=环比下降cycle_wave=环比波动re=正则匹配支持的值可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。 */ Operator?: string | null; /** 阈值,支持的范围可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。 */ Value?: string | null; /** 周期数 持续通知周期 1=持续1个周期 2=持续2个周期...,支持的值可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询 */ ContinuePeriod?: number | null; /** 秒数 告警间隔 0=不重复 300=每5分钟告警一次 600=每10分钟告警一次 900=每15分钟告警一次 1800=每30分钟告警一次 3600=每1小时告警一次 7200=每2小时告警一次 10800=每3小时告警一次 21600=每6小时告警一次 43200=每12小时告警一次 86400=每1天告警一次 */ NoticeFrequency?: number | null; /** 告警频率是否指数增长 0=否 1=是 */ IsPowerNotice?: number | null; /** 对于单个触发规则的过滤条件 */ Filter?: AlarmPolicyFilter | null; /** 指标展示名,用于出参 */ Description?: string | null; /** 单位,用于出参 */ Unit?: string | null; /** 触发条件类型 STATIC=静态阈值 DYNAMIC=动态阈值。创建或编辑策略时,如不填则默认为 STATIC。 */ RuleType?: string | null; /** 是否为高级指标,0否,1是 */ IsAdvanced?: number | null; /** 高级指标是否开通,0否,1是 */ IsOpen?: number | null; /** 集成中心产品ID */ ProductId?: string | null; /** 最大值 */ ValueMax?: number | null; /** 最小值 */ ValueMin?: number | null; /** 告警分级阈值配置 */ HierarchicalValue?: AlarmHierarchicalValue | null; /** 是否延迟指标 */ IsLatenessMetric?: number | null; } /** 告警策略触发任务 */ interface AlarmPolicyTriggerTask { /** 触发任务类型 AS=弹性伸缩 */ Type: string | null; /** 用 json 表示配置信息 {"Key1":"Value1","Key2":"Value2"} */ TaskConfig: string | null; } /** url鉴权 */ interface BasicAuth { /** 用户名 */ UserName?: string | null; /** 密码 */ Password?: string | null; } /** 策略绑定实例维度信息 */ interface BindingPolicyObjectDimension { /** 地域名 */ Region: string; /** 地域ID */ RegionId?: number; /** 实例的维度信息,格式为{"unInstanceId":"ins-00jvv9mo"}。不同云产品的维度信息不同,详见[指标维度信息Dimensions列表](https://cloud.tencent.com/document/product/248/50397) */ Dimensions?: string; /** 事件维度信息 */ EventDimensions?: string; } /** 告警通知中的推送CLS操作 */ interface CLSNotice { /** 地域 */ Region: string; /** 日志集Id */ LogSetId: string; /** 主题Id */ TopicId: string; /** 启停状态,可不传,默认启用。0=停用,1=启用 */ Enable?: number; } /** 统一的命名空间信息 */ interface CommonNamespace { /** 命名空间标示 */ Id: string; /** 命名空间名称 */ Name: string; /** 命名空间值 */ Value: string; /** 产品名称 */ ProductName: string; /** 配置信息 */ Config: string; /** 支持地域列表 */ AvailableRegions: string[]; /** 排序Id */ SortId: number; /** Dashboard中的唯一表示 */ DashboardId: string; } /** 策略类型信息 */ interface CommonNamespaceNew { /** 命名空间标示 */ Id: string; /** 命名空间名称 */ Name: string; /** 监控类型 */ MonitorType: string; /** 维度信息 */ Dimensions: DimensionNew[]; } /** 告警条件 */ interface Condition { /** 告警通知频率 */ AlarmNotifyPeriod?: number; /** 重复通知策略预定义(0 - 只告警一次, 1 - 指数告警,2 - 连接告警) */ AlarmNotifyType?: number; /** 检测方式 */ CalcType?: string | null; /** 检测值 */ CalcValue?: string | null; /** 持续时间,单位秒 */ ContinueTime?: string | null; /** 指标ID */ MetricID?: number; /** 指标展示名称(对外) */ MetricDisplayName?: string; /** 周期 */ Period?: number; /** 规则ID */ RuleID?: number; /** 指标单位 */ Unit?: string; /** 是否为高级指标,0:否;1:是 */ IsAdvanced?: number; /** 是否开通高级指标,0:否;1:是 */ IsOpen?: number; /** 产品ID */ ProductId?: string | null; /** 告警分级阈值配置 */ HierarchicalValue?: AlarmHierarchicalValue | null; /** 指标类型,用于区分动态指标 */ RuleType?: string | null; } /** 告警条件模板 */ interface ConditionsTemp { /** 模板名称 */ TemplateName: string | null; /** 指标触发条件 */ Condition: AlarmPolicyCondition | null; /** 事件触发条件 */ EventCondition: AlarmPolicyEventCondition | null; } /** 创建策略传入的阈值告警条件 */ interface CreatePolicyGroupCondition { /** 指标Id */ MetricId: number; /** 告警发送收敛类型。0连续告警,1指数告警 */ AlarmNotifyType: number; /** 告警发送周期单位秒。0 每隔triggerTime秒触发一次 */ AlarmNotifyPeriod: number; /** 比较类型,1表示大于,2表示大于等于,3表示小于,4表示小于等于,5表示相等,6表示不相等。如果指标有配置默认比较类型值可以不填。 */ CalcType?: number; /** 比较的值,如果指标不必须CalcValue可不填 */ CalcValue?: number; /** 数据聚合周期(单位秒),若指标有默认值可不填 */ CalcPeriod?: number; /** 持续几个检测周期触发规则会告警 */ ContinuePeriod?: number; /** 如果通过模板创建,需要传入模板中该指标的对应RuleId */ RuleId?: number; } /** 创建策略传入的事件告警条件 */ interface CreatePolicyGroupEventCondition { /** 告警事件的Id */ EventId: number; /** 告警发送收敛类型。0连续告警,1指数告警 */ AlarmNotifyType: number; /** 告警发送周期单位秒。0 每隔triggerTime秒触发一次 */ AlarmNotifyPeriod: number; /** 如果通过模板创建,需要传入模板中该指标的对应RuleId */ RuleId?: number; } /** 监控数据点 */ interface DataPoint { /** 实例对象维度组合 */ Dimensions?: Dimension[]; /** 时间戳数组,表示那些时间点有数据,缺失的时间戳,没有数据点,可以理解为掉点了 */ Timestamps?: number[]; /** 监控值数组,该数组和Timestamps一一对应 */ Values?: number[]; /** 监控值数组,该数组和Timestamps一一对应 */ MaxValues?: number[] | null; /** 监控值数组,该数组和Timestamps一一对应 */ MinValues?: number[] | null; /** 监控值数组,该数组和Timestamps一一对应 */ AvgValues?: number[] | null; } /** DescribeAccidentEventList接口的出参类型 */ interface DescribeAccidentEventListAlarms { /** 事件分类 */ BusinessTypeDesc: string | null; /** 事件类型 */ AccidentTypeDesc: string | null; /** 事件分类的ID,1表示服务问题,2表示其他订阅 */ BusinessID: number | null; /** 事件状态的ID,0表示已恢复,1表示未恢复 */ EventStatus: number | null; /** 影响的对象 */ AffectResource: string | null; /** 事件的地域 */ Region: string | null; /** 事件发生的时间 */ OccurTime: string | null; /** 更新时间 */ UpdateTime: string | null; } /** DescribeAlarmSmsQuota接口的配额信息 */ interface DescribeAlarmSmsQuotaQuota { /** 配额类型 */ Type: string; /** 配额名称 */ Name: string; /** 免费配额剩余量 */ FreeLeft: number; /** 付费配额剩余量 */ PurchaseLeft: number; /** 已使用量 */ Used: number; } /** DescribeBasicAlarmList返回的Alarms */ interface DescribeBasicAlarmListAlarms { /** 该条告警的ID */ Id: number; /** 项目ID */ ProjectId: number | null; /** 项目名称 */ ProjectName: string | null; /** 告警状态ID,0表示未恢复;1表示已恢复;2,3,5表示数据不足;4表示已失效 */ Status: number | null; /** 告警状态,ALARM表示未恢复;OK表示已恢复;NO_DATA表示数据不足;NO_CONF表示已失效 */ AlarmStatus: string | null; /** 策略组ID */ GroupId: number | null; /** 策略组名 */ GroupName: string | null; /** 发生时间 */ FirstOccurTime: string | null; /** 持续时间,单位s */ Duration: number | null; /** 结束时间 */ LastOccurTime: string | null; /** 告警内容 */ Content: string | null; /** 告警对象 */ ObjName: string | null; /** 告警对象ID */ ObjId: string | null; /** 策略类型 */ ViewName: string | null; /** VPC,只有CVM有 */ Vpc: string | null; /** 指标ID */ MetricId: number | null; /** 指标名 */ MetricName: string | null; /** 告警类型,0表示指标告警,2表示产品事件告警,3表示平台事件告警 */ AlarmType: number | null; /** 地域 */ Region: string | null; /** 告警对象维度信息 */ Dimensions: string | null; /** 通知方式 */ NotifyWay: string[] | null; /** 所属实例组信息 */ InstanceGroup: InstanceGroup[] | null; } /** DescribeBindingPolicyObjectList接口的Dimension */ interface DescribeBindingPolicyObjectListDimension { /** 地域id */ RegionId: number; /** 地域简称 */ Region: string; /** 维度组合json字符串 */ Dimensions: string; /** 事件维度组合json字符串 */ EventDimensions: string; } /** 查询策略绑定对象列表接口返回的对象实例信息 */ interface DescribeBindingPolicyObjectListInstance { /** 对象唯一id */ UniqueId: string; /** 表示对象实例的维度集合,jsonObj字符串 */ Dimensions: string; /** 对象是否被屏蔽,0表示未屏蔽,1表示被屏蔽 */ IsShielded: number; /** 对象所在的地域 */ Region: string; } /** DescribeBindingPolicyObjectList返回的是实例分组信息 */ interface DescribeBindingPolicyObjectListInstanceGroup { /** 实例分组id */ InstanceGroupId: number; /** 告警策略类型名称 */ ViewName: string; /** 最后编辑uin */ LastEditUin: string; /** 实例分组名称 */ GroupName: string; /** 实例数量 */ InstanceSum: number; /** 更新时间 */ UpdateTime: number; /** 创建时间 */ InsertTime: number; /** 实例所在的地域集合 */ Regions: string[] | null; } /** DescribePolicyConditionList策略条件 */ interface DescribePolicyConditionListCondition { /** 策略视图名称 */ PolicyViewName: string; /** 事件告警条件 */ EventMetrics: DescribePolicyConditionListEventMetric[] | null; /** 是否支持多地域 */ IsSupportMultiRegion: boolean; /** 指标告警条件 */ Metrics: DescribePolicyConditionListMetric[] | null; /** 策略类型名称 */ Name: string; /** 排序id */ SortId: number; /** 是否支持默认策略 */ SupportDefault: boolean; /** 支持该策略类型的地域列表 */ SupportRegions: string[] | null; /** 弃用信息 */ DeprecatingInfo?: DescribePolicyConditionListResponseDeprecatingInfo | null; } /** DescribePolicyConditionList.ConfigManual */ interface DescribePolicyConditionListConfigManual { /** 检测方式 */ CalcType: DescribePolicyConditionListConfigManualCalcType | null; /** 检测阈值 */ CalcValue: DescribePolicyConditionListConfigManualCalcValue | null; /** 持续时间 */ ContinueTime: DescribePolicyConditionListConfigManualContinueTime | null; /** 数据周期 */ Period: DescribePolicyConditionListConfigManualPeriod | null; /** 持续周期个数 */ PeriodNum: DescribePolicyConditionListConfigManualPeriodNum | null; /** 聚合方式 */ StatType: DescribePolicyConditionListConfigManualStatType | null; } /** DescribePolicyConditionList.ConfigManual.CalcType */ interface DescribePolicyConditionListConfigManualCalcType { /** CalcType 取值 */ Keys: number[] | null; /** 是否必须 */ Need: boolean; } /** DescribePolicyConditionList.ConfigManual.CalcValue */ interface DescribePolicyConditionListConfigManualCalcValue { /** 默认值 */ Default: string | null; /** 固定值 */ Fixed: string | null; /** 最大值 */ Max: string | null; /** 最小值 */ Min: string | null; /** 是否必须 */ Need: boolean; } /** DescribePolicyConditionList.ConfigManual.ContinueTime */ interface DescribePolicyConditionListConfigManualContinueTime { /** 默认持续时间,单位:秒 */ Default: number | null; /** 可选持续时间,单位:秒 */ Keys: number[] | null; /** 是否必须 */ Need: boolean; } /** DescribePolicyConditionList.ConfigManual.Period */ interface DescribePolicyConditionListConfigManualPeriod { /** 默认周期,单位:秒 */ Default: number | null; /** 可选周期,单位:秒 */ Keys: number[] | null; /** 是否必须 */ Need: boolean; } /** DescribePolicyConditionList.ConfigManual.PeriodNum */ interface DescribePolicyConditionListConfigManualPeriodNum { /** 默认周期数 */ Default: number | null; /** 可选周期数 */ Keys: number[] | null; /** 是否必须 */ Need: boolean; } /** DescribePolicyConditionList.ConfigManual.StatType */ interface DescribePolicyConditionListConfigManualStatType { /** 数据聚合方式,周期5秒 */ P5: string | null; /** 数据聚合方式,周期10秒 */ P10: string | null; /** 数据聚合方式,周期1分钟 */ P60: string | null; /** 数据聚合方式,周期5分钟 */ P300: string | null; /** 数据聚合方式,周期10分钟 */ P600: string | null; /** 数据聚合方式,周期30分钟 */ P1800: string | null; /** 数据聚合方式,周期1小时 */ P3600: string | null; /** 数据聚合方式,周期1天 */ P86400: string | null; } /** DescribePolicyConditionList.EventMetric */ interface DescribePolicyConditionListEventMetric { /** 事件id */ EventId: number; /** 事件名称 */ EventShowName: string; /** 是否需要恢复 */ NeedRecovered: boolean; /** 事件类型,预留字段,当前固定取值为2 */ Type: number; } /** 指标告警配置 */ interface DescribePolicyConditionListMetric { /** 指标配置 */ ConfigManual: DescribePolicyConditionListConfigManual | null; /** 指标id */ MetricId: number; /** 指标名称 */ MetricShowName: string; /** 指标单位 */ MetricUnit: string; } /** DescribePolicyConditionListResponseDeprecatingInfo */ interface DescribePolicyConditionListResponseDeprecatingInfo { /** 是否隐藏 */ Hidden?: boolean | null; /** 新视图名称 */ NewViewNames?: string[] | null; /** 描述 */ Description?: string | null; } /** 查询策略输出的用户回调信息 */ interface DescribePolicyGroupInfoCallback { /** 用户回调接口地址 */ CallbackUrl: string; /** 用户回调接口状态,0表示未验证,1表示已验证,2表示存在url但没有通过验证 */ ValidFlag: number; /** 用户回调接口验证码 */ VerifyCode: string; } /** 查询策略输出的阈值告警条件 */ interface DescribePolicyGroupInfoCondition { /** 指标名称 */ MetricShowName: string; /** 数据聚合周期(单位秒) */ Period: number; /** 指标id */ MetricId: number; /** 阈值规则id */ RuleId: number; /** 指标单位 */ Unit: string; /** 告警发送收敛类型。0连续告警,1指数告警 */ AlarmNotifyType: number; /** 告警发送周期单位秒。0 每隔triggerTime秒触发一次 */ AlarmNotifyPeriod: number; /** 比较类型,1表示大于,2表示大于等于,3表示小于,4表示小于等于,5表示相等,6表示不相等,7表示日同比上涨,8表示日同比下降,9表示周同比上涨,10表示周同比下降,11表示周期环比上涨,12表示周期环比下降 */ CalcType: number | null; /** 检测阈值 */ CalcValue: string | null; /** 持续多长时间触发规则会告警(单位秒) */ ContinueTime: number | null; /** 告警指标名 */ MetricName: string | null; } /** 查询策略输出的模板策略组信息 */ interface DescribePolicyGroupInfoConditionTpl { /** 策略组id */ GroupId: number; /** 策略组名称 */ GroupName: string; /** 策略类型 */ ViewName: string; /** 策略组说明 */ Remark: string; /** 最后编辑的用户uin */ LastEditUin: string; /** 更新时间 */ UpdateTime: number | null; /** 创建时间 */ InsertTime: number | null; /** 是否且规则 */ IsUnionRule: number | null; } /** 查询策略输出的事件告警条件 */ interface DescribePolicyGroupInfoEventCondition { /** 事件id */ EventId: number; /** 事件告警规则id */ RuleId: number; /** 事件名称 */ EventShowName: string; /** 告警发送周期单位秒。0 每隔triggerTime秒触发一次 */ AlarmNotifyPeriod: number; /** 告警发送收敛类型。0连续告警,1指数告警 */ AlarmNotifyType: number; } /** 查询策略输出的告警接收人信息 */ interface DescribePolicyGroupInfoReceiverInfo { /** 告警接收组id列表 */ ReceiverGroupList: number[]; /** 告警接收人id列表 */ ReceiverUserList: number[]; /** 告警时间段开始时间。范围[0,86400),作为 UNIX 时间戳转成北京时间后去掉日期,例如7200表示"10:0:0" */ StartTime: number; /** 告警时间段结束时间。含义同StartTime */ EndTime: number; /** 接收类型。“group”(接收组)或“user”(接收人) */ ReceiverType: string; /** 告警通知方式。可选 "SMS","SITE","EMAIL","CALL","WECHAT" */ NotifyWay: string[]; /** 电话告警接收者uid */ UidList: number[] | null; /** 电话告警轮数 */ RoundNumber: number; /** 电话告警每轮间隔(秒) */ RoundInterval: number; /** 电话告警对个人间隔(秒) */ PersonInterval: number; /** 是否需要电话告警触达提示。0不需要,1需要 */ NeedSendNotice: number; /** 电话告警通知时机。可选"OCCUR"(告警时通知),"RECOVER"(恢复时通知) */ SendFor: string[]; /** 恢复通知方式。可选"SMS" */ RecoverNotify: string[]; /** 告警发送语言 */ ReceiveLanguage: string | null; } /** DescribePolicyGroupList.Group */ interface DescribePolicyGroupListGroup { /** 策略组id */ GroupId: number; /** 策略组名称 */ GroupName: string; /** 是否开启 */ IsOpen: boolean; /** 策略视图名称 */ ViewName: string; /** 最近编辑的用户uin */ LastEditUin: string; /** 最后修改时间 */ UpdateTime: number; /** 创建时间 */ InsertTime: number; /** 策略组绑定的实例数 */ UseSum: number; /** 策略组绑定的未屏蔽实例数 */ NoShieldedSum: number; /** 是否为默认策略,0表示非默认策略,1表示默认策略 */ IsDefault: number; /** 是否可以设置成默认策略 */ CanSetDefault: boolean; /** 父策略组id */ ParentGroupId: number; /** 策略组备注 */ Remark: string; /** 策略组所属项目id */ ProjectId: number; /** 阈值规则列表 */ Conditions: DescribePolicyGroupInfoCondition[] | null; /** 产品事件规则列表 */ EventConditions: DescribePolicyGroupInfoEventCondition[] | null; /** 用户接收人列表 */ ReceiverInfos: DescribePolicyGroupInfoReceiverInfo[] | null; /** 模板策略组 */ ConditionsTemp: DescribePolicyGroupInfoConditionTpl | null; /** 策略组绑定的实例组信息 */ InstanceGroup: DescribePolicyGroupListGroupInstanceGroup | null; /** 且或规则标识, 0表示或规则(任意一条规则满足阈值条件就告警), 1表示且规则(所有规则都满足阈值条件才告警) */ IsUnionRule: number | null; } /** DescribePolicyGroupList接口策略组绑定的实例分组信息 */ interface DescribePolicyGroupListGroupInstanceGroup { /** 实例分组名称id */ InstanceGroupId: number; /** 策略类型视图名称 */ ViewName: string; /** 最近编辑的用户uin */ LastEditUin: string; /** 实例分组名称 */ GroupName: string; /** 实例数量 */ InstanceSum: number; /** 更新时间 */ UpdateTime: number; /** 创建时间 */ InsertTime: number; } /** DescribeProductEventList的入参Dimensions */ interface DescribeProductEventListDimensions { /** 维度名 */ Name: string; /** 维度值 */ Value: string; } /** DescribeProductEventList返回的Events */ interface DescribeProductEventListEvents { /** 事件ID */ EventId: number | null; /** 事件中文名 */ EventCName: string | null; /** 事件英文名 */ EventEName: string | null; /** 事件简称 */ EventName: string | null; /** 产品中文名 */ ProductCName: string | null; /** 产品英文名 */ ProductEName: string | null; /** 产品简称 */ ProductName: string | null; /** 实例ID */ InstanceId: string | null; /** 实例名称 */ InstanceName: string | null; /** 项目ID */ ProjectId: string | null; /** 地域 */ Region: string | null; /** 状态 */ Status: string | null; /** 是否支持告警 */ SupportAlarm: number | null; /** 事件类型 */ Type: string | null; /** 开始时间 */ StartTime: number | null; /** 更新时间 */ UpdateTime: number | null; /** 实例对象信息 */ Dimensions: DescribeProductEventListEventsDimensions[] | null; /** 实例对象附加信息 */ AdditionMsg: DescribeProductEventListEventsDimensions[] | null; /** 是否配置告警 */ IsAlarmConfig: number | null; /** 策略信息 */ GroupInfo: DescribeProductEventListEventsGroupInfo[] | null; /** 显示名称ViewName */ ViewName: string | null; } /** DescribeProductEventList返回的Events的Dimensions */ interface DescribeProductEventListEventsDimensions { /** 维度名(英文) */ Key: string | null; /** 维度名(中文) */ Name: string | null; /** 维度值 */ Value: string | null; } /** DescribeProductEventList返回的Events里的GroupInfo */ interface DescribeProductEventListEventsGroupInfo { /** 策略ID */ GroupId: number | null; /** 策略名 */ GroupName: string | null; } /** DescribeProductEventList返回的OverView对象 */ interface DescribeProductEventListOverView { /** 状态变更的事件数量 */ StatusChangeAmount: number | null; /** 告警状态未配置的事件数量 */ UnConfigAlarmAmount: number | null; /** 异常事件数量 */ UnNormalEventAmount: number | null; /** 未恢复的事件数量 */ UnRecoverAmount: number | null; } /** 实例对象的维度组合 */ interface Dimension { /** 实例维度名称 */ Name: string | null; /** 实例维度值 */ Value: string | null; } /** 策略类型的维度信息 */ interface DimensionNew { /** 维度 key 标示,后台英文名 */ Key: string; /** 维度 key 名称,中英文前台展示名 */ Name: string; /** 是否必选 */ IsRequired: boolean; /** 支持的操作符列表 */ Operators: Operator[]; /** 是否支持多选 */ IsMultiple: boolean; /** 创建后是否可以修改 */ IsMutable: boolean; /** 是否展示给用户 */ IsVisible: boolean; /** 能否用来过滤策略列表 */ CanFilterPolicy: boolean; /** 能否用来过滤告警历史 */ CanFilterHistory: boolean; /** 能否作为聚合维度 */ CanGroupBy: boolean; /** 是否必须作为聚合维度 */ MustGroupBy: boolean; /** 前端翻译要替换的 key */ ShowValueReplace: string | null; } /** 维度信息 */ interface DimensionsDesc { /** 维度名数组 */ Dimensions: string[]; } /** 事件告警条件 */ interface EventCondition { /** 告警通知频率 */ AlarmNotifyPeriod?: string | null; /** 重复通知策略预定义(0 - 只告警一次, 1 - 指数告警,2 - 连接告警) */ AlarmNotifyType?: string | null; /** 事件ID */ EventID?: string; /** 事件展示名称(对外) */ EventDisplayName?: string; /** 规则ID */ RuleID?: string; /** 指标名 */ MetricName?: string | null; } /** 查询过滤参数 */ interface Filter { /** 过滤方式(=, !=, in) */ Type?: string; /** 过滤维度名 */ Key?: string; /** 过滤值,in过滤方式用逗号分割多个值 */ Value?: string; /** 过滤条件名称 */ Name?: string; /** 过滤条件取值范围 */ Values?: string[]; } /** Grafana可视化服务 授权账户信息 */ interface GrafanaAccountInfo { /** 用户账号ID */ UserId?: string; /** 用户权限 */ Role?: GrafanaAccountRole[]; /** 备注 */ Notes?: string; /** 创建时间 */ CreateAt?: string; /** 实例 ID */ InstanceId?: string | null; /** 用户主账号 UIN */ Uin?: string; } /** Grafana可视化服务 账号权限 */ interface GrafanaAccountRole { /** 组织 */ Organization?: string; /** 权限(Admin、Editor、Viewer) */ Role?: string; } /** Grafana 告警渠道 */ interface GrafanaChannel { /** 渠道 ID */ ChannelId: string; /** 渠道名 */ ChannelName: string; /** 告警通道模板 ID 数组 */ Receivers: string[]; /** 创建时间 */ CreatedAt: string; /** 更新时间 */ UpdatedAt: string; /** 告警渠道的所有生效组织 */ OrganizationIds: string[] | null; } /** 查询 Grafana 实例时的实例类型 */ interface GrafanaInstanceInfo { /** 实例名 */ InstanceName?: string; /** 实例 ID */ InstanceId?: string; /** 地域 */ Region?: string; /** VPC ID */ VpcId?: string; /** 子网 ID 数组 */ SubnetIds?: string[]; /** Grafana 公网地址 */ InternetUrl?: string; /** Grafana 内网地址 */ InternalUrl?: string; /** 创建时间 */ CreatedAt?: string; /** 运行状态(1:正在创建;2:运行中;3:异常;4:重启中;5:停机中; 6:已停机; 7: 已删除) */ InstanceStatus?: number; /** 实例的标签 */ TagSpecification?: PrometheusTag[]; /** 实例的可用区 */ Zone?: string; /** 计费模式(1:包年包月) */ InstanceChargeType?: number; /** VPC 名称 */ VpcName?: string; /** 子网名称 */ SubnetName?: string; /** 地域 ID */ RegionId?: number; /** 可访问此实例的完整 URL */ RootUrl?: string; /** 是否开启 SSO */ EnableSSO?: boolean; /** 版本号 */ Version?: string; /** SSO登录时是否开启cam鉴权 */ EnableSSOCamCheck?: boolean; } /** Grafana 集成实例配置 */ interface GrafanaIntegrationConfig { /** 集成 ID */ IntegrationId?: string; /** 集成类型 */ Kind?: string; /** 集成内容 */ Content?: string; /** 集成描述 */ Description?: string; /** Grafana 跳转地址(目前未使用,默认为空) */ GrafanaURL?: string | null; } /** Grafana 告警渠道 */ interface GrafanaNotificationChannel { /** 渠道 ID */ ChannelId?: string; /** 渠道名 */ ChannelName?: string; /** 告警通道模板 ID 数组 */ Receivers?: string[]; /** 创建时间 */ CreatedAt?: string; /** 更新时间 */ UpdatedAt?: string; /** 默认生效组织,已废弃,请使用 OrganizationIds */ OrgId?: string; /** 额外生效组织,已废弃,请使用 OrganizationIds */ ExtraOrgIds?: string[] | null; /** 生效组织,已废弃,请使用 OrganizationIds */ OrgIds?: string[] | null; /** 告警渠道的所有生效组织 */ OrganizationIds?: string[] | null; } /** Grafana 插件 */ interface GrafanaPlugin { /** Grafana 插件 ID */ PluginId: string; /** Grafana 插件版本 */ Version: string | null; } /** 实例维度组合数组 */ interface Instance { /** 实例的维度组合 */ Dimensions: Dimension[]; } /** DescribeBasicAlarmList返回的Alarms里的InstanceGroup */ interface InstanceGroup { /** 实例组ID */ InstanceGroupId: number | null; /** 实例组名 */ InstanceGroupName: string | null; } /** 告警对象所属实例组 */ interface InstanceGroups { /** 实例组 Id */ Id: number; /** 实例组名称 */ Name: string; } /** export 集成配置 */ interface IntegrationConfiguration { /** 名字 */ Name?: string; /** 类型 */ Kind?: string; /** 内容 */ Content?: string; /** 状态 */ Status?: number; /** 实例类型 */ Category?: string; /** 实例描述 */ InstanceDesc?: string; /** dashboard 的 URL */ GrafanaDashboardURL?: string; } /** prometheus集成指标详情 */ interface IntegrationMetric { /** 指标名 */ MetricName?: string; /** 指标名称 */ Name?: string; /** 统计类型 */ MetricType?: string; /** 单位 */ Unit?: string; /** 指标详细描述 */ Description?: string; } /** prometheus集成分组指标 */ interface IntegrationMetricGroup { /** 分组标识 */ Group?: string; /** 指标详情 */ Metrics?: IntegrationMetric[]; /** 分组名称 */ GroupName?: string; } /** k8s中标签,一般以数组的方式存在 */ interface Label { /** map表中的Name */ Name: string; /** map表中的Value */ Value: string; } /** 日志告警请求信息 */ interface LogAlarmReq { /** apm实例id */ InstanceId: string; /** 检索条件信息 */ Filter: LogFilterInfo[]; /** 告警合并开启/暂停 */ AlarmMerge: string; /** 告警合并时间 */ AlarmMergeTime: string; } /** 日志告警检索条件结构体 */ interface LogFilterInfo { /** 字段名 */ Key: string; /** 比较符号 */ Operator: string; /** 字段值 */ Value: string; } /** Prometheus Agent 管理命令行 */ interface ManagementCommand { /** Agent 安装命令 */ Install: string | null; /** Agent 重启命令 */ Restart: string | null; /** Agent 停止命令 */ Stop: string | null; /** Agent 状态检测命令 */ StatusCheck: string | null; /** Agent 日志检测命令 */ LogCheck: string | null; } /** 指标,可用于设置告警、查询数据 */ interface Metric { /** 告警策略类型 */ Namespace?: string; /** 指标名 */ MetricName?: string; /** 指标展示名 */ Description?: string; /** 最小值 */ Min?: number; /** 最大值 */ Max?: number; /** 维度列表 */ Dimensions?: string[]; /** 单位 */ Unit?: string; /** 指标配置 */ MetricConfig?: MetricConfig | null; /** 是否为高级指标。1是 0否 */ IsAdvanced?: number | null; /** 高级指标是否开通。1是 0否 */ IsOpen?: number | null; /** 集成中心产品ID */ ProductId?: number | null; /** 匹配运算符 */ Operators?: Operator[] | null; /** 指标触发 */ Periods?: number[] | null; /** 是否延迟指标 */ IsLatenessMetric?: number | null; } /** 指标配置 */ interface MetricConfig { /** 允许使用的运算符 */ Operator: string[]; /** 允许配置的数据周期,以秒为单位 */ Period: number[]; /** 允许配置的持续周期个数 */ ContinuePeriod: number[]; } /** DescribeMetricData接口出参 */ interface MetricData { /** 指标名 */ MetricName?: string; /** 监控数据点 */ Points?: MetricDataPoint[]; } /** DescribeMetricData出参 */ interface MetricDataPoint { /** 实例对象维度组合 */ Dimensions: Dimension[]; /** 数据点列表 */ Values: Point[]; } /** 指标数据的解释 */ interface MetricObjectMeaning { /** 指标英文解释 */ En: string; /** 指标中文解释 */ Zh: string; } /** 对业务指标的单位及支持统计周期的描述 */ interface MetricSet { /** 命名空间,每个云产品会有一个命名空间 */ Namespace: string; /** 指标名称 */ MetricName: string; /** 指标使用的单位 */ Unit: string; /** 指标使用的单位 */ UnitCname: string; /** 指标支持的统计周期,单位是秒,如60、300 */ Period: number[]; /** 统计周期内指标方式 */ Periods: PeriodsSt[]; /** 统计指标含义解释 */ Meaning: MetricObjectMeaning; /** 维度描述信息 */ Dimensions: DimensionsDesc[]; /** 指标中文名 */ MetricCName: string | null; /** 指标英文名 */ MetricEName: string | null; } /** DescribeMidDimensionValueList的查询条件 */ interface MidQueryCondition { /** 维度 */ Key: string; /** 操作符,支持=、in */ Operator: string; /** 维度值,当Op是=时,只使用第一个元素 */ Value: string[]; } /** ModifyConditionsTemplateRequestCondition,Condition入参字段值 */ interface ModifyConditionsTemplateRequestCondition { /** 统计周期 */ CalcPeriod: string; /** 统计方式 */ CalcType: string; /** 持续周期 */ ContinuePeriod: string; /** 指标ID */ MetricID: number; /** 统计值 */ CalcValue: string; /** 告警通知周期 */ AlarmNotifyPeriod?: string; /** 告警通知方式 */ AlarmNotifyType?: number; /** 规则ID */ RuleID?: number; } /** ModifyConditionsTemplateRequestEventCondition */ interface ModifyConditionsTemplateRequestEventCondition { /** 告警通知周期 */ AlarmNotifyPeriod?: string; /** 告警通知方式 */ AlarmNotifyType?: string; /** 事件ID */ EventID?: string; /** 规则ID */ RuleID?: number; /** 重构后的eventType */ MetricName?: string; /** 事件描述信息 */ Description?: string; } /** 修改告警策略组传入的指标阈值条件 */ interface ModifyPolicyGroupCondition { /** 指标id */ MetricId: number; /** 比较类型,1表示大于,2表示大于等于,3表示小于,4表示小于等于,5表示相等,6表示不相等 */ CalcType: number; /** 检测阈值 */ CalcValue: string; /** 检测指标的数据周期 */ CalcPeriod: number; /** 持续周期个数 */ ContinuePeriod: number; /** 告警发送收敛类型。0连续告警,1指数告警 */ AlarmNotifyType: number; /** 告警发送周期单位秒。0 每隔triggerTime秒触发一次 */ AlarmNotifyPeriod: number; /** 规则id,不填表示新增,填写了ruleId表示在已存在的规则基础上进行修改 */ RuleId?: number; } /** 修改告警策略组传入的事件告警条件 */ interface ModifyPolicyGroupEventCondition { /** 事件id */ EventId: number; /** 告警发送收敛类型。0连续告警,1指数告警 */ AlarmNotifyType: number; /** 告警发送周期单位秒。0 每隔triggerTime秒触发一次 */ AlarmNotifyPeriod: number; /** 规则id,不填表示新增,填写了ruleId表示在已存在的规则基础上进行修改 */ RuleId?: number; } /** 监控类型详细信息 */ interface MonitorTypeInfo { /** 监控类型ID */ Id: string; /** 监控类型 */ Name: string; /** 排列顺序 */ SortId: number; } /** 策略类型 */ interface MonitorTypeNamespace { /** 监控类型 */ MonitorType: string; /** 策略类型值 */ Namespace: string; } /** 通知模板与策略绑定关系 */ interface NoticeBindPolicys { /** 告警通知模板 ID */ NoticeId?: string; /** 告警通知模板绑定的告警策略ID列表 */ PolicyIds?: string[]; } /** 通知内容模板绑定信息 */ interface NoticeContentTmplBindInfo { /** 通知内容模板ID */ ContentTmplID?: string; /** 通知模板ID */ NoticeID?: string; } /** 维度支持的操作符信息 */ interface Operator { /** 运算符标识 */ Id: string; /** 运算符展示名 */ Name: string; } /** 周期内的统计方式 */ interface PeriodsSt { /** 周期 */ Period: string; /** 统计方式 */ StatType: string[]; } /** 监控数据点 */ interface Point { /** 该监控数据点生成的时间点 */ Timestamp: number; /** 监控数据点的值 */ Value: number | null; } /** 策略组信息 */ interface PolicyGroup { /** 是否可设为默认告警策略 */ CanSetDefault: boolean; /** 告警策略组ID */ GroupID: number; /** 告警策略组名称 */ GroupName: string; /** 创建时间 */ InsertTime: number; /** 是否为默认告警策略 */ IsDefault: number; /** 告警策略启用状态 */ Enable: boolean; /** 最后修改人UIN */ LastEditUin: number; /** 未屏蔽的实例数 */ NoShieldedInstanceCount: number; /** 父策略组ID */ ParentGroupID: number; /** 所属项目ID */ ProjectID: number; /** 告警接收对象信息 */ ReceiverInfos: PolicyGroupReceiverInfo[] | null; /** 备注信息 */ Remark: string; /** 修改时间 */ UpdateTime: number; /** 总绑定实例数 */ TotalInstanceCount: number; /** 视图 */ ViewName: string; /** 是否为与关系规则 */ IsUnionRule: number; } /** 2018版策略模板列表接收人信息 */ interface PolicyGroupReceiverInfo { /** 有效时段结束时间 */ EndTime: number; /** 是否需要发送通知 */ NeedSendNotice: number; /** 告警接收渠道 */ NotifyWay: string[] | null; /** 电话告警对个人间隔(秒) */ PersonInterval: number; /** 消息接收组列表 */ ReceiverGroupList: number[] | null; /** 接受者类型 */ ReceiverType: string; /** 接收人列表。通过平台接口查询到的接收人id列表 */ ReceiverUserList: number[] | null; /** 告警恢复通知方式 */ RecoverNotify: string[] | null; /** 电话告警每轮间隔(秒) */ RoundInterval: number; /** 电话告警轮数 */ RoundNumber: number; /** 电话告警通知时机。可选"OCCUR"(告警时通知),"RECOVER"(恢复时通知) */ SendFor: string[] | null; /** 有效时段开始时间 */ StartTime: number; /** 电话告警接收者uid */ UIDList: number[] | null; } /** 策略标签 */ interface PolicyTag { /** 标签Key */ Key: string; /** 标签Value */ Value: string; } /** 云产品监控支持的产品简要信息 */ interface ProductSimple { /** 命名空间 */ Namespace: string; /** 产品中文名称 */ ProductName: string; /** 产品英文名称 */ ProductEnName: string | null; } /** prometheus agent */ interface PrometheusAgent { /** Agent 名 */ Name: string | null; /** Agent ID */ AgentId: string; /** 实例 ID */ InstanceId: string; /** Agent IP */ Ipv4: string | null; /** 心跳时间 */ HeartbeatTime: string | null; /** 最近一次错误 */ LastError: string | null; /** Agent 版本 */ AgentVersion: string | null; /** Agent 状态 */ Status: number; } /** 托管Prometheus agent信息 */ interface PrometheusAgentInfo { /** 集群类型。可填入tke、eks、tkeedge、tdcc,分别代表标准集群、弹性集群、边缘集群、注册集群 */ ClusterType: string; /** 集成容器服务中关联的集群ID */ ClusterId: string; /** 该参数未使用,不需要填写 */ Describe?: string; } /** 托管prometheus agent概览 */ interface PrometheusAgentOverview { /** 集群类型 */ ClusterType?: string; /** 集群id */ ClusterId?: string; /** agent状态normal = 正常abnormal = 异常 */ Status?: string; /** 集群名称 */ ClusterName?: string; /** 额外labels本集群的所有指标都会带上这几个label */ ExternalLabels?: Label[] | null; /** 集群所在地域 */ Region?: string | null; /** 集群所在VPC ID */ VpcId?: string | null; /** 记录关联等操作的失败信息 */ FailedReason?: string | null; /** agent名称 */ Name?: string | null; /** 是否已开启公网访问,true 开启,false 未开启 */ EnableExternal?: boolean | null; /** 采集agent期望pod数 */ DesiredAgentNum?: number | null; /** 采集agent已正常启动pod数 */ ReadyAgentNum?: number | null; } /** Prometheus自定义告警通知时间段 */ interface PrometheusAlertAllowTimeRange { /** 从0点开始的秒数 */ Start?: string | null; /** 从0点开始的秒数 */ End?: string | null; } /** Prometheus告警自定义通知模板 */ interface PrometheusAlertCustomReceiver { /** 自定义通知类型alertmanager -- vpc内自建alertmanagerwebhook -- vpc内webhook地址 */ Type?: string | null; /** alertmanager/webhook地址。(prometheus实例同vpc内ip) */ Url?: string | null; /** 允许发送告警的时间范围 */ AllowedTimeRanges?: PrometheusAlertAllowTimeRange[] | null; /** alertmanager所在的内网集群ID */ ClusterId?: string | null; /** alertmanager所在的内网集群类型(tke/eks/tdcc) */ ClusterType?: string | null; } /** 告警分组内告警规则信息 */ interface PrometheusAlertGroupRuleSet { /** 告警规则名称,同一告警分组下不允许重名 */ RuleName?: string | null; /** 标签列表 */ Labels?: PrometheusRuleKV[] | null; /** 注释列表告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。 */ Annotations?: PrometheusRuleKV[] | null; /** 规则报警持续时间 */ Duration?: string | null; /** 规则表达式,可参考告警规则说明 */ Expr?: string | null; /** 告警规则状态:2-启用3-禁用为空默认启用 */ State?: number | null; } /** Prometheus告警规则分组信息 */ interface PrometheusAlertGroupSet { /** 告警分组ID,满足正则表达式`alert-[a-z0-9]{8}` */ GroupId?: string | null; /** 告警分组名称 */ GroupName?: string | null; /** 腾讯云可观测平台告警模板ID ,返回告警模板转换后的notice ID。 */ AMPReceivers?: string[] | null; /** 自定义告警模板 */ CustomReceiver?: PrometheusAlertCustomReceiver | null; /** 告警通知间隔 */ RepeatInterval?: string | null; /** 若告警分组通过模板创建,则返回模板ID */ TemplateId?: string | null; /** 分组内告警规则详情 */ Rules?: PrometheusAlertGroupRuleSet[] | null; /** 分组创建时间 */ CreatedAt?: string | null; /** 分组更新时间 */ UpdatedAt?: string | null; } /** 告警渠道使用自建alertmanager的配置 */ interface PrometheusAlertManagerConfig { /** alertmanager url */ Url: string; /** alertmanager部署所在集群类型 */ ClusterType?: string | null; /** alertmanager部署所在集群ID */ ClusterId?: string | null; } /** 托管prometheus告警策略实例 */ interface PrometheusAlertPolicyItem { /** 策略名称 */ Name: string; /** 规则列表 */ Rules: PrometheusAlertRule[]; /** 告警策略 id */ Id?: string | null; /** 如果该告警来自模板下发,则TemplateId为模板id */ TemplateId?: string | null; /** 告警渠道,模板中使用可能返回null */ Notification?: PrometheusNotificationItem | null; /** 最后修改时间 */ UpdatedAt?: string | null; /** 如果告警策略来源于用户集群CRD资源定义,则ClusterId为所属集群ID */ ClusterId?: string | null; } /** Prometheus告警规则 */ interface PrometheusAlertRule { /** 规则名称 */ Name: string; /** prometheus语句 */ Rule: string; /** 额外标签 */ Labels: Label[]; /** 告警发送模板 */ Template: string; /** 持续时间 */ For: string; /** 该条规则的描述信息 */ Describe?: string | null; /** 参考prometheus rule中的annotations */ Annotations?: Label[] | null; /** 告警规则状态 */ RuleState?: number | null; } /** 与腾讯云可观测平台融合托管 Prometheus 实例,关联集群基础信息 */ interface PrometheusClusterAgentBasic { /** 地域 */ Region: string; /** 集群类型。可填入tke、eks、tkeedge、tdcc、external,分别代表标准集群、弹性集群、边缘集群、注册集群 和外部集群 */ ClusterType: string; /** 集群 ID */ ClusterId: string; /** 是否开启公网 CLB */ EnableExternal: boolean; /** 集群内部署组件的pod 配置 */ InClusterPodConfig?: PrometheusClusterAgentPodConfig; /** 该集群采集的所有指标都会带上这些labels */ ExternalLabels?: Label[]; /** 是否安装默认采集 exporter 和采集配置 */ NotInstallBasicScrape?: boolean; /** 是否安装采集配置,true 只安装采集 exporter 不会安装采集配置,false 会同时安装采集配置 */ NotScrape?: boolean; /** 是否丢弃所有指标,true 代表丢弃所有指标,false 代表采集默认指标 */ DropAll?: boolean; /** 是否开启默认预聚合规则 */ OpenDefaultRecord?: boolean; } /** 关联集群时在集群内部署组件的pod额外配置 */ interface PrometheusClusterAgentPodConfig { /** 是否使用HostNetWork */ HostNet?: boolean; /** 指定pod运行节点 */ NodeSelector?: Label[]; /** 容忍污点 */ Tolerations?: Toleration[]; } /** prometheus配置 */ interface PrometheusConfigItem { /** 名称 */ Name: string; /** 配置内容 */ Config: string; /** 用于出参,如果该配置来至模板,则为模板id */ TemplateId?: string | null; /** 目标数 */ Targets?: Targets | null; } /** 实例的授权信息 */ interface PrometheusInstanceGrantInfo { /** 是否有计费操作权限(1=有,2=无) */ HasChargeOperation: number; /** 是否显示VPC信息的权限(1=有,2=无) */ HasVpcDisplay: number; /** 是否可修改Grafana的状态(1=有,2=无) */ HasGrafanaStatusChange: number; /** 是否有管理agent的权限(1=有,2=无) */ HasAgentManage: number; /** 是否有管理TKE集成的权限(1=有,2=无) */ HasTkeManage: number; /** 是否显示API等信息(1=有, 2=无) */ HasApiOperation: number; } /** Prometheus用量信息 */ interface PrometheusInstanceTenantUsage { /** 实例ID */ InstanceId?: string | null; /** 计费周期 */ CalcDate?: string | null; /** 总用量 */ Total?: number | null; /** 基础指标用量 */ Basic?: number | null; /** 付费指标用量 */ Fee?: number | null; } /** Prometheus 服务响应体 */ interface PrometheusInstancesItem { /** 实例ID。 */ InstanceId?: string; /** 实例名称。 */ InstanceName?: string; /** 实例计费模式。取值范围:2:包年包月3:按量 */ InstanceChargeType?: number; /** 地域 ID */ RegionId?: number; /** 可用区 */ Zone?: string; /** VPC ID */ VpcId?: string; /** 子网 ID */ SubnetId?: string; /** 存储周期 */ DataRetentionTime?: number | null; /** 实例业务状态。取值范围:1:正在创建2:运行中3:异常4:重建中5:销毁中6:已停服8:欠费停服中9:欠费已停服 */ InstanceStatus?: number; /** Grafana 面板 URL */ GrafanaURL?: string | null; /** 创建时间 */ CreatedAt?: string; /** 是否开启 Grafana0:不开启1:开启 */ EnableGrafana?: number; /** 实例IPV4地址 */ IPv4Address?: string | null; /** 实例关联的标签列表。 */ TagSpecification?: PrometheusTag[] | null; /** 购买的实例过期时间 */ ExpireTime?: string | null; /** 计费状态1:正常2:过期3:销毁4:分配中5:分配失败 */ ChargeStatus?: number | null; /** 规格名称 */ SpecName?: string | null; /** 自动续费标记0:不自动续费1:开启自动续费2:禁止自动续费-1:无效 */ AutoRenewFlag?: number | null; /** 是否快过期0:否1:快过期 */ IsNearExpire?: number | null; /** 数据写入需要的 Token */ AuthToken?: string | null; /** Prometheus Remote Write 的地址 */ RemoteWrite?: string | null; /** Prometheus HTTP Api 根地址 */ ApiRootPath?: string | null; /** Proxy 的地址 */ ProxyAddress?: string | null; /** Grafana 运行状态1:正在创建2:运行中3:异常4:重启中5:销毁中6:已停机7:已删除 */ GrafanaStatus?: number | null; /** Grafana IP 白名单列表,使用英文分号分隔 */ GrafanaIpWhiteList?: string | null; /** 实例的授权信息 */ Grant?: PrometheusInstanceGrantInfo | null; /** 绑定的 Grafana 实例 ID */ GrafanaInstanceId?: string | null; /** 告警规则限制 */ AlertRuleLimit?: number | null; /** 预聚合规则限制 */ RecordingRuleLimit?: number | null; /** 迁移状态,0-不在迁移中,1-迁移中、原实例,2-迁移中、目标实例 */ MigrationType?: number | null; } /** 托管prometheusV2实例概览 */ interface PrometheusInstancesOverview { /** 实例ID */ InstanceId: string; /** 实例名 */ InstanceName: string; /** VPC ID */ VpcId: string; /** 子网ID */ SubnetId: string; /** 运行状态(1:正在创建;2:运行中;3:异常;4:重启中;5:销毁中; 6:已停机; 7: 已删除) */ InstanceStatus: number; /** 计费状态(1:正常;2:过期; 3:销毁; 4:分配中; 5:分配失败) */ ChargeStatus: number | null; /** 是否开启 Grafana(0:不开启,1:开启) */ EnableGrafana: number; /** Grafana 面板 URL */ GrafanaURL: string | null; /** 实例付费类型(1:试用版;2:预付费) */ InstanceChargeType: number; /** 规格名称 */ SpecName: string | null; /** 存储周期 */ DataRetentionTime: number | null; /** 购买的实例过期时间 */ ExpireTime: string | null; /** 自动续费标记(0:不自动续费;1:开启自动续费;2:禁止自动续费;-1:无效) */ AutoRenewFlag: number | null; /** 绑定集群总数 */ BoundTotal: number; /** 绑定集群正常状态总数 */ BoundNormal: number; /** 资源包状态,0-无可用资源包,1-有可用资源包 */ ResourcePackageStatus?: number | null; /** 资源包规格名称 */ ResourcePackageSpecName?: string | null; } /** prometheus一个job的targets */ interface PrometheusJobTargets { /** 该Job的targets列表 */ Targets?: PrometheusTarget[]; /** job的名称 */ JobName?: string; /** targets总数 */ Total?: number; /** 健康的target总数 */ Up?: number; } /** 告警通知渠道配置 */ interface PrometheusNotificationItem { /** 是否启用 */ Enabled: boolean