cvm — Cloud Virtual Machine
cvm · 2017-03-12

ResetInstance

POST

Reinstall the operating system on a specified instance.

Wire call

Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /cvm/ResetInstance path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.

curl
curl -sS https://cvm.api3.convergecloud.com/ \
  -H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/cvm/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'Host: cvm.api3.convergecloud.com' \
  -H 'X-TC-Action: ResetInstance' \
  -H 'X-TC-Version: 2017-03-12' \
  -H 'X-TC-Timestamp: <unix-seconds>' \
  -H 'X-TC-Region: luzon' \
  -d '{"InstanceId":"<InstanceId>"}'

Request parameters

FieldTypeRequiredDescription
InstanceIdstringYesInstance ID. To obtain the instance IDs, you can call `DescribeInstances` and look for `InstanceId` in the response.
ImageIdstringNoSpecified effective image ID in the format of `img-xxx`. There are four types of images: Public images Custom images Shared images Marketplace images You can obtain the available image IDs in the following ways: for IDs of `public images`, `custom images`, and `shared images`, log in to the CVM console; for IDs of `marketplace images`, go to Cloud Marketplace. Call the API DescribeImages and lo…
SystemDiskSystemDiskNoConfigurations of the system disk. For an instance whose system disk is a cloud disk, this parameter can be used to expand the system disk by specifying a new capacity after reinstallation. The system disk capacity can only be expanded but not shrunk. Reinstalling the system can only resize rather than changing the type of the system disk.
LoginSettingsLoginSettingsNoLogin settings of the instance. You can use this parameter to set the login method, password, and key of the instance or keep the login settings of the original image. By default, a random password will be generated and sent to you via the Message Center.
EnhancedServiceEnhancedServiceNoEnhanced services. You can specify whether to enable services such as Cloud Security and Cloud Monitor through this parameter. If this parameter is not specified, Cloud Monitor and Cloud Security are enabled for public images by default, but not enabled for custom images and marketplace images by default. Instead, they use services retained in the images.
HostNamestringNoWhen reinstalling a system, you can modify an instance's hostname. 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…
UserDatastringNoUser data provided to the instance. This parameter needs to be encoded in base64 format with the maximum size of 16 KB. For more information on how to get the value of this parameter, see the commands you need to execute on startup for Windows or Linux.

Response

Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.

FieldTypeDescription
RequestIdstringThe unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
Success
{
  "Response": {
    // action-specific fields,
    "RequestId": "…"
  }
}
Error
{
  "Response": {
    "Error": { "Code": "…", "Message": "…" },
    "RequestId": "…"
  }
}

Try it

CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/cvm.
Request bodyvalid JSONPOST cvm.api3.convergecloud.com · ResetInstance