All Products
Search
Document Center

ENS:CreateImage

Last Updated:Mar 12, 2024

Creates an image from an instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringNo

The ID of the instance.

i-5rr1bnyrc4tswr8cq3w6y****
ImageNamestringYes

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

ImageName
DeleteAfterImageUploadstringNo

Specifies whether to automatically release the instance after the image is packaged and uploaded. Only image builders are supported. Default value: false. Valid values:

  • true: The image is released when the instance is released.
  • false: The image is retained when the instance is released.
  • If you leave this parameter empty, the default value is used.
false
SnapshotIdstringNo

The ID of the snapshot.

s-bp67acfmxazb4p****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

8BEF0D72-9901-5D43-B7D3-8B42AC26C516
Codeinteger

The returned service code. 0 indicates that the request was successful.

0
ImageIdstring

The ID of the image.

m-5xxgg

Examples

Sample success responses

JSONformat

{
  "RequestId": "8BEF0D72-9901-5D43-B7D3-8B42AC26C516",
  "Code": 0,
  "ImageId": "m-5xxgg"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterThe input parameters that is mandatory for processing this request is not supplied.-
400NoPermissionPermission denied.-
400CallInterfaceCall Interface Happen Error.An error occurred when you call the operation.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-
400QuotaExceedThe custom image quota has been used up.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-03The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: SnapshotId
    delete Input Parameters: product