Obtaining a Target Image ID¶
Function¶
This API is used to obtain the ID of an image that can be upgraded in the current cluster.
Calling Method¶
For details, see Calling APIs.
URI¶
GET /v1.0/{project_id}/clusters/{cluster_id}/target/{upgrade_type}/images
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details about how to obtain a project ID, see Obtaining a Project ID and Name. |
cluster_id | Yes | String | ID of the cluster to be upgraded. |
upgrade_type | Yes | String | Version type. The value can be:
|
Request Parameters¶
None
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
needUploadUpgradePlugin | Boolean | Indicates whether to upload the plug-in of the target version. |
imageInfoList | Array of GetTargetImageIdDetail objects | Image details. |
Parameter | Type | Description |
---|---|---|
id | String | ID of an image that can be upgraded. |
displayName | String | Name of an image that can be upgraded. |
imageDesc | String | Image description. |
datastoreType | String | Image engine type. |
datastoreVersion | String | Image engine version. |
priority | Integer | Priority |
Request Example¶
GET /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters/ea244205-d641-45d9-9dcb-ab2236bcd07e/target/cross/images
{
"needUploadUpgradePlugin" : false,
"imageInfoList" : [ ]
}
Response Example¶
Status code: 200
The request is processed.
{
"needUploadUpgradePlugin" : false,
"imageInfoList" : [ ]
}
Status Codes¶
Status Code | Description |
---|---|
200 | The request is processed. |
400 | Invalid request. Modify the request directly and do not attempt to retry it. |
403 | The request is rejected. The server has received and understood the request, but refused to respond to it. Modify the request directly and do not attempt to retry it. |
Error Codes¶
For details, see Error Code.