最近更新时间:2023.05.11 16:26:02
首次发布时间:2023.05.11 16:17:42
调用 ListApplicationHistory 接口,根据任务实例的 DeploymentId,查询部署的时间、重启次数、状态,以及使用的项目资源情况。
一般是由运维人员(Project_OPS)负责任务启动、停止、下线等运维工作,请确保操作者已添加项目成员并为其关联角色,请参见权限概述。
参数 | 类型 | 是否必填 | 示例值 | 说明 |
---|---|---|---|---|
DeploymentId | string | 是 | 2cd894a3b**dda17a591227 | 任务实例的 DeploymentId,您可以调用 DescribeApplicationInstance 接口,查询任务目标实例的 DeploymentId。 |
NextToken | string | 否 | 0 | 下一页的开始位置,首次查询时默认为 0。 |
MaxResults | int | 否 | 20 | 每次返回的数据量,默认值为 20, 最大值 为 100。 |
StartTimeLeft | string | 否 | 2023-04-18T10:40:42Z | 根据启动时间范围查询时,设置的最早启动时间。格式为 |
StartTimeRight | string | 否 | 2023-04-18T10:43:41Z | 根据启动时间范围查询时,设置的最晚启动时间。格式为 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
NextToken | string | 149245 | 下一页的开始位置。 |
DataList | array | [] | 某次部署的时间、重启次数、状态,以及占用项目资源的情况,详情请参见 DataList 数据结构。 |
DataList 数据结构
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
AppCreateTime | string | 2023-04-18T10:40:42Z | 创建时间。 |
AppStartTime | string | 2023-04-18T10:40:42Z | 开始时间。 |
AppFinishTime | string | 2023-04-18T10:43:41Z | 结束时间。 |
State | string | Finished | 状态。 |
RetryCount | int | 0 | 重试次数。 |
ResourceMeterage | object | - | 使用的 CPU 和内存情况,详情请参见 ResourceMeterage 数据结构。 |
ResourceMeterage 数据结构
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
cpu | string | 261000 | 使用的 CPU 资源(1/1000核 * 秒)。 |
memory | string | 1069056 | 使用的内存资源(MB * 秒)。 |
POST https://open.volcengineapi.com?Action=ListApplicationHistory&Version=2021-06-01 Content-Type: application/json Region: cn-beijing ServiceName: spark { "InstanceId": "164816**2969601" }
{ "ResponseMetadata": { "RequestId": "20230418144719288549DA586871290EAA", "Action": "ListApplicationHistory", "Version": "2021-06-01", "Service": "spark", "Region": "cn-beijing" }, "Result": { "NextToken": "149245", "DataList": [ { "AppCreateTime": "2023-04-18T10:40:42Z", "AppStartTime": "2023-04-18T10:40:42Z", "AppFinishTime": "2023-04-18T10:43:41Z", "State": "Finished", "ResourceMeterage": { "Cpu": "261000", "Memory": "1069056" } } ] } }