All Products
Document Center

Elastic Compute Service:Set an image family

Last Updated:Jan 29, 2024

An image family is used to classify a group of related images, which can help you better manage and use images. You can set an image family for a custom image when you create a custom image or edit the image attributes. This topic describes how to specify an image family for a custom image.


Set an image family in the ECS console

  1. You can use one of the following methods to set an image family for a custom image.

    You can specify a name to create an image family or select an existing image family.


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

  2. (Optional) View the image families of custom images.

    1. Turn on image.png above the custom image list.

    2. In the Image Families section, click the name of an image family to view images in the image family.


Specify an image family by calling an API operation

In this example, the CreateImage operation is called to specify an image family when a custom image is created.

  1. Log on to the OpenAPI Explorer console.

  2. Call the CreateImage operation to create a custom image and set an image family.

    In this example, a custom image is created from an instance and the image family name is set to hangzhou-image. Take note of the following API request parameters:

    • RegionId: the ID of the region. Example: cn-hangzhou.

    • InstanceId: the ID of the instance. Example: i-bp117mtgmllecpwl****.

    • ImageFamily: the image family name. Example: hangzhou-image.

    After you create a custom image, you can obtain the ID of the custom image.if3

  3. Call the DescribeImages operation to query the image family of the custom image that you create in the previous step.

    Specify the following API request parameters:

    • RegionId: the same region ID as in the previous step.

    • ImageId: the ID of the custom image created in the previous step.

    The following figure shows a sample response. The value of the ImageFamily parameter is hangzhou-image.if4