UNPKG

tencentcloud-sdk-nodejs-intl-en

Version:
1,559 lines (1,316 loc) 165 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"); /** * Snapshot operation log (disused). * @class */ class SnapshotOperationLog extends AbstractModel { constructor(){ super(); /** * Status of operation. Value range: SUCCESS: Operation successful FAILED: Operation failed PROCESSING: Operation in process * @type {string || null} */ this.OperationState = null; /** * Start time * @type {string || null} */ this.StartTime = null; /** * UIN of operator. Note: This field may return null, indicating that no valid value was found. * @type {string || null} */ this.Operator = null; /** * ID of snapshot being operated. * @type {string || null} */ this.SnapshotId = null; /** * Operation type. Value range: SNAP_OPERATION_DELETE: Delete snapshot SNAP_OPERATION_ROLLBACK: Roll back snapshot SNAP_OPERATION_MODIFY: Modify snapshot attributes SNAP_OPERATION_CREATE: Create snapshot SNAP_OPERATION_COPY: Cross-region replication of snapshot ASP_OPERATION_CREATE_SNAP: Create snapshot with scheduled snapshot policy ASP_OPERATION_DELETE_SNAP: Delete snapshot from scheduled snapshot policy * @type {string || null} */ this.Operation = null; /** * End time * @type {string || null} */ this.EndTime = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.OperationState = 'OperationState' in params ? params.OperationState : null; this.StartTime = 'StartTime' in params ? params.StartTime : null; this.Operator = 'Operator' in params ? params.Operator : null; this.SnapshotId = 'SnapshotId' in params ? params.SnapshotId : null; this.Operation = 'Operation' in params ? params.Operation : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; } } /** * ModifyDiskExtraPerformance request structure. * @class */ class ModifyDiskExtraPerformanceRequest extends AbstractModel { constructor(){ super(); /** * ID of the cloud disk to create a snapshot, which can be obtained via the [DescribeDisks](https://intl.cloud.tencent.com/document/product/362/16315?from_cn_redirect=1) API. * @type {string || null} */ this.DiskId = null; /** * The extra throughput to purchase, in MB/s * @type {number || null} */ this.ThroughputPerformance = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.DiskId = 'DiskId' in params ? params.DiskId : null; this.ThroughputPerformance = 'ThroughputPerformance' in params ? params.ThroughputPerformance : null; } } /** * ModifyDiskAttributes response structure. * @class */ class ModifyDiskAttributesResponse 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; } } /** * DescribeDiskBackups request structure. * @class */ class DescribeDiskBackupsRequest extends AbstractModel { constructor(){ super(); /** * List of IDs of the backup points to be queried. `DiskBackupIds` and `Filters` cannot be specified at the same time. * @type {Array.<string> || null} */ this.DiskBackupIds = null; /** * Filter. `DiskBackupIds` and `Filters` cannot be specified at the same time. Valid values: <br><li>disk-backup-id - Array of String - Required: No - (Filter) Filter by backup point ID in the format of `dbp-11112222`. <br><li>disk-id - Array of String - Required: No - (Filter) Filter by ID of the cloud disk for which backup points are created. <br><li>disk-usage - Array of String - Required: No - (Filter) Filter by type of the cloud disk for which backup points are created. (SYSTEM_DISK: System disk | DATA_DISK: Data disk) * @type {Array.<Filter> || null} */ this.Filters = null; /** * Offset. Default value: 0. For more information on `Offset`, see the relevant section of the API [Overview](https://intl.cloud.tencent.com/document/product/362/15633?from_cn_redirect=1). * @type {number || null} */ this.Offset = null; /** * Number of returned results. Default value: 20. Maximum value: 100. For more information on `Limit`, see the relevant section of the API [Overview](https://intl.cloud.tencent.com/document/product/362/15633?from_cn_redirect=1). * @type {number || null} */ this.Limit = null; /** * Sorting order of cloud disk backup points. Valid values:<br><li>ASC: Ascending<br><li>DESC: Descending * @type {string || null} */ this.Order = null; /** * The field by which cloud disk backup points are sorted. Valid values:<br><li>CREATE_TIME: Sort by creation time<br>Backup points are sorted by creation time by default. * @type {string || null} */ this.OrderField = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.DiskBackupIds = 'DiskBackupIds' in params ? params.DiskBackupIds : 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.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; this.Order = 'Order' in params ? params.Order : null; this.OrderField = 'OrderField' in params ? params.OrderField : null; } } /** * This describes the detailed information of the scheduled snapshot policy. * @class */ class AutoSnapshotPolicy extends AbstractModel { constructor(){ super(); /** * The list of cloud disk IDs that the current scheduled snapshot policy is bound to. * @type {Array.<string> || null} */ this.DiskIdSet = null; /** * Whether scheduled snapshot policy is activated. * @type {boolean || null} */ this.IsActivated = null; /** * Scheduled snapshot policy state. Value range:<br><li>NORMAL: Normal<br><li>ISOLATED: Isolated. * @type {string || null} */ this.AutoSnapshotPolicyState = null; /** * Whether it is to replicate a snapshot across accounts. `1`: yes, `0`: no. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.IsCopyToRemote = null; /** * Whether the snapshot created by this scheduled snapshot policy is retained permanently. * @type {boolean || null} */ this.IsPermanent = null; /** * The time the scheduled snapshot will be triggered again. * @type {string || null} */ this.NextTriggerTime = null; /** * Scheduled snapshot policy name. * @type {string || null} */ this.AutoSnapshotPolicyName = null; /** * Scheduled snapshot policy ID. * @type {string || null} */ this.AutoSnapshotPolicyId = null; /** * The policy for executing the scheduled snapshot. * @type {Array.<Policy> || null} */ this.Policy = null; /** * The time the scheduled snapshot policy was created. * @type {string || null} */ this.CreateTime = null; /** * Number of days the snapshot created by this scheduled snapshot policy is retained. * @type {number || null} */ this.RetentionDays = null; /** * ID of the replication target account Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.CopyToAccountUin = null; /** * List of IDs of the instances associated with the scheduled snapshot policy. Note: This field may return null, indicating that no valid values can be obtained. * @type {Array.<string> || null} */ this.InstanceIdSet = null; /** * The number of months for which the snapshots created by this scheduled snapshot policy can be retained. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.RetentionMonths = null; /** * The maximum number of snapshots created by this scheduled snapshot policy that can be retained. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.RetentionAmount = null; /** * Retention policy for scheduled snapshots. Note: This field may return null, indicating that no valid values can be obtained. * @type {AdvancedRetentionPolicy || null} */ this.AdvancedRetentionPolicy = null; /** * Source account ID of the copied snapshot policy Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.CopyFromAccountUin = null; /** * 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.DiskIdSet = 'DiskIdSet' in params ? params.DiskIdSet : null; this.IsActivated = 'IsActivated' in params ? params.IsActivated : null; this.AutoSnapshotPolicyState = 'AutoSnapshotPolicyState' in params ? params.AutoSnapshotPolicyState : null; this.IsCopyToRemote = 'IsCopyToRemote' in params ? params.IsCopyToRemote : null; this.IsPermanent = 'IsPermanent' in params ? params.IsPermanent : null; this.NextTriggerTime = 'NextTriggerTime' in params ? params.NextTriggerTime : null; this.AutoSnapshotPolicyName = 'AutoSnapshotPolicyName' in params ? params.AutoSnapshotPolicyName : null; this.AutoSnapshotPolicyId = 'AutoSnapshotPolicyId' in params ? params.AutoSnapshotPolicyId : null; if (params.Policy) { this.Policy = new Array(); for (let z in params.Policy) { let obj = new Policy(); obj.deserialize(params.Policy[z]); this.Policy.push(obj); } } this.CreateTime = 'CreateTime' in params ? params.CreateTime : null; this.RetentionDays = 'RetentionDays' in params ? params.RetentionDays : null; this.CopyToAccountUin = 'CopyToAccountUin' in params ? params.CopyToAccountUin : null; this.InstanceIdSet = 'InstanceIdSet' in params ? params.InstanceIdSet : null; this.RetentionMonths = 'RetentionMonths' in params ? params.RetentionMonths : null; this.RetentionAmount = 'RetentionAmount' in params ? params.RetentionAmount : null; if (params.AdvancedRetentionPolicy) { let obj = new AdvancedRetentionPolicy(); obj.deserialize(params.AdvancedRetentionPolicy) this.AdvancedRetentionPolicy = obj; } this.CopyFromAccountUin = 'CopyFromAccountUin' in params ? params.CopyFromAccountUin : null; if (params.Tags) { this.Tags = new Array(); for (let z in params.Tags) { let obj = new Tag(); obj.deserialize(params.Tags[z]); this.Tags.push(obj); } } } } /** * Pricing details for the cloud disk. * @class */ class DetailPrice extends AbstractModel { constructor(){ super(); /** * Name of the billable item. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.PriceTitle = null; /** * Name of the billable item displayed in the console. * @type {string || null} */ this.PriceName = null; /** * Original price of a monthly subscribed cloud disk, in USD. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.OriginalPrice = null; /** * Discounted price of a monthly subscribed cloud disk, in USD. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.DiscountPrice = null; /** * Original unit price of a pay-as-you-go cloud disk, in USD. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.UnitPrice = null; /** * Discount unit price of a pay-as-you-go cloud disk, in USD. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.UnitPriceDiscount = null; /** * Billing unit for pay-as-you-go cloud disks. Valid value: `HOUR` (billed hourly). Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.ChargeUnit = null; /** * Original highly-precise price of a monthly subscribed cloud disk, in USD. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.OriginalPriceHigh = null; /** * Discounted highly-precise price of a monthly subscribed cloud disk, in USD. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.DiscountPriceHigh = null; /** * Original highly-precise unit price of a pay-as-you-go cloud disk, in USD. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.UnitPriceHigh = null; /** * Discounted highly-precise unit price of a pay-as-you-go cloud disk, in USD. Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.UnitPriceDiscountHigh = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.PriceTitle = 'PriceTitle' in params ? params.PriceTitle : null; this.PriceName = 'PriceName' in params ? params.PriceName : null; this.OriginalPrice = 'OriginalPrice' in params ? params.OriginalPrice : null; this.DiscountPrice = 'DiscountPrice' in params ? params.DiscountPrice : null; this.UnitPrice = 'UnitPrice' in params ? params.UnitPrice : null; this.UnitPriceDiscount = 'UnitPriceDiscount' in params ? params.UnitPriceDiscount : null; this.ChargeUnit = 'ChargeUnit' in params ? params.ChargeUnit : null; this.OriginalPriceHigh = 'OriginalPriceHigh' in params ? params.OriginalPriceHigh : null; this.DiscountPriceHigh = 'DiscountPriceHigh' in params ? params.DiscountPriceHigh : null; this.UnitPriceHigh = 'UnitPriceHigh' in params ? params.UnitPriceHigh : null; this.UnitPriceDiscountHigh = 'UnitPriceDiscountHigh' in params ? params.UnitPriceDiscountHigh : null; } } /** * DescribeSnapshotOperationLogs request structure. * @class */ class DescribeSnapshotOperationLogsRequest extends AbstractModel { constructor(){ super(); /** * Filter conditions. The following conditions are supported: <li>snapshot-id - Array of String - Required or not: Yes - Filter by snapshot ID, with maximum of 10 snapshot IDs able to be specified per request. * @type {Array.<Filter> || null} */ this.Filters = null; /** * The start time of the operation logs to be queried, for example: '2019-11-22 00:00:00" * @type {string || null} */ this.BeginTime = null; /** * The end time of the operation logs to be queried, for example: '2019-11-22 23:59:59" * @type {string || null} */ this.EndTime = null; } /** * @private */ deserialize(params) { if (!params) { return; } 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.BeginTime = 'BeginTime' in params ? params.BeginTime : null; this.EndTime = 'EndTime' in params ? params.EndTime : null; } } /** * CreateDiskBackup request structure. * @class */ class CreateDiskBackupRequest extends AbstractModel { constructor(){ super(); /** * Name of the cloud disk for which to create a backup point. * @type {string || null} */ this.DiskId = null; /** * Name of the cloud disk backup point, which can contain up to 100 characters. * @type {string || null} */ this.DiskBackupName = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.DiskId = 'DiskId' in params ? params.DiskId : null; this.DiskBackupName = 'DiskBackupName' in params ? params.DiskBackupName : null; } } /** * CopySnapshotCrossRegions response structure. * @class */ class CopySnapshotCrossRegionsResponse extends AbstractModel { constructor(){ super(); /** * Result of the cross-region replication task. The ID of the new snapshot replica is returned if the request succeeds. Otherwise `Error` is returned. * @type {Array.<SnapshotCopyResult> || null} */ this.SnapshotCopyResultSet = 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.SnapshotCopyResultSet) { this.SnapshotCopyResultSet = new Array(); for (let z in params.SnapshotCopyResultSet) { let obj = new SnapshotCopyResult(); obj.deserialize(params.SnapshotCopyResultSet[z]); this.SnapshotCopyResultSet.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * ModifyAutoSnapshotPolicyAttribute response structure. * @class */ class ModifyAutoSnapshotPolicyAttributeResponse 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; } } /** * ModifyDiskBackupQuota request structure. * @class */ class ModifyDiskBackupQuotaRequest extends AbstractModel { constructor(){ super(); /** * Cloud disk ID. * @type {string || null} */ this.DiskId = null; /** * Cloud disk backup point quota after the adjustment * @type {number || null} */ this.DiskBackupQuota = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.DiskId = 'DiskId' in params ? params.DiskId : null; this.DiskBackupQuota = 'DiskBackupQuota' in params ? params.DiskBackupQuota : null; } } /** * InquiryPriceCreateDisks response structure. * @class */ class InquiryPriceCreateDisksResponse extends AbstractModel { constructor(){ super(); /** * Describes the price of newly purchased cloud disks. * @type {Price || null} */ this.DiskPrice = 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.DiskPrice) { let obj = new Price(); obj.deserialize(params.DiskPrice) this.DiskPrice = obj; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * BindAutoSnapshotPolicy request structure. * @class */ class BindAutoSnapshotPolicyRequest extends AbstractModel { constructor(){ super(); /** * ID of scheduled snapshot policy to be bound. * @type {string || null} */ this.AutoSnapshotPolicyId = null; /** * List of cloud disk IDs to be bound. Maximum of 80 cloud disks can be bound per request. * @type {Array.<string> || null} */ this.DiskIds = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.AutoSnapshotPolicyId = 'AutoSnapshotPolicyId' in params ? params.AutoSnapshotPolicyId : null; this.DiskIds = 'DiskIds' in params ? params.DiskIds : null; } } /** * CreateSnapshot response structure. * @class */ class CreateSnapshotResponse extends AbstractModel { constructor(){ super(); /** * ID of the created snapshot <br/>Note: This field may return null, indicating that no valid values can be obtained. * @type {string || null} */ this.SnapshotId = 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.SnapshotId = 'SnapshotId' in params ? params.SnapshotId : null; this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * DescribeAutoSnapshotPolicies request structure. * @class */ class DescribeAutoSnapshotPoliciesRequest extends AbstractModel { constructor(){ super(); /** * List of scheduled snapshot policy IDs to be queried. The parameter does not support specifying both `SnapshotIds` and `Filters`. * @type {Array.<string> || null} */ this.AutoSnapshotPolicyIds = null; /** * Filter conditions. Specification of both the `AutoSnapshotPolicyIds` and `Filters` parameters is not supported.<br><li>auto-snapshot-policy-id - Array of String - Required or not: No - (Filter condition) Filters according to the scheduled snapshot policy ID. The format of the scheduled snapshot policy ID is as follows: `asp-11112222`. <br><li>auto-snapshot-policy-state - Array of String - Required or not: No - (Filter condition) Filters according to the status of the scheduled snapshot policy. The format of the scheduled snapshot policy ID is as follows: `asp-11112222`. (NORMAL: normal | ISOLATED: isolated)<br><li>auto-snapshot-policy-name - Array of String - Required or not: No - (Filter condition) Filters according to the name of the scheduled snapshot policy. * @type {Array.<Filter> || null} */ this.Filters = null; /** * Number of results to be returned. Default is 20. Maximum is 100. For more information on `Limit`, please see relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/product/362/15633?from_cn_redirect=1). * @type {number || null} */ this.Limit = null; /** * Offset. Default is 0. For more information on `Offset`, please see relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/product/362/15633?from_cn_redirect=1). * @type {number || null} */ this.Offset = null; /** * Outputs the ordering of the scheduled snapshot lists. Value range: <br><li>ASC: Ascending order <br><li>DESC: Descending order. * @type {string || null} */ this.Order = null; /** * The sorting filter applied to the scheduled snapshot list. Value range: <Sort by creation time of scheduled snapshot. By default, this is sorted by creation time. * @type {string || null} */ this.OrderField = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.AutoSnapshotPolicyIds = 'AutoSnapshotPolicyIds' in params ? params.AutoSnapshotPolicyIds : 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; this.Order = 'Order' in params ? params.Order : null; this.OrderField = 'OrderField' in params ? params.OrderField : null; } } /** * ModifySnapshotsSharePermission response structure. * @class */ class ModifySnapshotsSharePermissionResponse 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; } } /** * DeleteDiskBackups request structure. * @class */ class DeleteDiskBackupsRequest extends AbstractModel { constructor(){ super(); /** * ID of the cloud disk backup point to be deleted. * @type {Array.<string> || null} */ this.DiskBackupIds = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.DiskBackupIds = 'DiskBackupIds' in params ? params.DiskBackupIds : null; } } /** * InitializeDisks response structure. * @class */ class InitializeDisksResponse 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; } } /** * DeleteDiskBackups response structure. * @class */ class DeleteDiskBackupsResponse 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; } } /** * DescribeDiskBackups response structure. * @class */ class DescribeDiskBackupsResponse extends AbstractModel { constructor(){ super(); /** * Number of eligible cloud disk backup points. * @type {number || null} */ this.TotalCount = null; /** * List of details of cloud disk backup points. * @type {Array.<DiskBackup> || null} */ this.DiskBackupSet = 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.TotalCount = 'TotalCount' in params ? params.TotalCount : null; if (params.DiskBackupSet) { this.DiskBackupSet = new Array(); for (let z in params.DiskBackupSet) { let obj = new DiskBackup(); obj.deserialize(params.DiskBackupSet[z]); this.DiskBackupSet.push(obj); } } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Result of the cross-region replication task * @class */ class SnapshotCopyResult extends AbstractModel { constructor(){ super(); /** * ID of the snapshot replica * @type {string || null} */ this.SnapshotId = null; /** * Error message. It’s null if the request succeeds. * @type {string || null} */ this.Message = null; /** * Error code. It’s `Success` if the request succeeds. * @type {string || null} */ this.Code = null; /** * Destination region of the replication task * @type {string || null} */ this.DestinationRegion = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.SnapshotId = 'SnapshotId' in params ? params.SnapshotId : null; this.Message = 'Message' in params ? params.Message : null; this.Code = 'Code' in params ? params.Code : null; this.DestinationRegion = 'DestinationRegion' in params ? params.DestinationRegion : null; } } /** * InquirePriceModifyDiskExtraPerformance response structure. * @class */ class InquirePriceModifyDiskExtraPerformanceResponse extends AbstractModel { constructor(){ super(); /** * Price for purchasing the extra performance * @type {Price || null} */ this.DiskPrice = 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.DiskPrice) { let obj = new Price(); obj.deserialize(params.DiskPrice) this.DiskPrice = obj; } this.RequestId = 'RequestId' in params ? params.RequestId : null; } } /** * Retention policy for scheduled snapshots. All four parameters are required. * @class */ class AdvancedRetentionPolicy extends AbstractModel { constructor(){ super(); /** * Retains one latest snapshot each day within `Days` days. Value range: [0, 100]. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.Days = null; /** * Retains one latest snapshot each week within `Weeks` weeks. Value range: [0, 100]. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.Weeks = null; /** * Retains one latest snapshot each month within `Months` months. Value range: [0, 100]. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.Months = null; /** * Retains one latest snapshot each year within `Years` years. Value range: [0, 100]. Note: This field may return null, indicating that no valid values can be obtained. * @type {number || null} */ this.Years = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.Days = 'Days' in params ? params.Days : null; this.Weeks = 'Weeks' in params ? params.Weeks : null; this.Months = 'Months' in params ? params.Months : null; this.Years = 'Years' in params ? params.Years : null; } } /** * CreateDisks request structure. * @class */ class CreateDisksRequest extends AbstractModel { constructor(){ super(); /** * Location of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone and project. If no project is specified, the default project will be used. * @type {Placement || null} */ this.Placement = null; /** * Cloud disk billing mode. POSTPAID_BY_HOUR: Pay-as-you-go by hour<br><li>CDCPAID: Billed together with the bound dedicated cluster<br>For more information on the pricing in each mode, see [Pricing Overview](https://intl.cloud.tencent.com/document/product/362/2413?from_cn_redirect=1). * @type {string || null} */ this.DiskChargeType = null; /** * Cloud disk media type. Valid values: <br><li>CLOUD_BASIC: HDD Cloud Storage<br><li>CLOUD_PREMIUM: Premium Cloud Disk<br><li>CLOUD_BSSD: Balanced SSD<br><li>CLOUD_SSD: SSD<br><li>CLOUD_HSSD: Enhanced SSD<br><li>CLOUD_TSSD: ulTra SSD. * @type {string || null} */ this.DiskType = null; /** * Cloud disk name. If it is not specified, "Unnamed" will be used by default. The maximum length is 60 bytes. * @type {string || null} */ this.DiskName = null; /** * Tags bound to the cloud disk. * @type {Array.<Tag> || null} */ this.Tags = null; /** * Snapshot ID. If this parameter is specified, the cloud disk will be created based on the snapshot. The snapshot must be a data disk snapshot. To query the type of a snapshot, call the [DescribeSnapshots](https://intl.cloud.tencent.com/document/product/362/15647?from_cn_redirect=1) API and see the `DiskUsage` field in the response. * @type {string || null} */ this.SnapshotId = null; /** * Number of cloud disks to be created. If it is not specified, `1` will be used by default. There is an upper limit on the maximum number of cloud disks that can be created in a single request. For more information, see [Use Limits](https://intl.cloud.tencent.com/doc/product/362/5145?from_cn_redirect=1). * @type {number || null} */ this.DiskCount = null; /** * Extra performance purchased for a cloud disk.<br>This optional parameter is only valid for ulTra SSD (CLOUD_TSSD) and Enhanced SSD (CLOUD_HSSD). * @type {number || null} */ this.ThroughputPerformance = null; /** * Cloud disk size in GB. <br><li>`DiskSize` is not required if `SnapshotId` is specified. In this case, the size of the cloud disk will be equal to that of the snapshot. <br><li>If you specify both `SnapshotId` and `DiskSize`, the specified disk size cannot be smaller than the snapshot size. <br><li>For the value range of cloud disk size, see [Cloud Disk Types](https://intl.cloud.tencent.com/document/product/362/2353?from_cn_redirect=1). * @type {number || null} */ this.DiskSize = null; /** * Optional parameter. Default value: `False`. If `True` is specified, the new cloud disk will be shared. * @type {boolean || null} */ this.Shareable = null; /** * A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed. * @type {string || null} */ this.ClientToken = null; /** * This parameter is used to create encrypted cloud disks. It is fixed at `ENCRYPT`. * @type {string || null} */ this.Encrypt = null; /** * Relevant parameter settings for the prepaid mode (i.e., monthly subscription). The monthly subscription cloud disk purchase attributes such as usage period and whether or not auto-renewal is set up can be specified using this parameter. <br>This parameter is required when creating a prepaid cloud disk. This parameter is not required when creating an hourly postpaid cloud disk. * @type {DiskChargePrepaid || null} */ this.DiskChargePrepaid = null; /** * Whether to delete the associated non-permanently reserved snapshots upon deletion of the source cloud disk. `0`: No (default value). `1`: Yes. To check whether a snapshot is permanently reserved, see the `IsPermanent` field returned by the `DescribeSnapshots` API. * @type {number || null} */ this.DeleteSnapshot = null; /** * Specifies whether to automatically attach and initialize the newly created data disk. * @type {AutoMountConfiguration || null} */ this.AutoMountConfiguration = null; /** * Specifies the cloud disk backup point quota. * @type {number || null} */ this.DiskBackupQuota = null; /** * Specifies whether to enable disk bursting. * @type {boolean || null} */ this.BurstPerformance = null; } /** * @private */ deserialize(params) { if (!params) { return; } if (params.Placement) { let obj = new Placement(); obj.deserialize(params.Placement) this.Placement = obj; } this.DiskChargeType = 'DiskChargeType' in params ? params.DiskChargeType : null; this.DiskType = 'DiskType' in params ? params.DiskType : null; this.DiskName = 'DiskName' in params ? params.DiskName : null; if (params.Tags) { this.Tags = new Array(); for (let z in params.Tags) { let obj = new Tag(); obj.deserialize(params.Tags[z]); this.Tags.push(obj); } } this.SnapshotId = 'SnapshotId' in params ? params.SnapshotId : null; this.DiskCount = 'DiskCount' in params ? params.DiskCount : null; this.ThroughputPerformance = 'ThroughputPerformance' in params ? params.ThroughputPerformance : null; this.DiskSize = 'DiskSize' in params ? params.DiskSize : null; this.Shareable = 'Shareable' in params ? params.Shareable : null; this.ClientToken = 'ClientToken' in params ? params.ClientToken : null; this.Encrypt = 'Encrypt' in params ? params.Encrypt : null; if (params.DiskChargePrepaid) { let obj = new DiskChargePrepaid(); obj.deserialize(params.DiskChargePrepaid) this.DiskChargePrepaid = obj; } this.DeleteSnapshot = 'DeleteSnapshot' in params ? params.DeleteSnapshot : null; if (params.AutoMountConfiguration) { let obj = new AutoMountConfiguration(); obj.deserialize(params.AutoMountConfiguration) this.AutoMountConfiguration = obj; } this.DiskBackupQuota = 'DiskBackupQuota' in params ? params.DiskBackupQuota : null; this.BurstPerformance = 'BurstPerformance' in params ? params.BurstPerformance : null; } } /** * AttachDisks request structure. * @class */ class AttachDisksRequest extends AbstractModel { constructor(){ super(); /** * ID of the CVM instance on which the cloud disk will be mounted. It can be queried via the API [DescribeInstances](https://intl.cloud.tencent.com/document/product/213/15728?from_cn_redirect=1). * @type {string || null} */ this.InstanceId = null; /** * ID of the elastic cloud disk to be mounted, which can be queried through the API [DescribeDisks](https://intl.cloud.tencent.com/document/product/362/16315?from_cn_redirect=1). A maximum of 10 elastic cloud disks can be mounted in a single request. * @type {Array.<string> || null} */ this.DiskIds = null; /** * Optional parameter. If this is not passed only the mount operation is executed. If `True` is passed, the cloud disk will be configured to be terminated when the server it is mounted to is terminated. This is only valid for pay-as-you-go cloud disks. * @type {boolean || null} */ this.DeleteWithInstance = null; /** * (Optional) Specifies the cloud disk mounting method. It’s only valid for BM models. Valid values: <br><li>PF<br><li>VF * @type {string || null} */ this.AttachMode = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.InstanceId = 'InstanceId' in params ? params.InstanceId : null; this.DiskIds = 'DiskIds' in params ? params.DiskIds : null; this.DeleteWithInstance = 'DeleteWithInstance' in params ? params.DeleteWithInstance : null; this.AttachMode = 'AttachMode' in params ? params.AttachMode : null; } } /** * DescribeDiskAssociatedAutoSnapshotPolicy request structure. * @class */ class DescribeDiskAssociatedAutoSnapshotPolicyRequest extends AbstractModel { constructor(){ super(); /** * The ID of the queried cloud disk. * @type {string || null} */ this.DiskId = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.DiskId = 'DiskId' in params ? params.DiskId : null; } } /** * DescribeSnapshots request structure. * @class */ class DescribeSnapshotsRequest extends AbstractModel { constructor(){ super(); /** * List of snapshot IDs to be queried. The parameter does not support specifying both `SnapshotIds` and `Filters`. * @type {Array.<string> || null} */ this.SnapshotIds = null; /** * Filters. It cannot be specified together with `SnapshotIds`.<br><li>snapshot-id - Array of String - Optional - Filters by snapshot ID, such as `snap-11112222`.<br><li>snapshot-name - Array of String - Optional - Filters by snapshot name. <br><li>snapshot-state - Array of String - Optional - Filters by snapshot state (NORMAL: normal | CREATING: creating | ROLLBACKING: rolling back). <br><li>disk-usage - Array of String - Optional - Filters by the type of the cloud disk from which a snapshot is created (SYSTEM_DISK: system disk | DATA_DISK: data disk).<br><li>project-id - Array of String - Optional - Filters by the ID of the project to which a cloud disk belongs. <br><li>disk-id - Array of String - Optional - Filters by the ID of the cloud disk from which a snapshot is created.<br><li>zone - Array of String - Optional - Filters by [availability zone](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#ZoneInfo).<br><li>encrypt - Array of String - Optional - Filters by whether a snapshot is created from an encrypted cloud disk. (TRUE: a snapshot of an encrypted cloud disk | FALSE: not a snapshot of an encrypted cloud disk.) <li>snapshot-type- Array of String - Optional - Filters by the snapshot type specified in `snapshot-type`. (SHARED_SNAPSHOT: a shared snapshot | PRIVATE_SNAPSHOT: a private snapshot.) * @type {Array.<Filter> || null} */ this.Filters = null; /** * Offset. Default is 0. For more information on `Offset`, please see relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/product/362/15633?from_cn_redirect=1). * @type {number || null} */ this.Offset = null; /** * Number of results to be returned. Default is 20. Maximum is 100. For more information on `Limit`, please see relevant sections in API [Introduction](https://intl.cloud.tencent.com/document/product/362/15633?from_cn_redirect=1). * @type {number || null} */ this.Limit = null; /** * Outputs the ordering of the cloud disk list. Value range: <br><li>ASC: Ascending order <br><li>DESC: Descending order. * @type {string || null} */ this.Order = null; /** * The field by which the snapshot list is sorted. Value range: <br><li>CREATE_TIME: sorted by the creation time of the snapshots <br>By default, the snapshot list is sorted by the creation time of snapshots. * @type {string || null} */ this.OrderField = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.SnapshotIds = 'SnapshotIds' in params ? params.SnapshotIds : 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.Offset = 'Offset' in params ? params.Offset : null; this.Limit = 'Limit' in params ? params.Limit : null; this.Order = 'Order' in params ? params.Order : null; this.OrderField = 'OrderField' in params ? params.OrderField : null; } } /** * ModifyAutoSnapshotPolicyAttribute request structure. * @class */ class ModifyAutoSnapshotPolicyAttributeRequest extends AbstractModel { constructor(){ super(); /** * Scheduled snapshot policy ID. * @type {string || null} */ this.AutoSnapshotPolicyId = null; /** * Whether or not the scheduled snapshot policy is activated. FALSE: Not activated. TRUE: Activated. The default value is TRUE. * @type {boolean || null} */ this.IsActivated = null; /** * Whether the snapshot created by this scheduled snapshot policy is retained permanently. FALSE: Not retained permanently. TRUE: Retained permanently. The default value is FALSE. * @type {boolean || null} */ this.IsPermanent = null; /** * The name of the scheduled snapshot policy to be created. If it is left empty, the default is 'Not named'. The maximum length cannot exceed 60 bytes. * @type {string || null} */ this.AutoSnapshotPolicyName = null; /** * The policy for executing the scheduled snapshot. * @type {Array.<Policy> || null} */ this.Policy = null; /** * Number of days to retain the snapshots created according to this scheduled snapshot policy. If this parameter is specified, `IsPermanent` cannot be specified as `TRUE`; otherwise, they will conflict with each other. * @type {number || null} */ this.RetentionDays = null; } /** * @private */ deserialize(params) { if (!params) { return; } this.AutoSnapshotPolicyId = 'AutoSnapshotPolicyId' in params ? params.AutoSnapshotPolicyId : null; this.IsActivated = 'IsActivated' in params ? params.IsActivated : null; this.IsPermanent = 'IsPermanent' in params ? params.IsPermanent : null; this.AutoSnapshotPolicyName = 'AutoSnapshotPoli