GetImageById

Updated at:

Queries the image details, adapted applications, and region distribution information based on the image ID or version ID.

Operation description

You must specify at least one of ImageId and VersionId. If only ImageId is specified, the online version is queried. If VersionId is specified, the specified version is queried. If both parameters are specified, VersionId must belong to the specified image. To query the effective version in each region, call GetEffectiveImageById.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

appstreaming:GetImageById

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ImageId

string

No

The image ID. You must specify at least one of ImageId and VersionId. If only this parameter is specified, the online version is queried.

imgc-bp1example****

VersionId

string

No

The image version ID. You can specify this parameter alone to query a specific version. If both ImageId and VersionId are specified, the version must belong to the specified image.

iv-xxx

BizRegionId

string

No

The ID of the business region to query. If this parameter is not specified, regions are not filtered by this parameter. The returned regions are still subject to the visibility scope of the product and the account.

cn-hangzhou

IgnoreFilter

boolean

No

Specifies whether to skip the operating system and adaptation status filtering for adapted applications. Default value: false. A value of false indicates that only applications whose operating system matches the image and whose adaptation is complete are retained. A value of true indicates that these two filters are skipped. Application type filtering is still controlled by the API and ShowHidden.

ShowHidden

string

No

The types of virtual applications to include in addition to the default user applications and system applications. Valid values:

  • VIRTUAL_DESKTOP_APP: desktop virtual applications.

  • ALL_VIRTUAL_APP: all virtual applications.

VIRTUAL_DESKTOP_APP

ProductType

string

No

The product type, such as CloudDesktop (Cloud Desktop), CloudApp (Cloud App), or WuyingServer (WUYING Workspace Enterprise Edition workstation).

CloudDesktop

Response elements

Element

Type

Description

Example

object

The API call result.

Data

object

The image information returned by the query.

ImageExtendInfoModel

object

The image extended information, which includes cloud disk specifications and GPU driver information. For VHD or container images, the extended information of the base image and base version is used.

GmtCreate

string

The creation time.

2025-04-25 15:13:57

GmtModified

string

The last update time.

2025-04-25 15:13:57

AliUid

integer

The ID of the Alibaba Cloud account to which the image belongs. The account ID for system images is 0.

123456789

ImageId

string

The image ID.

imgc-xxxx

VersionId

string

The image version ID.

iv-xxx

PackageType

string

The image package type. Valid values:

  • Ecs: ECS image

  • Vhd: Virtual disk image

  • Container: Container image

  • Ecs_Container: ECS and container composite image

  • K8s_Node: Kubernetes node image

ECS

GpuCategory

integer

The GPU category.

1

GpuDriverVersion

string

The GPU driver version.

12

SystemDiskSize

integer

The size of the system cloud disk. Unit: GiB.

40

DataDiskSize

integer

The size of the data cloud disk. Unit: GiB.

100

ImageRegionDistributeList

array<object>

The list of region distribution information for the image version.

object

The list of region distribution information for the image version.

GmtCreate

string

The creation time.

2025-04-25 15:13:57

GmtModified

string

The last update time.

2025-04-25 15:13:57

AliUid

integer

The ID of the Alibaba Cloud account to which the image belongs. The account ID for system images is 0.

123456789

ImageId

string

The image ID.

imgc-xxxx

RegionId

string

The ID of the region where the image is distributed.

cn-hangzhou

Status

string

The region distribution status. Valid values:

  • CREATING: Distributing

  • AVAILABLE: Available

  • CREATE_FAILED: Distribution failed

  • DELETE: Deleted

AVAILABLE

VersionId

string

The image version ID.

iv-xxx

EcsImageId

string

The ID of the ECS image corresponding to the region.

m-bp1example****

UnitImageId

string

The logical ID of the image on the unit side, which can be different from the central image ID.

m-1bdedef****

Progress

string

The distribution progress of the image in the region, expressed as a percentage.

100

Message

string

The processing message reported by the region distribution task.

success

ImageRegionList

array

The list of region IDs supported by the image.

string

The region ID supported by the image.

cn-hangzhou

PropertyMap

object

The extended properties of the image version in key-value pairs.

{}

string

The extended property value. For example, the value of a cloud disk encryption-related property can be a KMS key ID.

a7b3c0c8-xxxx

AdaptorInfoBOList

array<object>

The list of adapted applications for the image version.

object

GmtCreate

string

The creation time.

2025-04-25 15:13:57

GmtModified

string

The last update time.

2025-04-25 15:13:57

AliUid

integer

The ID of the Alibaba Cloud account to which the application belongs.

123456789

AdaptorId

string

The adaptor ID.

adt-13ff3****

AppId

string

The application ID.

app-0aae4rgle910jh689

AppVersionId

string

The application version ID.

apv-****

AppName

string

The application name.

idb-ent-console

AppScript

string

The application script.

{"param":"test", "startCmd":"test.exe"}

