UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
1,902 lines (1,609 loc) 624 kB
/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ const AbstractModel = require("../../common/abstract_model"); /** * ModifyAlarmPolicyInfo request structure. * @class */ class ModifyAlarmPolicyInfoRequest extends AbstractModel { constructor(){ super(); /** * Module name. Enter "monitor" here * @type {string || null} */ this.Module = null; /** * Alarm policy ID * @type {string || null} */ this.PolicyId = null; /** * Field to be modified. Valid values: NAME (policy name), REMARK (policy remarks) * @type {string || null} */ this.Key = null; /** * Value after modification * @type {string || null} */ this.Value = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Module = 'Module' in params ? params.Module : null; this.PolicyId = 'PolicyId' in params ? params.PolicyId : null; this.Key = 'Key' in params ? params.Key : null; this.Value = 'Value' in params ? params.Value : null; } } /** * Task triggered by alarm policy * @class */ class AlarmPolicyTriggerTask extends AbstractModel { constructor(){ super(); /** * Triggered task type. Valid value: AS (auto scaling) Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Type = null; /** * Configuration information in JSON format, such as {"Key1":"Value1","Key2":"Value2"} Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.TaskConfig = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Type = 'Type' in params ? params.Type : null; this.TaskConfig = 'TaskConfig' in params ? params.TaskConfig : null; } } /** * DescribePolicyGroupList response structure. * @class */ class DescribePolicyGroupListResponse extends AbstractModel { constructor(){ super(); /** * Policy group list. Note: This field may return null, indicating that no valid value was found. * @type {Array.<DescribePolicyGroupListGroup> || null} */ this.GroupList = null; /** * Total number of policy groups. * @type {number || null} */ this.Total = null; /** * Remarks Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Warning = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.GroupList) { this.GroupList = new Array(); for (let z in params.GroupList) { let obj = new DescribePolicyGroupListGroup(); obj.deserialize(params.GroupList[z]); this.GroupList.push(obj); } } this.Total = 'Total' in params ? params.Total : null; this.Warning = 'Warning' in params ? params.Warning : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribePrometheusInstancesOverview request structure. * @class */ class DescribePrometheusInstancesOverviewRequest extends AbstractModel { constructor(){ super(); /** * Page offset * @type {number || null} */ this.Offset = null; /** * Number of results per page * @type {number || null} */ this.Limit = null; /** * Instance filter. Valid values: `ID`: Filter by instance ID `Name`: Filter by instance name * @type {Array.<Filter> || null} */ this.Filters = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; if (params.Filters) { this.Filters = new Array(); for (let z in params.Filters) { let obj = new Filter(); obj.deserialize(params.Filters[z]); this.Filters.push(obj); } } } } /** * ModifyGrafanaInstance response structure. * @class */ class ModifyGrafanaInstanceResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * User callback information output by the policy query * @class */ class DescribePolicyGroupInfoCallback extends AbstractModel { constructor(){ super(); /** * URL of the user callback API. * @type {string || null} */ this.CallbackUrl = null; /** * Status of the user callback API. The value 0 indicates that the API is not verified. The value 1 indicates that the API is verified. The value 2 indicates that a URL exists but the API fails to be verified. * @type {number || null} */ this.ValidFlag = null; /** * Verification code of the user callback API. * @type {string || null} */ this.VerifyCode = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.CallbackUrl = 'CallbackUrl' in params ? params.CallbackUrl : null; this.ValidFlag = 'ValidFlag' in params ? params.ValidFlag : null; this.VerifyCode = 'VerifyCode' in params ? params.VerifyCode : null; } } /** * ModifyGrafanaInstance request structure. * @class */ class ModifyGrafanaInstanceRequest extends AbstractModel { constructor(){ super(); /** * TCMG instance ID, such as “grafana-abcdefgh”. * @type {string || null} */ this.InstanceId = null; /** * TCMG instance name, such as “test”. * @type {string || null} */ this.InstanceName = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.InstanceName = 'InstanceName' in params ? params.InstanceName : null; } } /** * Metric information of alarm records * @class */ class AlarmHistoryMetric extends AbstractModel { constructor(){ super(); /** * Namespace used to query data by Tencent Cloud service monitoring type * @type {string || null} */ this.QceNamespace = null; /** * Metric name * @type {string || null} */ this.MetricName = null; /** * Statistical period * @type {number || null} */ this.Period = null; /** * Value triggering alarm * @type {string || null} */ this.Value = null; /** * Metric display name * @type {string || null} */ this.Description = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.QceNamespace = 'QceNamespace' in params ? params.QceNamespace : null; this.MetricName = 'MetricName' in params ? params.MetricName : null; this.Period = 'Period' in params ? params.Period : null; this.Value = 'Value' in params ? params.Value : null; this.Description = 'Description' in params ? params.Description : null; } } /** * EnableGrafanaSSO response structure. * @class */ class EnableGrafanaSSOResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribePolicyGroupInfo response structure. * @class */ class DescribePolicyGroupInfoResponse extends AbstractModel { constructor(){ super(); /** * Policy group name. * @type {string || null} */ this.GroupName = null; /** * ID of the project to which the policy group belongs. * @type {number || null} */ this.ProjectId = null; /** * Whether it is the default policy. The value 0 indicates that it is not the default policy. The value 1 indicates that it is the default policy. * @type {number || null} */ this.IsDefault = null; /** * Policy type. * @type {string || null} */ this.ViewName = null; /** * Policy description * @type {string || null} */ this.Remark = null; /** * Policy type name. * @type {string || null} */ this.ShowName = null; /** * Uin that was last edited. * @type {string || null} */ this.LastEditUin = null; /** * Last edited time. * @type {string || null} */ this.UpdateTime = null; /** * Regions supported by this policy. * @type {Array.<string> || null} */ this.Region = null; /** * List of policy type dimensions. * @type {Array.<string> || null} */ this.DimensionGroup = null; /** * Threshold rule list. Note: This field may return null, indicating that no valid value was found. * @type {Array.<DescribePolicyGroupInfoCondition> || null} */ this.ConditionsConfig = null; /** * Product event rule list. Note: This field may return null, indicating that no valid value was found. * @type {Array.<DescribePolicyGroupInfoEventCondition> || null} */ this.EventConfig = null; /** * Recipient list. Note: This field may return null, indicating that no valid value was found. * @type {Array.<DescribePolicyGroupInfoReceiverInfo> || null} */ this.ReceiverInfos = null; /** * User callback information. Note: This field may return null, indicating that no valid value was found. * @type {DescribePolicyGroupInfoCallback || null} */ this.Callback = null; /** * Template-based policy group. Note: This field may return null, indicating that no valid value was found. * @type {DescribePolicyGroupInfoConditionTpl || null} */ this.ConditionsTemp = null; /** * Whether the policy can be configured as the default policy. * @type {boolean || null} */ this.CanSetDefault = null; /** * Whether the 'AND' rule is used. Note: This field may return null, indicating that no valid value was found. * @type {number || null} */ this.IsUnionRule = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.GroupName = 'GroupName' in params ? params.GroupName : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.IsDefault = 'IsDefault' in params ? params.IsDefault : null; this.ViewName = 'ViewName' in params ? params.ViewName : null; this.Remark = 'Remark' in params ? params.Remark : null; this.ShowName = 'ShowName' in params ? params.ShowName : null; this.LastEditUin = 'LastEditUin' in params ? params.LastEditUin : null; this.UpdateTime = 'UpdateTime' in params ? params.UpdateTime : null; this.Region = 'Region' in params ? params.Region : null; this.DimensionGroup = 'DimensionGroup' in params ? params.DimensionGroup : null; if (params.ConditionsConfig) { this.ConditionsConfig = new Array(); for (let z in params.ConditionsConfig) { let obj = new DescribePolicyGroupInfoCondition(); obj.deserialize(params.ConditionsConfig[z]); this.ConditionsConfig.push(obj); } } if (params.EventConfig) { this.EventConfig = new Array(); for (let z in params.EventConfig) { let obj = new DescribePolicyGroupInfoEventCondition(); obj.deserialize(params.EventConfig[z]); this.EventConfig.push(obj); } } if (params.ReceiverInfos) { this.ReceiverInfos = new Array(); for (let z in params.ReceiverInfos) { let obj = new DescribePolicyGroupInfoReceiverInfo(); obj.deserialize(params.ReceiverInfos[z]); this.ReceiverInfos.push(obj); } } if (params.Callback) { let obj = new DescribePolicyGroupInfoCallback(); obj.deserialize(params.Callback) this.Callback = obj; } if (params.ConditionsTemp) { let obj = new DescribePolicyGroupInfoConditionTpl(); obj.deserialize(params.ConditionsTemp) this.ConditionsTemp = obj; } this.CanSetDefault = 'CanSetDefault' in params ? params.CanSetDefault : null; this.IsUnionRule = 'IsUnionRule' in params ? params.IsUnionRule : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DeletePrometheusClusterAgent request structure. * @class */ class DeletePrometheusClusterAgentRequest extends AbstractModel { constructor(){ super(); /** * Agent list * @type {Array.<PrometheusAgentInfo> || null} */ this.Agents = null; /** * Instance ID * @type {string || null} */ this.InstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.Agents) { this.Agents = new Array(); for (let z in params.Agents) { let obj = new PrometheusAgentInfo(); obj.deserialize(params.Agents[z]); this.Agents.push(obj); } } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; } } /** * DescribePrometheusScrapeJobs request structure. * @class */ class DescribePrometheusScrapeJobsRequest extends AbstractModel { constructor(){ super(); /** * Instance ID * @type {string || null} */ this.InstanceId = null; /** * Agent ID * @type {string || null} */ this.AgentId = null; /** * Task name * @type {string || null} */ this.Name = null; /** * List of task IDs * @type {Array.<string> || null} */ this.JobIds = null; /** * Offset. Default value: 0. * @type {number || null} */ this.Offset = null; /** * Number of returned results. Default value: 20. Maximum value: 100. * @type {number || null} */ this.Limit = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.AgentId = 'AgentId' in params ? params.AgentId : null; this.Name = 'Name' in params ? params.Name : null; this.JobIds = 'JobIds' in params ? params.JobIds : null; this.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; } } /** * CreatePolicyGroup response structure. * @class */ class CreatePolicyGroupResponse extends AbstractModel { constructor(){ super(); /** * ID of the created policy group. * @type {number || null} */ this.GroupId = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.GroupId = 'GroupId' in params ? params.GroupId : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeBaseMetrics response structure. * @class */ class DescribeBaseMetricsResponse extends AbstractModel { constructor(){ super(); /** * Listed of queried metric descriptions * @type {Array.<MetricSet> || null} */ this.MetricSet = null; /** * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.MetricSet) { this.MetricSet = new Array(); for (let z in params.MetricSet) { let obj = new MetricSet(); obj.deserialize(params.MetricSet[z]); this.MetricSet.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * CreatePrometheusMultiTenantInstancePostPayMode request structure. * @class */ class CreatePrometheusMultiTenantInstancePostPayModeRequest extends AbstractModel { constructor(){ super(); /** * Instance name * @type {string || null} */ this.InstanceName = null; /** * VPC ID * @type {string || null} */ this.VpcId = null; /** * Subnet ID * @type {string || null} */ this.SubnetId = null; /** * Data retention period in days. Valid values: 15, 30, 45. * @type {number || null} */ this.DataRetentionTime = null; /** * AZ * @type {string || null} */ this.Zone = null; /** * Instance tag * @type {Array.<PrometheusTag> || null} */ this.TagSpecification = null; /** * The Grafana instance to be associated * @type {string || null} */ this.GrafanaInstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceName = 'InstanceName' in params ? params.InstanceName : null; this.VpcId = 'VpcId' in params ? params.VpcId : null; this.SubnetId = 'SubnetId' in params ? params.SubnetId : null; this.DataRetentionTime = 'DataRetentionTime' in params ? params.DataRetentionTime : null; this.Zone = 'Zone' in params ? params.Zone : null; if (params.TagSpecification) { this.TagSpecification = new Array(); for (let z in params.TagSpecification) { let obj = new PrometheusTag(); obj.deserialize(params.TagSpecification[z]); this.TagSpecification.push(obj); } } this.GrafanaInstanceId = 'GrafanaInstanceId' in params ? params.GrafanaInstanceId : null; } } /** * DescribePolicyConditionListResponseDeprecatingInfo * @class */ class DescribePolicyConditionListResponseDeprecatingInfo extends AbstractModel { constructor(){ super(); /** * Whether to hide Note: This field may return null, indicating that no valid values can be obtained. * @type {boolean || null} */ this.Hidden = null; /** * Names of new views Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<string> || null} */ this.NewViewNames = null; /** * Description Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Description = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Hidden = 'Hidden' in params ? params.Hidden : null; this.NewViewNames = 'NewViewNames' in params ? params.NewViewNames : null; this.Description = 'Description' in params ? params.Description : null; } } /** * Modifiable items in the TMP template * @class */ class PrometheusTempModify extends AbstractModel { constructor(){ super(); /** * Name * @type {string || null} */ this.Name = null; /** * Description Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Describe = null; /** * This parameter is valid if `Level` is `cluster`. List of ServiceMonitor rules in the template. Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<PrometheusConfigItem> || null} */ this.ServiceMonitors = null; /** * This parameter is valid if `Level` is `cluster`. List of PodMonitor rules in the template. Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<PrometheusConfigItem> || null} */ this.PodMonitors = null; /** * This parameter is valid if `Level` is `cluster`. List of RawJob rules in the template. Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<PrometheusConfigItem> || null} */ this.RawJobs = null; /** * This parameter is valid if `Level` is `instance`. List of recording rules in the template Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<PrometheusConfigItem> || null} */ this.RecordRules = null; /** * Modification content, which is valid only if template type is `Alert`. Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<PrometheusAlertPolicyItem> || null} */ this.AlertDetailRules = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Name = 'Name' in params ? params.Name : null; this.Describe = 'Describe' in params ? params.Describe : null; if (params.ServiceMonitors) { this.ServiceMonitors = new Array(); for (let z in params.ServiceMonitors) { let obj = new PrometheusConfigItem(); obj.deserialize(params.ServiceMonitors[z]); this.ServiceMonitors.push(obj); } } if (params.PodMonitors) { this.PodMonitors = new Array(); for (let z in params.PodMonitors) { let obj = new PrometheusConfigItem(); obj.deserialize(params.PodMonitors[z]); this.PodMonitors.push(obj); } } if (params.RawJobs) { this.RawJobs = new Array(); for (let z in params.RawJobs) { let obj = new PrometheusConfigItem(); obj.deserialize(params.RawJobs[z]); this.RawJobs.push(obj); } } if (params.RecordRules) { this.RecordRules = new Array(); for (let z in params.RecordRules) { let obj = new PrometheusConfigItem(); obj.deserialize(params.RecordRules[z]); this.RecordRules.push(obj); } } if (params.AlertDetailRules) { this.AlertDetailRules = new Array(); for (let z in params.AlertDetailRules) { let obj = new PrometheusAlertPolicyItem(); obj.deserialize(params.AlertDetailRules[z]); this.AlertDetailRules.push(obj); } } } } /** * SendCustomAlarmMsg request structure. * @class */ class SendCustomAlarmMsgRequest extends AbstractModel { constructor(){ super(); /** * API component name. The value for the current API is monitor. * @type {string || null} */ this.Module = null; /** * Message policy ID, which is configured on the custom message page. * @type {string || null} */ this.PolicyId = null; /** * Custom message content that a user wants to send. * @type {string || null} */ this.Msg = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Module = 'Module' in params ? params.Module : null; this.PolicyId = 'PolicyId' in params ? params.PolicyId : null; this.Msg = 'Msg' in params ? params.Msg : null; } } /** * UnBindingPolicyObject request structure. * @class */ class UnBindingPolicyObjectRequest extends AbstractModel { constructor(){ super(); /** * The value is fixed to monitor. * @type {string || null} */ this.Module = null; /** * Policy group ID. If `PolicyId` is used, this parameter will be ignored, and any value, e.g., `0`, can be passed in. * @type {number || null} */ this.GroupId = null; /** * List of unique IDs of the object instances to be deleted. `UniqueId` can be obtained from the output parameter `List` of the [DescribeBindingPolicyObjectList](https://intl.cloud.tencent.com/document/api/248/40570?from_cn_redirect=1) API * @type {Array.<string> || null} */ this.UniqueId = null; /** * Instance group ID. The `UniqueId` parameter is invalid if object instances are deleted by instance group. * @type {number || null} */ this.InstanceGroupId = null; /** * Alarm policy ID. If this parameter is used, `GroupId` will be ignored. * @type {string || null} */ this.PolicyId = null; /** * The alert configured for an event * @type {string || null} */ this.EbSubject = null; /** * Whether the event alert has been configured * @type {number || null} */ this.EbEventFlag = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Module = 'Module' in params ? params.Module : null; this.GroupId = 'GroupId' in params ? params.GroupId : null; this.UniqueId = 'UniqueId' in params ? params.UniqueId : null; this.InstanceGroupId = 'InstanceGroupId' in params ? params.InstanceGroupId : null; this.PolicyId = 'PolicyId' in params ? params.PolicyId : null; this.EbSubject = 'EbSubject' in params ? params.EbSubject : null; this.EbEventFlag = 'EbEventFlag' in params ? params.EbEventFlag : null; } } /** * Policy type information * @class */ class CommonNamespaceNew extends AbstractModel { constructor(){ super(); /** * Namespace ID * @type {string || null} */ this.Id = null; /** * Namespace name * @type {string || null} */ this.Name = null; /** * Monitoring type * @type {string || null} */ this.MonitorType = null; /** * Dimension information * @type {Array.<DimensionNew> || null} */ this.Dimensions = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Id = 'Id' in params ? params.Id : null; this.Name = 'Name' in params ? params.Name : null; this.MonitorType = 'MonitorType' in params ? params.MonitorType : null; if (params.Dimensions) { this.Dimensions = new Array(); for (let z in params.Dimensions) { let obj = new DimensionNew(); obj.deserialize(params.Dimensions[z]); this.Dimensions.push(obj); } } } } /** * Tag * @class */ class Tag extends AbstractModel { constructor(){ super(); /** * Tag key * @type {string || null} */ this.Key = null; /** * Tag value * @type {string || null} */ this.Value = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Key = 'Key' in params ? params.Key : null; this.Value = 'Value' in params ? params.Value : null; } } /** * DescribePrometheusAgentInstances request structure. * @class */ class DescribePrometheusAgentInstancesRequest extends AbstractModel { constructor(){ super(); /** * Cluster ID It can be the ID of a TKE, EKS, or edge cluster. * @type {string || null} */ this.ClusterId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.ClusterId = 'ClusterId' in params ? params.ClusterId : null; } } /** * Details of the Prometheus recording rule instance, including the cluster ID. * @class */ class PrometheusRecordRuleYamlItem extends AbstractModel { constructor(){ super(); /** * Instance name * @type {string || null} */ this.Name = null; /** * Last update time * @type {string || null} */ this.UpdateTime = null; /** * YAML content * @type {string || null} */ this.TemplateId = null; /** * If the recording rule comes from a template, `TemplateId` is the template ID. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Content = null; /** * If the recording rule comes from the user cluster CRD resource definition, `ClusterId` is the cluster ID. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.ClusterId = null; /** * Status Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.Status = null; /** * id Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Id = null; /** * Number of rules Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.Count = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Name = 'Name' in params ? params.Name : null; this.UpdateTime = 'UpdateTime' in params ? params.UpdateTime : null; this.TemplateId = 'TemplateId' in params ? params.TemplateId : null; this.Content = 'Content' in params ? params.Content : null; this.ClusterId = 'ClusterId' in params ? params.ClusterId : null; this.Status = 'Status' in params ? params.Status : null; this.Id = 'Id' in params ? params.Id : null; this.Count = 'Count' in params ? params.Count : null; } } /** * Tags in K8s, which generally exist in the form of an array. * @class */ class Label extends AbstractModel { constructor(){ super(); /** * Label name * @type {string || null} */ this.Name = null; /** * Label value * @type {string || null} */ this.Value = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Name = 'Name' in params ? params.Name : null; this.Value = 'Value' in params ? params.Value : null; } } /** * DescribeGrafanaIntegrations response structure. * @class */ class DescribeGrafanaIntegrationsResponse extends AbstractModel { constructor(){ super(); /** * Array of integrations * @type {Array.<GrafanaIntegrationConfig> || null} */ this.IntegrationSet = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.IntegrationSet) { this.IntegrationSet = new Array(); for (let z in params.IntegrationSet) { let obj = new GrafanaIntegrationConfig(); obj.deserialize(params.IntegrationSet[z]); this.IntegrationSet.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * CreatePrometheusMultiTenantInstancePostPayMode response structure. * @class */ class CreatePrometheusMultiTenantInstancePostPayModeResponse extends AbstractModel { constructor(){ super(); /** * Instance ID * @type {string || null} */ this.InstanceId = null; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * UpdatePrometheusAgentStatus response structure. * @class */ class UpdatePrometheusAgentStatusResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * SyncPrometheusTemp response structure. * @class */ class SyncPrometheusTempResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * UpdateGrafanaWhiteList response structure. * @class */ class UpdateGrafanaWhiteListResponse extends AbstractModel { constructor(){ super(); /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @type {string || null} */ this.RequestId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeGrafanaEnvironments request structure. * @class */ class DescribeGrafanaEnvironmentsRequest extends AbstractModel { constructor(){ super(); /** * ID of a TencentCloud Managed Service for Grafana instance, such as “grafana-abcdefgh”. * @type {string || null} */ this.InstanceId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; } } /** * Prometheus configuration * @class */ class PrometheusConfigItem extends AbstractModel { constructor(){ super(); /** * Name * @type {string || null} */ this.Name = null; /** * Configuration content * @type {string || null} */ this.Config = null; /** * If the configuration comes from a template, this parameter is the template ID, which is used as an output parameter. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.TemplateId = null; /** * Number of targets Note: This field may return null, indicating that no valid values can be obtained. * @type {Targets || null} */ this.Targets = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Name = 'Name' in params ? params.Name : null; this.Config = 'Config' in params ? params.Config : null; this.TemplateId = 'TemplateId' in params ? params.TemplateId : null; if (params.Targets) { let obj = new Targets(); obj.deserialize(params.Targets) this.Targets = obj; } } } /** * Alarm policy details * @class */ class AlarmPolicy extends AbstractModel { constructor(){ super(); /** * Alarm policy ID Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.PolicyId = null; /** * Alarm policy name Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.PolicyName = null; /** * Remarks Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Remark = null; /** * Monitor type. Valid values: MT_QCE (Tencent Cloud service monitoring) Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.MonitorType = null; /** * Status. Valid values: 0 (disabled), 1 (enabled) Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.Enable = null; /** * Number of instances bound to policy group Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.UseSum = null; /** * Project ID. Valid values: -1 (no project), 0 (default project) Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.ProjectId = null; /** * Project name Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.ProjectName = null; /** * Alarm policy type Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.Namespace = null; /** * Trigger condition template ID Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.ConditionTemplateId = null; /** * Metric trigger condition Note: this field may return null, indicating that no valid values can be obtained. * @type {AlarmPolicyCondition || null} */ this.Condition = null; /** * Event trigger condition Note: this field may return null, indicating that no valid values can be obtained. * @type {AlarmPolicyEventCondition || null} */ this.EventCondition = null; /** * Notification rule ID list Note: this field may return null, indicating that no valid values can be obtained. * @type {Array.<string> || null} */ this.NoticeIds = null; /** * Notification rule list Note: this field may return null, indicating that no valid values can be obtained. * @type {Array.<AlarmNotice> || null} */ this.Notices = null; /** * Triggered task list Note: this field may return null, indicating that no valid values can be obtained. * @type {Array.<AlarmPolicyTriggerTask> || null} */ this.TriggerTasks = null; /** * Template policy group Note: this field may return null, indicating that no valid values can be obtained. Note: this field may return null, indicating that no valid values can be obtained. * @type {ConditionsTemp || null} */ this.ConditionsTemp = null; /** * `Uin` of the last modifying user Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.LastEditUin = null; /** * Update time Note: this field may return null, indicating that no valid values can be obtained. Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.UpdateTime = null; /** * Creation time Note: this field may return null, indicating that no valid values can be obtained. Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.InsertTime = null; /** * Region Note: this field may return null, indicating that no valid values can be obtained. * @type {Array.<string> || null} */ this.Region = null; /** * Namespace display name Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.NamespaceShowName = null; /** * Whether it is the default policy. Valid values: 1 (yes), 0 (no) Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.IsDefault = null; /** * Whether the default policy can be set. Valid values: 1 (yes), 0 (no) Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.CanSetDefault = null; /** * Instance group ID Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.InstanceGroupId = null; /** * Total number of instances in instance group Note: this field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.InstanceSum = null; /** * Instance group name Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.InstanceGroupName = null; /** * Trigger condition type. Valid values: STATIC (static threshold), DYNAMIC (dynamic) Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.RuleType = null; /** * Policy ID for instance/instance group binding and unbinding APIs (BindingPolicyObject, UnBindingAllPolicyObject, UnBindingPolicyObject) Note: this field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.OriginId = null; /** * Tag Note: This field may return `null`, indicating that no valid values can be obtained. * @type {Array.<TagInstance> || null} */ this.TagInstances = null; /** * Information on the filter dimension associated with a policy. Note: This field may return `null`, indicating that no valid values can be obtained. * @type {string || null} */ this.FilterDimensionsParam = null; /** * Whether it is a quick alarm policy. Note: This field may return `null`, indicating that no valid values can be obtained. * @type {number || null} */ this.IsOneClick = null; /** * Whether the quick alarm policy is enabled. Note: This field may return `null`, indicating that no valid values can be obtained. * @type {number || null} */ this.OneClickStatus = null; /** * The number of advanced metrics. Note: This field may return `null`, indicating that no valid values can be obtained. * @type {number || null} */ this.AdvancedMetricNumber = null; /** * Whether the policy is associated with all objects Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.IsBindAll = null; /** * Policy tag Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<Tag> || null} */ this.Tags = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.PolicyId = 'PolicyId' in params ? params.PolicyId : null; this.PolicyName = 'PolicyName' in params ? params.PolicyName : null; this.Remark = 'Remark' in params ? params.Remark : null; this.MonitorType = 'MonitorType' in params ? params.MonitorType : null; this.Enable = 'Enable' in params ? params.Enable : null; this.UseSum = 'UseSum' in params ? params.UseSum : null; this.ProjectId = 'ProjectId' in params ? params.ProjectId : null; this.ProjectName = 'ProjectName' in params ? params.ProjectName : null; this.Namespace = 'Namespace' in params ? params.Namespace : null; this.ConditionTemplateId = 'ConditionTemplateId' in params ? params.ConditionTemplateId : null; if (params.Condition) { let obj = new AlarmPolicyCondition(); obj.deserialize(params.Condition) this.Condition = obj; } if (params.EventCondition) { let obj = new AlarmPolicyEventCondition(); obj.deserialize(params.EventCondition) this.EventCondition = obj; } this.NoticeIds = 'NoticeIds' in params ? params.Not