tencentcloud-sdk-nodejs-intl-en
Version:
1,460 lines (1,229 loc) • 199 kB
JavaScript
/*
* 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");
/**
* ModifyDiskExtraPerformance request structure.
* @class
*/
class ModifyDiskExtraPerformanceRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies the hard disk performance of the additional CBS purchase in MiB/s.
* @type {number || null}
*/
this.ThroughputPerformance = null;
/**
* The CLOUD disk ID for which extra performance needs to be purchased. it can be queried via the [DescribeDisks](https://www.tencentcloud.com/document/product/362/16315?from_cn_redirect=1) api. extra performance is only supported for enhanced SSD (CLOUD_HSSD) and ultra-fast SSD (CLOUD_TSSD) CBS disks exceeding 460GiB in size.
* @type {string || null}
*/
this.DiskId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ThroughputPerformance = 'ThroughputPerformance' in params ? params.ThroughputPerformance : null;
this.DiskId = 'DiskId' in params ? params.DiskId : null;
}
}
/**
* ModifyDiskAttributes response structure.
* @class
*/
class ModifyDiskAttributesResponse 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;
}
}
/**
* 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 criteria. parameters must not be specified simultaneously for DiskBackupIds and Filters. filter conditions:<br><li>disk-backup-id - Array of String - required: no - (filter condition) Filters by backup point id. backup point id format: dbp-11112222.</li><br><li>disk-id - Array of String - required: no - (filter condition) Filters by cloud disk id where the backup point was created. cloud disk id format: disk-srftydert.</li><br><li>disk-usage - Array of String - required: no - (filter condition) Filters by cloud disk type (SYSTEM_disk: represents SYSTEM disk | DATA_disk: represents DATA disk).</li>.
* @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;
/**
* Specifies the sorting order of the CBS backup point list. default: ASC. valid values: <br><li>ASC: ascending order</li><br><li>DESC: descending order.</li>.
* @type {string || null}
*/
this.Order = null;
/**
* Field on which the list of cloud disk backup points is sorted. valid values: <br><li>CREATE_TIME: sort by creation TIME of the cloud disk backup point</li><br>sort 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;
}
}
/**
* CreateSnapshotGroup request structure.
* @class
*/
class CreateSnapshotGroupRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies the cloud disk ID list for creating snapshot groups. disks mounted on the same instance must be selected.
* @type {Array.<string> || null}
*/
this.DiskIds = null;
/**
* Snapshot group name. snapshots associated with the snapshot group inherit the snapshot group name. example: if the snapshot group name is testSnapshotGroup and the snapshot group is associated with two snapshots, the snapshot names are testSnapshotGroup_0 and testSnapshotGroup_1 respectively.
* @type {string || null}
*/
this.SnapshotGroupName = null;
/**
* Specifies the Tag list that should be bound to the snapshot group.
* @type {Array.<Tag> || null}
*/
this.Tags = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskIds = 'DiskIds' in params ? params.DiskIds : null;
this.SnapshotGroupName = 'SnapshotGroupName' in params ? params.SnapshotGroupName : 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 describes the detailed information of the scheduled snapshot policy.
* @class
*/
class AutoSnapshotPolicy extends AbstractModel {
constructor(){
super();
/**
* It lists IDs of cloud disks that have been bound to the current regular snapshot policy.
In the scenario of DescribeDiskAssociatedAutoSnapshotPolicy, this field returns empty.
* @type {Array.<string> || null}
*/
this.DiskIdSet = null;
/**
* Whether scheduled snapshot policy is activated.
* @type {boolean || null}
*/
this.IsActivated = null;
/**
* Status of regular snapshot policy. valid values:.
<ul>
<Li>NORMAL: specifies the scaling group is in normal state.</li>.
<Li>ISOLATED: specifies the instance is isolated.</li>.
</ul>
* @type {string || null}
*/
this.AutoSnapshotPolicyState = null;
/**
* Whether it is a cross-account snapshot replication. valid values: 1 (yes), 0 (no).
* @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;
/**
* Lists instance ids that are bound to the current periodic snapshot policy.
* @type {Array.<string> || null}
*/
this.InstanceIdSet = null;
/**
* Specifies the number of months snapshot can be retained.
* @type {number || null}
*/
this.RetentionMonths = null;
/**
* Specifies the maximum retention number of snapshots created by scheduled snapshot.
* @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.
* @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 a billable item.
* @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;
}
}
/**
* ModifySnapshotsSharePermission request structure.
* @class
*/
class ModifySnapshotsSharePermissionRequest extends AbstractModel {
constructor(){
super();
/**
* The ID of the snapshot. You can obtain this by using [DescribeSnapshots](https://intl.cloud.tencent.com/document/api/362/15647?from_cn_redirect=1).
* @type {Array.<string> || null}
*/
this.SnapshotIds = null;
/**
* Account Id list for receiving shared snapshots. the format of array-type parameters can be found in the API overview (https://www.tencentcloud.com/document/API/213/568?from_cn_redirect=1). the account Id is different from a QQ number. to query a user account Id, view the account Id column in the account information (https://console.cloud.tencent.com/developer).
* @type {Array.<string> || null}
*/
this.AccountIds = null;
/**
* Operations. Valid values: `SHARE`, sharing an image; `CANCEL`, cancelling the sharing of an image.
* @type {string || null}
*/
this.Permission = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SnapshotIds = 'SnapshotIds' in params ? params.SnapshotIds : null;
this.AccountIds = 'AccountIds' in params ? params.AccountIds : null;
this.Permission = 'Permission' in params ? params.Permission : 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, 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.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;
}
}
/**
* DescribeSnapshotGroups request structure.
* @class
*/
class DescribeSnapshotGroupsRequest extends AbstractModel {
constructor(){
super();
/**
* Filter criteria.<br><li>snapshot-group-id - Array of String - Required: No - (Filter criteria) Filter by snapshot group ID.<br><li>snapshot-group-state - Array of String - Required: No - (Filter criteria) Filter by snapshot group state. (NORMAL: Normal | CREATING: Creating | ROLLBACKING: Rolling back)<br><li>snapshot-group-name - Array of String - Required: No - (Filter criteria) Filter by snapshot group name.<br><li>snapshot-id - Array of String - Required: No - (Filter criteria) Filter by snapshot ID within the snapshot group.
* @type {Array.<Filter> || null}
*/
this.Filters = null;
/**
* Offset. Default value: 0.
* @type {number || null}
*/
this.Offset = null;
/**
* Number of returns, with a default value of 20, and a maximum value of 100.
* @type {number || null}
*/
this.Limit = 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.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* ModifyDiskBackupQuota request structure.
* @class
*/
class ModifyDiskBackupQuotaRequest extends AbstractModel {
constructor(){
super();
/**
* Cloud disk ID. can be queried via the [DescribeDisks](https://www.tencentcloud.com/document/product/362/16315?from_cn_redirect=1) api.
* @type {string || null}
*/
this.DiskId = null;
/**
* Adjusted cloud disk backup point quota. value range: 1-1024.
* @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, 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.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();
/**
* Specifies the ID of the regular snapshot policy to bind. query via the DescribeAutoSnapshotPolicies api (https://www.tencentcloud.com/document/api/362/33556?from_cn_redirect=1).
* @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, 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.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 criteria. AutoSnapshotPolicyIds and Filters cannot be specified at the same time.
<li>auto-snapshot-policy-id - Array of String - required: no - (filter condition) filter by regular snapshot policy id. regular snapshot policy id such as: `asp-3stvwfxx`.</li>.
<li>AutoSnapshotPolicyState - Array of String - required: no - (filter condition) filters by the status of the regular snapshot policy. regular snapshot policy ID format: `asp-3stvwfxx`. (NORMAL: NORMAL | ISOLATED: ISOLATED).</li>.
<li>AutoSnapshotPolicyName - Array of String - required: no - (filter condition) filters by the name of the regular snapshot policy.</li>.
* @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;
/**
* Specifies the output order of the regular snapshot list. valid values: <br><li>ASC: ascending order<br></li><li>DESC: descending order.</li>.
* @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, 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;
}
}
/**
* DeleteDiskBackups request structure.
* @class
*/
class DeleteDiskBackupsRequest extends AbstractModel {
constructor(){
super();
/**
* Cloud disk backup point ID to be deleted. can be queried through the [DescribeDiskBackups](https://www.tencentcloud.com/document/product/362/80278?from_cn_redirect=1) api.
* @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, 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;
}
}
/**
* DescribeDiskStoragePool request structure.
* @class
*/
class DescribeDiskStoragePoolRequest extends AbstractModel {
constructor(){
super();
/**
* Number of returned results, defaults to 20 with a maximum value of 100. For further introduction about `Limit`, see relevant sections in the API [overview](/document/product/362/15633).
* @type {number || null}
*/
this.Limit = null;
/**
* Specify the exclusive cluster ID list you want to query. This parameter cannot be used with Filters.
* @type {Array.<string> || null}
*/
this.CdcIds = null;
/**
* Filter conditions. `CdcIds` and `Filters` cannot be specified at the same time. <br><li>cdc-id - Array of String - Optional - Filter by the cluster ID. <br><li>zone - Array of String - Optional - Filter by the [availability zone](https://intl.cloud.tencent.com/document/product/213/15753?from_cn_redirect=1#ZoneInfo) where the cluster resides. <br><li>cage-id - Array of String - Optional - Filter by the ID of the cage where the cluster resides. <br><li>disk-type - Array of string - Optional - Filter by the media type of cloud disks (`CLOUD_BASIC`: HDD cloud disk | `CLOUD_PREMIUM`: Premium cloud disk. | `CLOUD_SSD`: SSD cloud disk.)
* @type {Array.<Filter> || null}
*/
this.Filters = null;
/**
* Offset, defaults to 0. For further introduction about `Offset`, see the relevant sections in the API [overview](/document/product/362/15633).
* @type {number || null}
*/
this.Offset = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Limit = 'Limit' in params ? params.Limit : null;
this.CdcIds = 'CdcIds' in params ? params.CdcIds : 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;
}
}
/**
* 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, 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.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;
}
}
/**
* RenewDisk request structure.
* @class
*/
class RenewDiskRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies the parameter CurInstanceDeadline in the scenario where the cloud disk and mounted instance renew together. at this point, the cloud disk renewal aligns with the instance renewal expiry date.
* @type {DiskChargePrepaid || null}
*/
this.DiskChargePrepaid = null;
/**
* Cloud disk ID, which can be queried by calling the [DescribeDisks](https://www.tencentcloud.com/document/product/362/16315?from_cn_redirect=1) API.
* @type {string || null}
*/
this.DiskId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.DiskChargePrepaid) {
let obj = new DiskChargePrepaid();
obj.deserialize(params.DiskChargePrepaid)
this.DiskChargePrepaid = obj;
}
this.DiskId = 'DiskId' in params ? params.DiskId : 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, 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.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 the latest snapshot of each day within the specified number of Days. value range: [0, 100].
* @type {number || null}
*/
this.Days = null;
/**
* Reserve the latest snapshot of each week for Weeks. value range: [0, 100].
* @type {number || null}
*/
this.Weeks = null;
/**
* Reserve the latest snapshot of each month within Months Months. value range: [0, 100].
* @type {number || null}
*/
this.Months = null;
/**
* Reserve the latest snapshot of each year within Years Years. value range: [0, 100].
* @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;
/**
* Hard disk media type. valid values:<br><li>CLOUD_PREMIUM: indicates high-performance CLOUD block storage</li><br><li>CLOUD_BSSD: indicates universal type SSD CLOUD disk</li><br><li>CLOUD_SSD: indicates SSD CLOUD disk</li><br><li>CLOUD_HSSD: indicates enhanced SSD CLOUD disk</li><br><li>CLOUD_TSSD: indicates ultra-fast SSD cbs.</li>ultra-fast SSD CBS (CLOUD_TSSD) is only supported when purchased with some instances and not currently supported for separate creation.
* @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;
/**
* Use this parameter to purchase additional performance for CLOUD disk in MB/s.<br>currently, only extreme CBS (CLOUD_TSSD) and enhanced SSD CLOUD disk (CLOUD_HSSD) are supported.
* @type {number || null}
*/
this.ThroughputPerformance = null;
/**
* Custom key for purchasing encrypted disks. when this parameter is input, the Encrypt parameter cannot be empty.
* @type {string || null}
*/
this.KmsKeyId = null;
/**
* Cloud disk size in GiB. <li>if `SnapshotId` is input, `DiskSize` can be omitted. at this point, the new cloud disk size will be the snapshot size.</li> <li>if both `SnapshotId` and `DiskSize` are input, the cloud disk size must be greater than or equal to the snapshot size.</li> <li>for the cloud disk size range, please refer to the [product type](https://www.tencentcloud.com/document/product/362/2353?from_cn_redirect=1) of cloud block storage.</li>.
* @type {number || null}
*/
this.DiskSize = null;
/**
* When True is entered, the cloud disk will be created as a shared cloud disk. default is False. since shared cloud disk does not support encryption, this parameter cannot be imported simultaneously with the Encrypt parameter.
* @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 an encrypted cloud disk, with the value fixed as ENCRYPT. since shared cloud disk does not support encryption, this parameter cannot be imported simultaneously with the Shareable parameter.
* @type {string || null}
*/
this.Encrypt = null;
/**
* Prepaid mode, that is, the settings for the monthly subscription-related parameters. through this parameter, you can specify the purchase duration of the monthly subscribed cloud disk, whether to enable auto-renewal, and other attributes. this parameter is required for creating a prepaid cloud disk, but no need to specify it when creating an hourly postpaid cloud disk.
* @type {DiskChargePrepaid || null}
*/
this.DiskChargePrepaid = null;
/**
* Delete associated non-permanently retained snapshots when destroying the cloud disk. 0 means non-permanent snapshots are not deleted with cloud disk destruction, 1 means non-permanent snapshots are deleted with cloud disk destruction. default value is 0. whether a snapshot is permanently retained can be determined through the IsPermanent field in the snapshot description returned by the [DescribeSnapshots](https://www.tencentcloud.com/document/api/362/15647?from_cn_redirect=1) api. True represents a permanent snapshot, False represents a non-permanent snapshot.
* @type {number || null}
*/
this.DeleteSnapshot = null;
/**
* Specifies auto mount and initialization of the data disk when creating a cloud disk. this parameter cannot be imported simultaneously with the Encrypt parameter because encrypted disks do not support auto mount or initialization.
* @type {AutoMountConfiguration || null}
*/
this.AutoMountConfiguration = null;
/**
* Specifies the cloud disk backup point quota.
* @type {number || null}
*/
this.DiskBackupQuota = null;
/**
* Specifies whether to enable burst performance when creating a CLOUD disk. currently only supports extreme cbs (CLOUD_TSSD) and enhanced SSD CLOUD disk (CLOUD_HSSD) with CLOUD disk size greater than or equal to 460GiB.
* @type {boolean || null}
*/
this.BurstPerformance = null;
/**
* Specifies the CBS encryption type. valid values are ENCRYPT_V1 and ENCRYPT_V2, representing first generation and second generation encryption technology respectively. the two encryption technologies are incompatible. it is recommended to prioritize using second generation encryption technology ENCRYPT_V2. first generation encryption is only supported on some outdated models. this parameter is valid only when creating an encrypted cloud disk.
* @type {string || null}
*/
this.EncryptType = 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.KmsKeyId = 'KmsKeyId' in params ? params.KmsKeyId : 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;
this.EncryptType = 'EncryptType' in params ? params.EncryptType : 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 parameter, used to control the mount mode used in cloud disk mounting, currently only applicable to blackstone bare metal model. valid values: <br><li>PF</li><br><li>VF</li>.
* @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();
/**
* Specifies the cloud disk ID to query. can be queried via the [DescribeDisks](https://www.tencentcloud.com/document/api/362/16315?from_cn_redirect=1) api.
* @type {string || null}
*/
this.DiskId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskId = 'DiskId' in params ?