/* * 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. */ namespace TencentCloud.Cbs.V20170312.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class CreateDisksRequest : AbstractModel { /// /// 硬盘介质类型。取值范围:
  • CLOUD_BASIC:表示普通云硬盘
  • CLOUD_PREMIUM:表示高性能云硬盘
  • CLOUD_SSD:表示SSD云硬盘。 ///
  • [JsonProperty("DiskType")] public string DiskType{ get; set; } /// /// 云硬盘计费类型。
  • PREPAID:预付费,即包年包月
  • POSTPAID_BY_HOUR:按小时后付费
  • CDCPAID:独享集群付费
    各类型价格请参考云硬盘[价格总览](/document/product/362/2413)。 ///
  • [JsonProperty("DiskChargeType")] public string DiskChargeType{ get; set; } /// /// 实例所在的位置。通过该参数可以指定实例所属可用区,所属项目。若不指定项目,将在默认项目下进行创建。 /// [JsonProperty("Placement")] public Placement Placement{ get; set; } /// /// 云盘显示名称。不传则默认为“未命名”。最大长度不能超60个字节。 /// [JsonProperty("DiskName")] public string DiskName{ get; set; } /// /// 创建云硬盘数量,不传则默认为1。单次请求最多可创建的云盘数有限制,具体参见[云硬盘使用限制](https://cloud.tencent.com/doc/product/362/5145)。 /// [JsonProperty("DiskCount")] public ulong? DiskCount{ get; set; } /// /// 预付费模式,即包年包月相关参数设置。通过该参数指定包年包月云盘的购买时长、是否设置自动续费等属性。
    创建预付费云盘该参数必传,创建按小时后付费云盘无需传该参数。 ///
    [JsonProperty("DiskChargePrepaid")] public DiskChargePrepaid DiskChargePrepaid{ get; set; } /// /// 云硬盘大小,单位为GB。
  • 如果传入`SnapshotId`则可不传`DiskSize`,此时新建云盘的大小为快照大小
  • 如果传入`SnapshotId`同时传入`DiskSize`,则云盘大小必须大于或等于快照大小
  • 云盘大小取值范围参见云硬盘[产品分类](/document/product/362/2353)的说明。 ///
  • [JsonProperty("DiskSize")] public ulong? DiskSize{ get; set; } /// /// 快照ID,如果传入则根据此快照创建云硬盘,快照类型必须为数据盘快照,可通过[DescribeSnapshots](/document/product/362/15647)接口查询快照,见输出参数DiskUsage解释。 /// [JsonProperty("SnapshotId")] public string SnapshotId{ get; set; } /// /// 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。 /// [JsonProperty("ClientToken")] public string ClientToken{ get; set; } /// /// 传入该参数用于创建加密云盘,取值固定为ENCRYPT。 /// [JsonProperty("Encrypt")] public string Encrypt{ get; set; } /// /// 云盘绑定的标签。 /// [JsonProperty("Tags")] public Tag[] Tags{ get; set; } /// /// 可选参数,默认为False。传入True时,云盘将创建为共享型云盘。 /// [JsonProperty("Shareable")] public bool? Shareable{ get; set; } /// /// For internal usage only. DO NOT USE IT. /// internal override void ToMap(Dictionary map, string prefix) { this.SetParamSimple(map, prefix + "DiskType", this.DiskType); this.SetParamSimple(map, prefix + "DiskChargeType", this.DiskChargeType); this.SetParamObj(map, prefix + "Placement.", this.Placement); this.SetParamSimple(map, prefix + "DiskName", this.DiskName); this.SetParamSimple(map, prefix + "DiskCount", this.DiskCount); this.SetParamObj(map, prefix + "DiskChargePrepaid.", this.DiskChargePrepaid); this.SetParamSimple(map, prefix + "DiskSize", this.DiskSize); this.SetParamSimple(map, prefix + "SnapshotId", this.SnapshotId); this.SetParamSimple(map, prefix + "ClientToken", this.ClientToken); this.SetParamSimple(map, prefix + "Encrypt", this.Encrypt); this.SetParamArrayObj(map, prefix + "Tags.", this.Tags); this.SetParamSimple(map, prefix + "Shareable", this.Shareable); } } }