public class ModifyInstancesAttributeRequest extends AbstractModel
header, skipSign
Constructor and Description |
---|
ModifyInstancesAttributeRequest() |
ModifyInstancesAttributeRequest(ModifyInstancesAttributeRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
Boolean |
getAutoReboot()
Get Whether to automatically restart an instance when modifying a hostname.
|
String |
getCamRoleName()
Get The role bound with the instance.
|
String |
getCamRoleType()
Get The role type, which is used in conjunction with `CamRoleName`.
|
Boolean |
getDisableApiTermination()
Get Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API.
|
String |
getHostName()
Get Modified hostname of an instance.Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section.
|
String[] |
getInstanceIds()
Get Instance ID(s).
|
String |
getInstanceName()
Get The instance name, which can not exceed 60 characters
|
String[] |
getSecurityGroups()
Get IDs of security groups associated with the specified instance.
|
String |
getUserData()
Get User data provided to an instance, which needs to be encoded in Base64 format with a maximum size of 16 KB.
|
void |
setAutoReboot(Boolean AutoReboot)
Set Whether to automatically restart an instance when modifying a hostname.
|
void |
setCamRoleName(String CamRoleName)
Set The role bound with the instance.
|
void |
setCamRoleType(String CamRoleType)
Set The role type, which is used in conjunction with `CamRoleName`.
|
void |
setDisableApiTermination(Boolean DisableApiTermination)
Set Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API.
|
void |
setHostName(String HostName)
Set Modified hostname of an instance.Period (.) and hyphen (-) should not be used as the first or last character of the hostname, and should not be used consecutively.Windows instances: The hostname should contain 2 to 15 characters, including letters (case insensitive), digits, and hyphens (-), does not support periods (.), and should not be all digits.Instances of other types (such as Linux instances): The hostname should contain 2 to 60 characters, including multiple periods (.), with each segment between periods considered as one section.
|
void |
setInstanceIds(String[] InstanceIds)
Set Instance ID(s).
|
void |
setInstanceName(String InstanceName)
Set The instance name, which can not exceed 60 characters
|
void |
setSecurityGroups(String[] SecurityGroups)
Set IDs of security groups associated with the specified instance.
|
void |
setUserData(String UserData)
Set User data provided to an instance, which needs to be encoded in Base64 format with a maximum size of 16 KB.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public ModifyInstancesAttributeRequest()
public ModifyInstancesAttributeRequest(ModifyInstancesAttributeRequest source)
public String[] getInstanceIds()
public void setInstanceIds(String[] InstanceIds)
InstanceIds
- Instance ID(s). To obtain the instance IDs, you can call [`DescribeInstances`](https://intl.cloud.tencent.com/document/api/213/15728?from_cn_redirect=1) and look for `InstanceId` in the response. The maximum number of instances in each request is 100.public String getInstanceName()
public void setInstanceName(String InstanceName)
InstanceName
- The instance name, which can not exceed 60 characters
public String getUserData()
public void setUserData(String UserData)
UserData
- User data provided to an instance, which needs to be encoded in Base64 format with a maximum size of 16 KB. For details on obtaining this parameter, refer to the startup commands for [Windows](https://intl.cloud.tencent.com/document/product/213/17526?from_cn_redirect=1) and [Linux](https://intl.cloud.tencent.com/document/product/213/17525?from_cn_redirect=1).public String[] getSecurityGroups()
public void setSecurityGroups(String[] SecurityGroups)
SecurityGroups
- IDs of security groups associated with the specified instance. You can associate with a security group by adding its ID, or cancel the association with a security group by removing its ID. public String getCamRoleName()
public void setCamRoleName(String CamRoleName)
CamRoleName
- The role bound with the instance. If it is not specified, it indicates to unbind the current role of the CVM.public String getHostName()
public void setHostName(String HostName)
HostName
- Modified hostname of an instance.public Boolean getDisableApiTermination()
public void setDisableApiTermination(Boolean DisableApiTermination)
DisableApiTermination
- Instance termination protection flag, indicating whether an instance is allowed to be deleted through an API. Valid values:public String getCamRoleType()
public void setCamRoleType(String CamRoleType)
CamRoleType
- The role type, which is used in conjunction with `CamRoleName`. The value is obtained in `RoleType` field, returning by `CAM DescribeRoleList` and `GetRole` APIs. Valid value: `user`, `system` and `service_linked`.
For example, when `LinkedRoleIn` is contained in `CamRoleName` (such as `TKE_QCSLinkedRoleInPrometheusService`), the returned `RoleType` of `DescribeRoleList` and `GetRoleis` is `service_linked`, and the `CamRoleType` `service_linked`.
When the value obtained in `RoleType` is `user` (default) or `system`, `CamRoleType` can be left empty.public Boolean getAutoReboot()
public void setAutoReboot(Boolean AutoReboot)
AutoReboot
- Whether to automatically restart an instance when modifying a hostname. If not specified, the instance will automatically restart by default.
- true: Modify the hostname and automatically restart the instance.
- false: Modify the hostname without automatically restarting the instance. A manual restart is required for the new hostname to take effect.
Note: This parameter is valid only when a hostname is modified.Copyright © 2025. All rights reserved.