AppIconUrl

string

The application icon.

https://****.jpg

AppThemeColor

string

The theme color.

#FFFFFF

AppVersionName

string

The version name.

1.0

AppVersionNumber

string

The version number.

1.0.0

FileName

string

The file name.

filename_install.exe

FilePath

string

The file path.

/tenant/123

FileSize

integer

The file size.

102400

BucketName

string

The name of the OSS bucket where the application file is stored.

appstream-example

RuntimeEnv

string

The runtime environment.

WINDOWS_MULTI_SESSION

AppType

string

The application type.

USER_APP

OriginAppType

string

The original application type.

CLIENT_BASE

SubAppType

string

The sub-application type.

SAAS

OsType

string

The operating system type applicable to the application.

Windows

BizType

integer

The number of the business line to which the application belongs.

1

ProductType

string

The product type to which the application belongs.

CloudDesktop

AdaptorMessage

string

The adaptor message.

success

AdaptorStep

string

The execution step.

FINISH_ADAPT

AdaptorMode

string

The execution mode.

MANUAL

Status

string

The application adaptation status. For example, ADAPT_DONE indicates that the adaptation is complete.

ADAPT_DONE

Extend

string

The extension information of the adapted application.

{}

Aid

integer

The numeric ID of the application.

12345

DiskId

string

The ID of the disk where the application file is stored.

d-bp1example****

CategoryType

integer

The level-1 category of the application.

1

CategoryId

integer

The level-2 category of the application.

123

ExecuteFileAddress

string

The path of the executable file after the cloud application is installed.

abc.text

SilenceParam

string

The installation parameters that can be configured by tenants and administrators.

{}

ControlParam

string

The control parameters that can be configured by tenants and administrators.

{}

SilenceFlag

string

Specifies whether to skip installation. This parameter can be configured by tenants and administrators.

{}

OptimizeParam

string

The optimization parameters that can be configured by administrators in the backend.

{}

BucketName

string

The name of the OSS bucket where the image file is stored.

appstream-example

ImageSource

string

The source of the image. For example, center indicates the central image service.

center

GmtCreate

string

The creation time.

2025-04-25 15:13:57

GmtModified

string

The last update time.

2025-04-25 15:13:57

AliUid

integer

The ID of the Alibaba Cloud account to which the image belongs. The account ID for system images is 0.

123456789

ImageId

string

The image ID.

imgc-xxxx

ImageName

string

The name of the image.

DemoImage

ImageType

string

The image type. Valid values:

  • System: system image

  • User: custom image

  • Shared: shared image

  • Community: community image

User

PackageType

string

The image package type. Valid values:

  • Ecs: ECS image

  • Vhd: Virtual disk image

  • Container: Container image

  • Ecs_Container: ECS and container composite image

  • K8s_Node: Kubernetes node image

ECS

Description

string

The description of the image.

Description

OsType

string

The operating system type of the image. Valid values:

  • Windows: Windows system

  • Linux: Linux system

  • Android: Android system

  • Unknown: unknown system

Windows

ProtocolType

string

The connection protocol used by the image. Valid values:

  • ASP: Alibaba Cloud Streaming Protocol

  • HDX: HDX protocol

ASP

BizType

integer

The business line to which the image belongs. Valid values:

  • 1: basic business

  • 2: personal edition

  • 3: cloud office

  • 4: cloud streaming

  • 10: standard edition

1

ProductType

string

The product type to which the image belongs, such as CloudDesktop (Cloud Desktop), CloudApp (cloud application), and WuyingServer (WUYING Workspace Enterprise Edition workstation).

CloudApp

VersionId

string

The image version ID.

iv-xxx

OnlineVersionId

string

The ID of the current online version of the image.

iv-xxxx

LatestVersionId

string

The ID of the latest image version.

iv-xxx

Status

string

The image status. Valid values:

  • INIT: Initial.

  • CREATING: Creating.

  • AVAILABLE: Available.

  • CREATE_FAILED: Creation failed.

  • DELETE: Deleted.

INIT

ParentImageId

string

The ID of the parent image, which indicates the image inheritance relationship. System images do not have parent images.

imgc-xxx

ParentImageVersion

string

The parent image version ID.

iv-xxx

BaseImageId

string

The ID of the base image.

imgc-xxx

BaseImageVersion

string

The base image version ID.

iv-xxx

FotaVersion

string

The FOTA version.

2.3.0-xxx

Language

string

The image language. If the packaging type is VHD or Container, this property is inherited from the image with the ECS packaging type in the same image combination.

zh-CN

Platform

integer

The operating system platform ID. For example, 33 indicates Windows Server 2022.

33

OnlineVersion

boolean

Indicates whether the returned version is the online version. Valid values:

  • true: Yes.

  • false: No.

FeatureList

array

The list of feature tags supported by the image.

string

The image feature tag. For example, Builder indicates the builder feature.

Builder

ImageCreateMode

string

