CreateImage
Last updated
Last updated
This API is used to create a custom image.
Note
Up to 5 images can be created in each zone. If you need more, please contact Zenlayer Support.
The system disk of an instance will be mirrored while creating an image. Please ensure the instance is shut down. Any operations on the instances are not allowed while creating.
The image size is the same as that of instance system disk.
Images are not supported in SIN-E
and LAX-A
for now.
The following request parameter list only provides API request parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Parameter Name | Type | Description |
---|---|---|
Create an image.
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
HTTP Status Code | Error Code | Description |
---|---|---|
instanceId
Yes
String
ID of instance to be mirrored.
imageName
Yes
String
Image name to be displayed.
This parameter must contain up to 24 characters. Only Chinese characters, letters, numbers, - and _ are supported.
imageDescription
No
String
Image description. This parameter must contain up to 255 characters.
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
imageId
String
Image ID.
404
INVALID_INSTANCE_NOT_FOUND
Instance does not exist.
400
UNSUPPORTED_OPERATION_INSTANCE_STATE_STARTING
Shut down the instance before creating an image.
400
LIMIT_EXCEEDED_IMAGE_QUOTA
Quantity of images exceeds the upper limit.
400
UNSUPPORTED_OPERATION_ZONE_NOT_SUPPORT
Operations not supported in current zone.
400
UNSUPPORTED_OPERATION_DISK_UNAVAILABLE
Operations on the image with current status are not supported.
400
UNSUPPORTED_OPERATION_DISK_MAKING_IMAGE
System disk of the instance is being mirrored.