Skip to main content

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

NameLocationTypeRequiredSample valueDescription
InstanceNameBODYstringNoEcsInstanceinstance 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 (-).
DescriptionBODYstringNoInstanceAttributeinstance description. 2 to 256 English or Chinese characters in length and cannot start with http:// or https. Default value: None.
InstanceIdBODYstringYesi-bp67acfmxazb4ph***instance ID.
UserDataBODYstringNoZWNobyBoZWxsbyBlY3MhInstance 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.
regionIdBODYstringYesNo sample value for this parameter.region id
RecyclableBODYbooleanNofalseWhether the instance can be recycled.
DeletionProtectionBODYbooleanNofalseinstance 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.
versionBODYstringNo2016-01-01version of api
HostNameBODYstringNoLocalHostthe 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 (-).
CreditSpecificationBODYstringNoStandardmodify the operating mode of the burst performance instance. Value range: Standard: standard mode. Unlimited: no performance constraint mode. Default value: None.
PasswordBODYstringNoEcsV****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

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}