186 lines
9.7 KiB
C#
186 lines
9.7 KiB
C#
/*
|
||
* 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.As.V20180419.Models
|
||
{
|
||
using Newtonsoft.Json;
|
||
using System.Collections.Generic;
|
||
using TencentCloud.Common;
|
||
|
||
public class CreateLaunchConfigurationRequest : AbstractModel
|
||
{
|
||
|
||
/// <summary>
|
||
/// 启动配置显示名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。
|
||
/// </summary>
|
||
[JsonProperty("LaunchConfigurationName")]
|
||
public string LaunchConfigurationName{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-8toqc6s3`。镜像类型分为四种:<br/><li>公共镜像</li><li>自定义镜像</li><li>共享镜像</li><li>服务市场镜像</li><br/>可通过以下方式获取可用的镜像ID:<br/><li>`公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。</li><li>通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。</li>
|
||
/// </summary>
|
||
[JsonProperty("ImageId")]
|
||
public string ImageId{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例所属项目ID。该参数可以通过调用 [DescribeProject](https://cloud.tencent.com/document/api/378/4400) 的返回值中的`projectId`字段来获取。不填为默认项目。
|
||
/// </summary>
|
||
[JsonProperty("ProjectId")]
|
||
public ulong? ProjectId{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例机型。不同实例机型指定了不同的资源规格,具体取值可通过调用接口 [DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749) 来获得最新的规格表或参见[实例类型](https://cloud.tencent.com/document/product/213/11518)描述。
|
||
/// `InstanceType`和`InstanceTypes`参数互斥,二者必填一个且只能填写一个。
|
||
/// </summary>
|
||
[JsonProperty("InstanceType")]
|
||
public string InstanceType{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。
|
||
/// </summary>
|
||
[JsonProperty("SystemDisk")]
|
||
public SystemDisk SystemDisk{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例数据盘配置信息。若不指定该参数,则默认不购买数据盘,最多支持指定11块数据盘。
|
||
/// </summary>
|
||
[JsonProperty("DataDisks")]
|
||
public DataDisk[] DataDisks{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。
|
||
/// </summary>
|
||
[JsonProperty("InternetAccessible")]
|
||
public InternetAccessible InternetAccessible{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。
|
||
/// </summary>
|
||
[JsonProperty("LoginSettings")]
|
||
public LoginSettings LoginSettings{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的`SecurityGroupId`字段来获取。若不指定该参数,则默认不绑定安全组。
|
||
/// </summary>
|
||
[JsonProperty("SecurityGroupIds")]
|
||
public string[] SecurityGroupIds{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。
|
||
/// </summary>
|
||
[JsonProperty("EnhancedService")]
|
||
public EnhancedService EnhancedService{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 经过 Base64 编码后的自定义数据,最大长度不超过16KB。
|
||
/// </summary>
|
||
[JsonProperty("UserData")]
|
||
public string UserData{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例计费类型,CVM默认值按照POSTPAID_BY_HOUR处理。
|
||
/// <br><li>POSTPAID_BY_HOUR:按小时后付费
|
||
/// <br><li>SPOTPAID:竞价付费
|
||
/// </summary>
|
||
[JsonProperty("InstanceChargeType")]
|
||
public string InstanceChargeType{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例的市场相关选项,如竞价实例相关参数,若指定实例的付费模式为竞价付费则该参数必传。
|
||
/// </summary>
|
||
[JsonProperty("InstanceMarketOptions")]
|
||
public InstanceMarketOptionsRequest InstanceMarketOptions{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例机型列表,不同实例机型指定了不同的资源规格,最多支持10种实例机型。
|
||
/// `InstanceType`和`InstanceTypes`参数互斥,二者必填一个且只能填写一个。
|
||
/// </summary>
|
||
[JsonProperty("InstanceTypes")]
|
||
public string[] InstanceTypes{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 实例类型校验策略,取值包括 ALL 和 ANY,默认取值为ANY。
|
||
/// <br><li> ALL,所有实例类型(InstanceType)都可用则通过校验,否则校验报错。
|
||
/// <br><li> ANY,存在任何一个实例类型(InstanceType)可用则通过校验,否则校验报错。
|
||
///
|
||
/// 实例类型不可用的常见原因包括该实例类型售罄、对应云盘售罄等。
|
||
/// 如果 InstanceTypes 中一款机型不存在或者已下线,则无论 InstanceTypesCheckPolicy 采用何种取值,都会校验报错。
|
||
/// </summary>
|
||
[JsonProperty("InstanceTypesCheckPolicy")]
|
||
public string InstanceTypesCheckPolicy{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 标签列表。通过指定该参数,可以为扩容的实例绑定标签。最多支持指定10个标签。
|
||
/// </summary>
|
||
[JsonProperty("InstanceTags")]
|
||
public InstanceTag[] InstanceTags{ get; set; }
|
||
|
||
/// <summary>
|
||
/// CAM角色名称。可通过DescribeRoleList接口返回值中的roleName获取。
|
||
/// </summary>
|
||
[JsonProperty("CamRoleName")]
|
||
public string CamRoleName{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 云服务器主机名(HostName)的相关设置。
|
||
/// </summary>
|
||
[JsonProperty("HostNameSettings")]
|
||
public HostNameSettings HostNameSettings{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 云服务器实例名(InstanceName)的相关设置。
|
||
/// </summary>
|
||
[JsonProperty("InstanceNameSettings")]
|
||
public InstanceNameSettings InstanceNameSettings{ get; set; }
|
||
|
||
/// <summary>
|
||
/// 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。若指定实例的付费模式为预付费则该参数必传。
|
||
/// </summary>
|
||
[JsonProperty("InstanceChargePrepaid")]
|
||
public InstanceChargePrepaid InstanceChargePrepaid{ 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 + "LaunchConfigurationName", this.LaunchConfigurationName);
|
||
this.SetParamSimple(map, prefix + "ImageId", this.ImageId);
|
||
this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
|
||
this.SetParamSimple(map, prefix + "InstanceType", this.InstanceType);
|
||
this.SetParamObj(map, prefix + "SystemDisk.", this.SystemDisk);
|
||
this.SetParamArrayObj(map, prefix + "DataDisks.", this.DataDisks);
|
||
this.SetParamObj(map, prefix + "InternetAccessible.", this.InternetAccessible);
|
||
this.SetParamObj(map, prefix + "LoginSettings.", this.LoginSettings);
|
||
this.SetParamArraySimple(map, prefix + "SecurityGroupIds.", this.SecurityGroupIds);
|
||
this.SetParamObj(map, prefix + "EnhancedService.", this.EnhancedService);
|
||
this.SetParamSimple(map, prefix + "UserData", this.UserData);
|
||
this.SetParamSimple(map, prefix + "InstanceChargeType", this.InstanceChargeType);
|
||
this.SetParamObj(map, prefix + "InstanceMarketOptions.", this.InstanceMarketOptions);
|
||
this.SetParamArraySimple(map, prefix + "InstanceTypes.", this.InstanceTypes);
|
||
this.SetParamSimple(map, prefix + "InstanceTypesCheckPolicy", this.InstanceTypesCheckPolicy);
|
||
this.SetParamArrayObj(map, prefix + "InstanceTags.", this.InstanceTags);
|
||
this.SetParamSimple(map, prefix + "CamRoleName", this.CamRoleName);
|
||
this.SetParamObj(map, prefix + "HostNameSettings.", this.HostNameSettings);
|
||
this.SetParamObj(map, prefix + "InstanceNameSettings.", this.InstanceNameSettings);
|
||
this.SetParamObj(map, prefix + "InstanceChargePrepaid.", this.InstanceChargePrepaid);
|
||
}
|
||
}
|
||
}
|
||
|