UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
337 lines (283 loc) • 10.1 kB
/* * Copyright (c) 2018 Tencent. 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"); /** * Unconsumed unblocking quota info of the current account. Users who purchase Anti-DDoS products have a default unblocking quota of 3 resources. The system will reset the unblocking quota count at zero point (UTC+8) time zone each day. Unused unblocking quota on the day will not accumulate to the next day. The unblocking quota for Anti-DDoS Package (Lite) is 3 resources per month and resets monthly. * @class */ class DDoSUnblockQuota extends AbstractModel { constructor(){ super(); /** * <p>Total quota of the number of unblocking times.</p> * @type {number || null} */ this.TotalQuota = null; /** * <p>Total quota used.</p> * @type {number || null} */ this.UsedQuota = null; /** * <p>Start time when the quota takes effect.</p> * @type {string || null} */ this.QuotaStartTime = null; /** * <p>End time when the quota takes effect.</p> * @type {string || null} */ this.QuotaEndTime = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.TotalQuota = 'TotalQuota' in params ? params.TotalQuota : null; this.UsedQuota = 'UsedQuota' in params ? params.UsedQuota : null; this.QuotaStartTime = 'QuotaStartTime' in params ? params.QuotaStartTime : null; this.QuotaEndTime = 'QuotaEndTime' in params ? params.QuotaEndTime : null; } } /** * Describe key-value pair filter, used for condition filtering query, such as filtering ID, name, status. When multiple Filters exist, the relationship between Filters is logical AND. When the same Filter has multiple Values, the relationship between Values under the same Filter is logical OR. * @class */ class Filter extends AbstractModel { constructor(){ super(); /** * <p>Fields to be filtered. Check corresponding API for specific available values.</p> * @type {string || null} */ this.Name = null; /** * <p>Field's filter value.</p> * @type {Array.<string> || null} */ this.Values = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Name = 'Name' in params ? params.Name : null; this.Values = 'Values' in params ? params.Values : null; } } /** * UnblockResources response structure. * @class */ class UnblockResourcesResponse extends AbstractModel { constructor(){ super(); /** * 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; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Block history * @class */ class DDoSBlockRecord extends AbstractModel { constructor(){ super(); /** * <p>Blocked resources, public IP address, for example:</p><ul><li>Public IP address: 117.175.94.231.</li></ul> * @type {string || null} */ this.Resource = null; /** * <p>The time when it was blocked.</p> * @type {string || null} */ this.BlockTime = null; /** * <p>Blocking and unblocking status.</p><p>Enumeration value:</p><ul><li>Blocked: Blocked;</li><li>Unblocking: Unblocking;</li><li>Unblocked: Unblocked.</li></ul> * @type {string || null} */ this.Status = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Resource = 'Resource' in params ? params.Resource : null; this.BlockTime = 'BlockTime' in params ? params.BlockTime : null; this.Status = 'Status' in params ? params.Status : null; } } /** * DescribeDDoSBlockRecords response structure. * @class */ class DescribeDDoSBlockRecordsResponse extends AbstractModel { constructor(){ super(); /** * <p>Total number of block and unblock records.</p> * @type {number || null} */ this.TotalCount = null; /** * <p>Unblock record.</p> * @type {Array.<DDoSBlockRecord> || null} */ this.BlockRecords = null; /** * <p>Quota information of the number of unblocking times.</p> * @type {DDoSUnblockQuota || null} */ this.UnblockQuotaInfo = 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; } this.TotalCount = 'TotalCount' in params ? params.TotalCount : null; if (params.BlockRecords) { this.BlockRecords = new Array(); for (let z in params.BlockRecords) { let obj = new DDoSBlockRecord(); obj.deserialize(params.BlockRecords[z]); this.BlockRecords.push(obj); } } if (params.UnblockQuotaInfo) { let obj = new DDoSUnblockQuota(); obj.deserialize(params.UnblockQuotaInfo) this.UnblockQuotaInfo = obj; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * UnblockResources request structure. * @class */ class UnblockResourcesRequest extends AbstractModel { constructor(){ super(); /** * <p>List of resources to apply for unblocking. Supports unblocking based on public IP. You can obtain detailed resource information of blocked resources through the DescribeDDoSBlockRecords API. Parameter example:</p><ul><li>Public IP: 117.175.94.230.</li></ul><p>Input parameter limit: Maximum list length is 10.</p> * @type {Array.<string> || null} */ this.Resources = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Resources = 'Resources' in params ? params.Resources : null; } } /** * DescribeDDoSBlockRecords request structure. * @class */ class DescribeDDoSBlockRecordsRequest extends AbstractModel { constructor(){ super(); /** * <p>Start time of the query. Support up to data query for the past one year.</p><p>Parameter format: 2026-02-04T11:30:00+08:00.</p> * @type {string || null} */ this.StartTime = null; /** * <p>End time of query. The query time range (EndTime - StartTime) must be less than or equal to 31 days.</p><p>Parameter format: 2026-03-04T11:30:00+08:00.</p> * @type {string || null} */ this.EndTime = null; /** * <p>Filter criteria. The maximum number of Filters.Values is 20. If this parameter is left empty, return the current list of resources blocked under the appid. Detailed filter criteria:</p><ul><li> Resource: Filter by blocked IP or six-segment resource format;</li><li> Status: Filter by blocked resource status.</li></ul><p>When Filters.Name value is Status, Filters.Values valid values:</p><ul><li>Blocked: blocked;</li><li>Unblocking: unblocking;</li><li>Unblocked: unblocked.</li></ul> * @type {Array.<Filter> || null} */ this.Filters = null; /** * <p>Paginated query limit count. Maximum value: 100.</p><p>Default value: 20</p> * @type {number || null} */ this.Limit = null; /** * <p>Paginated query offset.</p><p>Default value: 0.</p> * @type {number || null} */ this.Offset = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.StartTime = 'StartTime' in params ? params.StartTime : null; this.EndTime = 'EndTime' in params ? params.EndTime : 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); } } this.Limit = 'Limit' in params ? params.Limit : null; this.Offset = 'Offset' in params ? params.Offset : null; } } module.exports = { DDoSUnblockQuota: DDoSUnblockQuota, Filter: Filter, UnblockResourcesResponse: UnblockResourcesResponse, DDoSBlockRecord: DDoSBlockRecord, DescribeDDoSBlockRecordsResponse: DescribeDDoSBlockRecordsResponse, UnblockResourcesRequest: UnblockResourcesRequest, DescribeDDoSBlockRecordsRequest: DescribeDDoSBlockRecordsRequest, }