The image creation method. For example, BUILDER_MANUAL indicates manual creation.

BUILDER_MANUAL

PlatformName

string

The name of the operating system platform, which corresponds to Platform.

Windows Server 2022

Success

boolean

Indicates whether the API call is successful. Valid values:

  • true: Successful.

  • false: Failed.

Code

string

The response code. 200 indicates success. If the call fails, the corresponding error code is returned.

200

Message

string

The message returned by the API.

success

RequestId

string

The request ID, which is used to locate and troubleshoot the request.

8737D130-BFD0-5D51-96F6-C08EB1139A25

Examples

Success response

JSON format

{
  "Data": {
    "ImageExtendInfoModel": {
      "GmtCreate": "2025-04-25 15:13:57",
      "GmtModified": "2025-04-25 15:13:57",
      "AliUid": 123456789,
      "ImageId": "imgc-xxxx",
      "VersionId": "iv-xxx",
      "PackageType": "ECS",
      "GpuCategory": 1,
      "GpuDriverVersion": "12",
      "SystemDiskSize": 40,
      "DataDiskSize": 100
    },
    "ImageRegionDistributeList": [
      {
        "GmtCreate": "2025-04-25 15:13:57",
        "GmtModified": "2025-04-25 15:13:57",
        "AliUid": 123456789,
        "ImageId": "imgc-xxxx",
        "RegionId": "cn-hangzhou",
        "Status": "AVAILABLE",
        "VersionId": "iv-xxx",
        "EcsImageId": "m-bp1example****",
        "UnitImageId": "m-1bdedef****",
        "Progress": "100",
        "Message": "success"
      }
    ],
    "ImageRegionList": [
      "cn-hangzhou"
    ],
    "PropertyMap": {
      "key": "a7b3c0c8-xxxx"
    },
    "AdaptorInfoBOList": [
      {
        "GmtCreate": "2025-04-25 15:13:57",
        "GmtModified": "2025-04-25 15:13:57",
        "AliUid": 123456789,
        "AdaptorId": "adt-13ff3****",
        "AppId": "app-0aae4rgle910jh689",
        "AppVersionId": "apv-****",
        "AppName": "idb-ent-console",
        "AppScript": "{\"param\":\"test\", \"startCmd\":\"test.exe\"}",
        "AppIconUrl": "https://****.jpg",
        "AppThemeColor": "#FFFFFF",
        "AppVersionName": "1.0",
        "AppVersionNumber": "1.0.0",
        "FileName": "filename_install.exe",
        "FilePath": "/tenant/123",
        "FileSize": 102400,
        "BucketName": "appstream-example",
        "RuntimeEnv": "WINDOWS_MULTI_SESSION",
        "AppType": "USER_APP",
        "OriginAppType": "CLIENT_BASE",
        "SubAppType": "SAAS",
        "OsType": "Windows",
        "BizType": 1,
        "ProductType": "CloudDesktop",
        "AdaptorMessage": "success",
        "AdaptorStep": "FINISH_ADAPT",
        "AdaptorMode": "MANUAL",
        "Status": "ADAPT_DONE",
        "Extend": "{}",
        "Aid": 12345,
        "DiskId": "d-bp1example****",
        "CategoryType": 1,
        "CategoryId": 123,
        "ExecuteFileAddress": "abc.text",
        "SilenceParam": "{}",
        "ControlParam": "{}",
        "SilenceFlag": " {}",
        "OptimizeParam": "{}"
      }
    ],
    "BucketName": "appstream-example",
    "ImageSource": "center",
    "GmtCreate": "2025-04-25 15:13:57",
    "GmtModified": "2025-04-25 15:13:57",
    "AliUid": 123456789,
    "ImageId": "imgc-xxxx",
    "ImageName": "DemoImage",
    "ImageType": "User",
    "PackageType": "ECS",
    "Description": "Description",
    "OsType": "Windows",
    "ProtocolType": "ASP",
    "BizType": 1,
    "ProductType": "CloudApp",
    "VersionId": "iv-xxx",
    "OnlineVersionId": "iv-xxxx",
    "LatestVersionId": "iv-xxx",
    "Status": "INIT",
    "ParentImageId": "imgc-xxx",
    "ParentImageVersion": "iv-xxx",
    "BaseImageId": "imgc-xxx",
    "BaseImageVersion": "iv-xxx",
    "FotaVersion": "2.3.0-xxx",
    "Language": "zh-CN",
    "Platform": 33,
    "OnlineVersion": false,
    "FeatureList": [
      "Builder"
    ],
    "ImageCreateMode": "BUILDER_MANUAL",
    "PlatformName": "Windows Server 2022"
  },
  "Success": false,
  "Code": "200",
  "Message": "success",
  "RequestId": "8737D130-BFD0-5D51-96F6-C08EB1139A25"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InternalError Internal error. An internal error occurred.
400 Image.NotExist The image does not exist. The image does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.