Files
g.hnyhua.cn/TencentCloud/Cvm/V20170312/Models/ResetInstanceRequest.cs
2026-02-07 15:48:27 +08:00

80 lines
4.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 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.Cvm.V20170312.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class ResetInstanceRequest : AbstractModel
{
/// <summary>
/// 实例ID。可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) API返回值中的`InstanceId`获取。
/// </summary>
[JsonProperty("InstanceId")]
public string InstanceId{ get; set; }
/// <summary>
/// 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID格式形如`img-xxx`。镜像类型分为四种:<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>
/// <br>默认取值:默认使用当前镜像。
/// </summary>
[JsonProperty("ImageId")]
public string ImageId{ get; set; }
/// <summary>
/// 实例系统盘配置信息。系统盘为云盘的实例可以通过该参数指定重装后的系统盘大小来实现对系统盘的扩容操作,若不指定大小且原系统盘大小小于镜像大小,则会自动扩容,产生多余的磁盘费用。系统盘大小只支持扩容不支持缩容;重装只支持修改系统盘的大小,不能修改系统盘的类型。
/// </summary>
[JsonProperty("SystemDisk")]
public SystemDisk SystemDisk{ get; set; }
/// <summary>
/// 实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。
/// </summary>
[JsonProperty("LoginSettings")]
public LoginSettings LoginSettings{ get; set; }
/// <summary>
/// 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。
/// </summary>
[JsonProperty("EnhancedService")]
public EnhancedService EnhancedService{ get; set; }
/// <summary>
/// 重装系统时,可以指定修改实例的主机名。<br><li>点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用。<br><li>Windows 实例:名字符长度为[2, 15],允许字母(不限制大小写)、数字和短横线(-)组成,不支持点号(.),不能全是数字。<br><li>其他类型Linux 等)实例:字符长度为[2, 60],允许支持多个点号,点之间为一段,每段允许字母(不限制大小写)、数字和短横线(-)组成。
/// </summary>
[JsonProperty("HostName")]
public string HostName{ 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 + "InstanceId", this.InstanceId);
this.SetParamSimple(map, prefix + "ImageId", this.ImageId);
this.SetParamObj(map, prefix + "SystemDisk.", this.SystemDisk);
this.SetParamObj(map, prefix + "LoginSettings.", this.LoginSettings);
this.SetParamObj(map, prefix + "EnhancedService.", this.EnhancedService);
this.SetParamSimple(map, prefix + "HostName", this.HostName);
}
}
}