Modifies the information of a managed instance.

Usage notes

This operation can be called to modify only the name of a single managed instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyManagedInstance

The operation that you want to perform. Set the value to ModifyManagedInstance.

RegionId String Yes cn-hangzhou

The region ID of the managed instance. Supported regions: China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), China (Hong Kong), Singapore, Japan (Tokyo), US (Silicon Valley), and US (Virginia).

You can call the DescribeRegions operation to query the most recent region list.

InstanceId String Yes mi-hz01nmcf****

The managed instance ID.

InstanceName String Yes testInstanceName

The name of the managed instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with a special character or a digit. It can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:) and cannot start with http:// or https://.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The request ID.

Instance Object

The managed instance.

InstanceName String testInstanceName

The name of the managed instance.

InstanceId String mi-hz01nmcf****

The managed instance ID.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=ModifyManagedInstance
&RegionId=cn-hangzhou
&InstanceId=mi-hz01nmcf****
&InstanceName=testInstanceName
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyManagedInstanceResponse>
    <RequestId>874C6289-9D18-5E1A-8A68-8AC11E6E57B3</RequestId>
    <Instance>
        <InstanceName>testInstanceName</InstanceName>
        <InstanceId>mi-hz01nmcf****</InstanceId>
    </Instance>
</ModifyManagedInstanceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "874C6289-9D18-5E1A-8A68-8AC11E6E57B3",
  "Instance" : {
    "InstanceName" : "testInstanceName",
    "InstanceId" : "mi-hz01nmcf****"
  }
}

Error codes

HttpCode Error code Error message Description
400 RegionId.ApiNotSupported The api is not supported in this region. This operation cannot be performed in the specified region. Check whether the region ID is valid.
400 InstanceName.ExceedLimit The specified instance name exceed limit. The new name specified for the managed instance exceeds the maximum length.
400 InstanceName.InvalidPattern The specified instance name pattern invalid. Invalid InstanceName value.
403 Operation.Forbidden The operation is not permitted. The operation is not supported.
404 InvalidInstance.NotFound The specified instances id does not exist. The specified instance ID is not found.
500 InternalError.Dispatch An error occurred when you dispatched the request. The error message returned because an error occurred when the request was being sent. Try again later.

For a list of error codes, visit the API Error Center.