Querying Image Instances
Function
Queries image instances.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:imageServer:list
List
imageServer *
-
-
-
-
g:EnterpriseProjectId
URI
GET /v1/{project_id}/image-servers
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Unique ID of a project |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | Integer | Query offset. The default value is 0. |
| limit | No | Integer | Number of records to be queried. The value ranges from 1 to 100. The default value is 10. |
| server_name | No | String | Image instance name, which supports partial match. |
| server_id | No | String | Unique ID of the image instance. |
| enterprise_project_id | No | String | Enterprise project ID. (If this parameter is left blank or set to 0, the default enterprise project is used.) |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | No | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| count | Integer | Total. |
| items | Array of ImageServer objects | The maximum number of records in the returned image instance list is the maximum number of records on each page. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Unique instance ID. |
| name | String | Image instance name. |
| description | String | Description. |
| image_ref | ImageRef object | Image source information. |
| server_group_id | String | APS server group ID. |
| app_group_id | String | Application group ID. |
| server_id | String | APS instance ID. |
| instance_id | String | ECS ID. |
| image_id | String | Unique ID of an image product. |
| status | String | Image instance status: |
| authorize_accounts | Array of ImageAccountInfo objects | Grants users the permission to use applications in an application group. |
| create_time | String | Time when an image instance is created. |
| update_time | String | Update time. |
| enterprise_project_id | String | Enterprise project ID. This parameter is required only for enterprise projects. (If this parameter is left empty or set to 0, the default enterprise project is used.) |
| Parameter | Type | Description |
|---|---|---|
| id | String | Unique ID of the image source. |
| image_type | String | Image source type. Options: gold: KooGallery image public: public image private: private image shared: shared image other: other images |
| spce_code | String | Specification code of the image source. This parameter is mandatory when the value of image type is set to gold. |
| product_id | String | Product ID of the image source. This parameter is mandatory when the value of image type is set to gold. |
| Parameter | Type | Description |
|---|---|---|
| account | String | User (group). |
| account_type | String | User type. USER: user USER_GROUP: user group. |
| domain | String | Domain name. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 405
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 503
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Example Requests
GET /v1/a4da8115c9d8464ead3a38309130523f/image-servers?limit=10&offset=0
Example Responses
Status code: 200
Response to a successful request.
{
"count" : 2,
"items" : [ {
"id" : "697612196993040384",
"name" : "test_instance_1",
"description" : "A test of creating an image instance.",
"image_ref" : {
"id" : "da02e5ca-c6ec-4685-8ecb-f116bb5bdd2c",
"image_type" : "gold",
"spce_code" : "90a6e84bb3e822fe54999b6be5bbae1e",
"product_id" : ""
},
"server_group_id" : "dae99966-76c4-4995-adaf-e8e2ab36869a",
"app_group_id" : "",
"server_id" : "",
"instance_id" : "",
"image_id" : "",
"status" : "CREATING",
"authorize_accounts" : [ {
"account" : "user0012",
"account_type" : "USER"
} ],
"create_time" : "2024-05-07T07:54:21.009Z",
"update_time" : "2024-05-07T07:54:22.329Z",
"enterprise_project_id" : "0"
}, {
"id" : "627989489700044800",
"name" : "test_instance_2",
"description" : "",
"image_ref" : {
"id" : "da02e5ca-c6ec-4685-8ecb-f116bb5bdd2c",
"image_type" : "gold",
"spce_code" : "90a6e84bb3e822fe54999b6be5bbae1e",
"product_id" : ""
},
"server_group_id" : "898dda82-4d61-4c3d-bff2-679e61cd34f3",
"app_group_id" : "627991243116249088",
"server_id" : "wksapp-08722b58-6900-4c03-bfc0-99e1a056b8ad",
"instance_id" : "989e6391-43b5-49a7-a684-6c36e7ad714a",
"image_id" : "",
"status" : "ACTIVE",
"authorize_accounts" : [ {
"account" : "user001",
"account_type" : "USER"
} ],
"create_time" : "2023-10-28T04:58:34.058Z",
"update_time" : "2023-10-28T05:05:33.826Z",
"enterprise_project_id" : "0"
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Response to a successful request. |
| 400 | The request cannot be understood by the server due to malformed syntax. |
| 401 | Authentication failed. |
| 403 | Permissions required. |
| 404 | No resources found. |
| 405 | The request method is not allowed. |
| 500 | An internal service error occurred. For details, see the error code description. |
| 503 | Service unavailable. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot