/* * 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 ModifyLaunchConfigurationAttributesRequest : AbstractModel { /// /// 启动配置ID /// [JsonProperty("LaunchConfigurationId")] public string LaunchConfigurationId{ get; set; } /// /// 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-8toqc6s3`。镜像类型分为四种:
  • 公共镜像
  • 自定义镜像
  • 共享镜像
  • 服务市场镜像

  • 可通过以下方式获取可用的镜像ID:
  • `公共镜像`、`自定义镜像`、`共享镜像`的镜像ID可通过登录[控制台](https://console.cloud.tencent.com/cvm/image?rid=1&imageType=PUBLIC_IMAGE)查询;`服务镜像市场`的镜像ID可通过[云市场](https://market.cloud.tencent.com/list)查询。
  • 通过调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715) ,取返回信息中的`ImageId`字段。
  • ///
    [JsonProperty("ImageId")] public string ImageId{ get; set; } /// /// 实例类型列表,不同实例机型指定了不同的资源规格,最多支持5种实例机型。 /// 启动配置,通过 InstanceType 表示单一实例类型,通过 InstanceTypes 表示多实例类型。指定 InstanceTypes 成功启动配置后,原有的 InstanceType 自动失效。 /// [JsonProperty("InstanceTypes")] public string[] InstanceTypes{ get; set; } /// /// 实例类型校验策略,在实际修改 InstanceTypes 时发挥作用,取值包括 ALL 和 ANY,默认取值为ANY。 ///
  • ALL,所有实例类型(InstanceType)都可用则通过校验,否则校验报错。 ///
  • ANY,存在任何一个实例类型(InstanceType)可用则通过校验,否则校验报错。 /// /// 实例类型不可用的常见原因包括该实例类型售罄、对应云盘售罄等。 /// 如果 InstanceTypes 中一款机型不存在或者已下线,则无论 InstanceTypesCheckPolicy 采用何种取值,都会校验报错。 ///
  • [JsonProperty("InstanceTypesCheckPolicy")] public string InstanceTypesCheckPolicy{ get; set; } /// /// 启动配置显示名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。 /// [JsonProperty("LaunchConfigurationName")] public string LaunchConfigurationName{ get; set; } /// /// 经过 Base64 编码后的自定义数据,最大长度不超过16KB。如果要清空UserData,则指定其为空字符串 /// [JsonProperty("UserData")] public string UserData{ get; set; } /// /// For internal usage only. DO NOT USE IT. /// internal override void ToMap(Dictionary map, string prefix) { this.SetParamSimple(map, prefix + "LaunchConfigurationId", this.LaunchConfigurationId); this.SetParamSimple(map, prefix + "ImageId", this.ImageId); this.SetParamArraySimple(map, prefix + "InstanceTypes.", this.InstanceTypes); this.SetParamSimple(map, prefix + "InstanceTypesCheckPolicy", this.InstanceTypesCheckPolicy); this.SetParamSimple(map, prefix + "LaunchConfigurationName", this.LaunchConfigurationName); this.SetParamSimple(map, prefix + "UserData", this.UserData); } } }