ModifyInstanceAttribute
Description
the call ModifyInstanceAttribute modify some information of an ECS instance, including instance password, name, description, host name, security group to which it belongs, and custom data. If it is a burst performance instance, you can also switch the performance burst mode of this instance.
Request Method
POST
Request Path
/apsara/route/Ecs/ModifyInstanceAttribute
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
InstanceName | BODY | string | No | EcsInstance | instance name. The length is 2~128 English or Chinese characters. It must start with a letter or Chinese, and cannot start with http:// or https. It can contain numbers, colons (:), underscores (_), or hyphens (-). |
Description | BODY | string | No | InstanceAttribute | instance description. 2 to 256 English or Chinese characters in length and cannot start with http:// or https. Default value: None. |
InstanceId | BODY | string | Yes | i-bp67acfmxazb4ph*** | instance ID. |
UserData | BODY | string | No | ZWNobyBoZWxsbyBlY3Mh | Instance custom data needs to be encoded in Base64. Before encoding, the original data cannot exceed 16KB. It is recommended not to pass in sensitive information, such as passwords and private keys, in clear text. If sensitive information must be passed in, we recommend that you encrypt it and then use Base64 encoding to decrypt it in the same way inside the instance. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
Recyclable | BODY | boolean | No | false | Whether the instance can be recycled. |
DeletionProtection | BODY | boolean | No | false | instance release protection attribute, specifying whether to release instances through the console or API(DeleteInstance). Default value: None. Description This attribute can only restrict manual release operations and does not take effect for system release operations. |
version | BODY | string | No | 2016-01-01 | version of api |
HostName | BODY | string | No | LocalHost | the host name of the operating system. After modifying the host name, call the RebootInstance for the modification to take effect. Windows Server system: length is 2-15 characters, allowing uppercase and lowercase letters, numbers or hyphens (-). You cannot start or end with a hyphen (-), you cannot use a hyphen (-) continuously, and you cannot use only numbers. Other types of instances (Linux, etc.): The length is 2-64 characters, allowing the use of dots (.) to separate characters into multiple segments, each segment allows the use of uppercase and lowercase letters, numbers, or hyphens (-), but cannot use dots (.) or hyphens (-) continuously. You cannot start or end with a dot (.) or hyphen (-). |
CreditSpecification | BODY | string | No | Standard | modify the operating mode of the burst performance instance. Value range: Standard: standard mode. Unlimited: no performance constraint mode. Default value: None. |
Password | BODY | string | No | EcsV**** | the password of the instance. Supports 8 to 30 characters in length and must contain both uppercase and lowercase letters, numbers, and special symbols. Special symbols can be: ()'~! @#$%^&*-_+=|{}[]:;'<> ;,?//code>/pre> p data-tag = "p" class = "p"> where the Windows instance cannot use the slash (/) as the first character of the password. description if you pass in Password parameter, it is recommended that you use HTTPS protocol to send requests to avoid password disclosure. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}