添加使用者自訂鏡像。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ehpc:AddImage |
create |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ImageType |
string |
否 |
鏡像類型。取值範圍:
|
VM |
| Name |
string |
是 |
鏡像名稱。 |
app-image |
| ImageVersion |
string |
否 |
鏡像版本。 |
V1.0 |
| Description |
string |
否 |
鏡像描述。 |
Test image |
| ContainerImageSpec |
object |
否 |
容器鏡像配置。 |
|
| RegistryUrl |
string |
否 |
容器鏡像訪問連結。 |
registry-vpc.cn-hangzhou.aliyuncs.com/ehpc_open/nginx:latest |
| IsACRRegistry |
boolean |
否 |
是否為阿里雲鏡像倉庫。
|
True |
| IsACREnterprise |
boolean |
否 |
是否為阿里雲鏡像倉庫企業版。
|
True |
| RegistryCriId |
string |
否 |
企業版鏡像倉庫 ID。 |
cri-xyz795ygf8k9**** |
| RegistryCredential |
object |
否 |
私人鏡像倉庫鑒權。 |
|
| Server |
string |
否 |
鏡像倉庫的登入位址。 |
registry-vpc.cn-hangzhou.aliyuncs.com |
| UserName |
string |
否 |
登入使用者名稱。 |
username |
| Password |
string |
否 |
登入密碼。 |
userpassword |
| VMImageSpec |
object |
否 |
虛擬機器鏡像配置。 |
|
| ImageId |
string |
否 |
鏡像 ID。 |
m-bp1akkkr1rkxtb****** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| Success |
boolean |
執行命令並擷取結果的過程是否成功。取值範圍:
|
True |
| ImageId |
string |
鏡像 ID。 |
m-bp1akkkr1rkxtb****** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368\n",
"Success": true,
"ImageId": "m-bp1akkkr1rkxtb******\n"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | 無效的參數:%s |
| 400 | ImageAlreadyExists | The image id already exists. | 鏡像已存在 |
| 400 | InDebt | Your account has overdue payments. | 您的賬戶已欠費 |
| 400 | NotEnabled | You have not enabled this service. | 您的賬戶還未開通此服務 |
| 403 | ImageInUse | Image is still used by jobs. | 鏡像仍在使用中 |
| 404 | ImageNotFound | The specified image does not exist. | 指定的鏡像不存在,請您檢查該參數是否正確。 |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 請求失敗,服務暫時不可用 |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API調用出錯 |
| 406 | AliyunError | An Alibaba Cloud product error occurred. | 阿里雲產品錯誤. %s |
| 406 | DbError | A database error occurred. | 資料庫錯誤 |
| 407 | NotAuthorized | No authorization is granted. | 未授權 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。