获取边缘容器应用的版本信息,通过版本信息选择某个版本进行发布。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
esa:GetEdgeContainerAppVersion |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| AppId |
string |
是 |
应用 ID,可使用 ListEdgeContainerApps 接口获取应用 ID。 |
app-88068867578379**** |
| VersionId |
string |
是 |
版本 ID,可使用 ListEdgeContainerAppVersions 接口获取版本 ID。 |
ver-87962637161651**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| Version |
object |
版本信息。 |
|
| LastPublishTime |
string |
版本上次发布时间,日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2023-07-25T04:58:05Z |
| PublishTime |
string |
发布时间,日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2022-11-14T02:04:03Z |
| Status |
string |
当前版本的状态。取值:
|
created |
| CreateTime |
string |
版本创建时间,日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2022-07-01T09:32:33Z |
| AppId |
string |
应用 ID。 |
app-88068867578379**** |
| VersionId |
string |
返回创建的版本的 ID。 |
ver-87962637161651**** |
| Name |
string |
版本名称。 |
test |
| UpdateTime |
string |
版本的上次修改时间。日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2021-12-03T10:52:52Z |
| Remarks |
string |
备注信息。 |
aaa |
| Containers |
array<object> |
该版本要部署的镜像列表。 |
|
|
array<object> |
描述单个容器具体信息的对象。 |
||
| EnvVariables |
string |
环境变量 |
ENV=prod |
| Args |
string |
启动参数。 |
-c /path/config.toml |
| Spec |
string |
规格 |
1C2G |
| Storage |
string |
容器存储规格。 |
0.5G, 标识存储空间,取值范围(0.5G | 10G | 20G | 30G) |
| IsACRImage |
boolean |
是否为 ACR 镜像。 |
false |
| ACRImageInfo |
object |
ACR 镜像信息。 |
|
| Domain |
string |
ACR 镜像域名。 |
*.mooc.seewo.com |
| InstanceId |
string |
ACR 站点实例 ID。 |
xcdn-9ak2thl14z5s |
| RegionId |
string |
区域 ID。 |
cn-hangzhou |
| RepoId |
string |
镜像仓库 ID。 |
crr-zeu0xyk28alyxozh |
| RepoName |
string |
镜像仓库的名称。 |
test_1 |
| RepoNamespace |
string |
镜像仓库的命名空间。 |
wpy1 |
| Tag |
string |
标签值。 |
test-healthy-100-soa-1710987653 |
| TagUrl |
string |
ACR 镜像标签地址。 |
registry-vpc.cn-shenzhen.aliyuncs.com/lihetech/easywits_server_exam:3.40.2 |
| IsEnterpriseRegistry |
boolean |
是否为企业级镜像。 |
false |
| Image |
string |
镜像地址 |
nginx:1.14.0 |
| Command |
string |
容器启动命令。 |
sh abc.sh 1 2 3 |
| ProbeType |
string |
探针类型。 |
httpGet |
| Name |
string |
版本名称。 |
version01 |
| PreStop |
string |
容器停止前执行命令。 |
sh prestop.sh "echo hello world" |
| PostStart |
string |
容器启动前执行命令。 |
sh poststart.sh "echo hello world" |
| ProbeContent |
object |
探针内容。 |
|
| SuccessThreshold |
integer |
健康检查连续成功次数。 |
1 |
| Host |
string |
健康检查的域名。 |
test.com |
| HttpHeaders |
string |
HTTP 请求头。 |
[{\"Content-Type\":\"application/json |
| Scheme |
string |
健康检查的请求协议。 |
http |
| InitialDelaySeconds |
integer |
容器探针初始化延迟时间。 |
20 |
| Command |
string |
探针运行命令。 |
sh test.sh |
| FailureThreshold |
integer |
容器健康检查连续失败次数。 |
3 |
| TimeoutSeconds |
integer |
容器健康检查的超时时间。 |
5 |
| Path |
string |
容器健康检查的路径。 |
/health_check |
| Port |
integer |
后端服务器使用的端口。取值范围:1~65535。 |
80 |
| PeriodSeconds |
integer |
容器健康检查的间隔时间。 |
5 |
示例
正常返回示例
JSON格式
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"Version": {
"LastPublishTime": "2023-07-25T04:58:05Z",
"PublishTime": "2022-11-14T02:04:03Z",
"Status": "created",
"CreateTime": "2022-07-01T09:32:33Z",
"AppId": "app-88068867578379****",
"VersionId": "ver-87962637161651****",
"Name": "test",
"UpdateTime": "2021-12-03T10:52:52Z",
"Remarks": "aaa",
"Containers": [
{
"EnvVariables": "ENV=prod",
"Args": "-c /path/config.toml",
"Spec": "1C2G",
"Storage": "0.5G, 标识存储空间,取值范围(0.5G | 10G | 20G | 30G)",
"IsACRImage": false,
"ACRImageInfo": {
"Domain": "*.mooc.seewo.com",
"InstanceId": "xcdn-9ak2thl14z5s",
"RegionId": "cn-hangzhou",
"RepoId": "crr-zeu0xyk28alyxozh",
"RepoName": "test_1",
"RepoNamespace": "wpy1",
"Tag": "test-healthy-100-soa-1710987653",
"TagUrl": "registry-vpc.cn-shenzhen.aliyuncs.com/lihetech/easywits_server_exam:3.40.2",
"IsEnterpriseRegistry": false
},
"Image": "nginx:1.14.0",
"Command": "sh abc.sh 1 2 3",
"ProbeType": "httpGet",
"Name": "version01",
"PreStop": "sh prestop.sh \"echo hello world\" ",
"PostStart": "sh poststart.sh \"echo hello world\" ",
"ProbeContent": {
"SuccessThreshold": 1,
"Host": "test.com",
"HttpHeaders": "[{\\\"Content-Type\\\":\\\"application/json",
"Scheme": "http",
"InitialDelaySeconds": 20,
"Command": "sh test.sh",
"FailureThreshold": 3,
"TimeoutSeconds": 5,
"Path": "/health_check",
"Port": 80,
"PeriodSeconds": 5
}
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | 输入参数规范校验失败。 |
| 400 | InvalidParameter.appid | The format of the application ID is invalid. You can call ListEdgeContainerApps to obtain the application ID. | 传入的应用ID格式不正确,可使用ListEdgeContainerApps接口获取应用ID。 |
| 400 | InvalidVersion.NotFound | The version does not exist. | 这个版本号不存在。 |
| 400 | InvalidParameter.VersionId | The specified VersionId is invalid. Please check the VersionId parameter. You may not have entered the parameter or the parameter does not start with ver-string. Please modify it and call the interface again. | VersionId参数无效。请检查VersionId参数,你有可能未输入该参数或者,参数并未以ver-字符串开头,请进行修改后,重新调用接口。 |
| 500 | InternalError | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
| 404 | InvalidApp.NotFound | The application does not exist. Check whether the application ID you specified is correct and try again. | 您传入的应用ID对应的应用不存在,请检查后重试。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。