Files
g.hnyhua.cn/TencentCloud/Cbs/V20170312/Models/CreateDisksRequest.cs

121 lines
5.6 KiB
C#
Raw Normal View History

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