最近更新时间:2023.11.20 19:42:51
首次发布时间:2023.09.04 15:43:19
调用DescribeInvocations接口,查询批量作业的执行列表和状态。
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeInvocations | 要执行的操作,取值:DescribeInvocations。 |
Version | String | 是 | 2020-04-01 | 接口的版本,取值:2020-04-01。 |
InvocationId | String | 否 | ivk-hz0jdfwd9f**** | 任务执行ID。 |
InvocationName | String | 否 | 批量作业-1 | 任务执行名称,支持模糊搜索。 |
CommandId | String | 否 | cmd-hz0jdfwcsr**** | 命令ID,您可以通过接口DescribeCommands查询获取。 |
CommandName | String | 否 | CommandTestName | 命令名称,支持模糊搜索。 |
CommandType | String | 否 | Shell | 命令类型。取值:
|
RepeatMode | String | 否 | Once | 作业执行的方式。取值:
|
InvocationStatus | String | 否 | Success | 作业状态。由作业指定的所有实例,执行命令的状态决定。取值:
|
PageNumber | Integer | 否 | 1 | 当前页码。
|
PageSize | Integer | 否 | 10 | 分页查询时设置的每页行数。
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
PageSize | Integer | 1 | 每页行数。 |
PageNumber | Integer | 10 | 查询结果的页码。 |
TotalCount | Integer | 17 | 作业总个数。 |
Invocations | Array of Struct | - | 符合条件的作业执行记录信息。具体请参见下表“Invocation 结构”。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
InvocationId | String | ivk-ycicy97x4i5pkgw**** | 作业ID。 |
InvocationName | String | 批量作业-1 | 作业名称。 |
InvocationDescription | String | 升级Agent | 作业描述。 |
CommandId | String | cmd-ybtvqkikdih96**** | 命令ID。 |
CommandName | String | 更换Linux实例登录密码 | 作业触发的命令名称。 |
CommandType | String | Shell | 作业触发的命令类型。 |
InvocationStatus | String | Stopped | 命令执行的总执行状态,总执行状态取决于本次调用的全部实例的共同执行状态。 |
CommandContent | String | IyEvYmluL2Jhc****gdXBkYXRl | Base64编码后的命令内容。 |
Parameters | String | {\"username\":\"root\",\"password\":\"111@123\"} | 命令中的自定义参数。 说明 调用InvokeCommand接口或RunCommand接口,执行命令时传入的参数。 |
Username | String | root | ECS实例中执行命令的用户名称。 |
WorkingDir | String | /home | 命令执行路径。 |
Timeout | Integer | 60 | 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。 |
StartTime | String | 2022-11-10T06:49:59Z | 作业开始时间。 |
EndTime | String | 2022-11-10T06:50:59Z | 作业结束时间。 |
InstanceNumber | Integer | 3 | 执行实例数量。 |
EnableParameter | Boolean | true | 被调用命令是否使用自定义参数。取值:
|
CommandDescription | String | 升级命令。 | 被调用命令的描述。 |
CommandProvider | String | Volcengine | 被调用命令的提供方。 |
ParameterDefinitions | Array of Struct | - | 被调用命令的自定义参数信息,具体请参见下表“ParameterDefinition 结构”。 |
RepeatMode | String | Rate | 命令执行的方式。 |
Frequency | String | 1d | 执行频率。
|
LaunchTime | String | 2022-11-11T06:49:59Z | 执行时间。
|
RecurrenceEndTime | String | 2022-11-21T06:49:59Z | 周期结束时间,RFC3339 格式。 |
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Name | String | 是 | Param | 参数名称。 |
Type | String | 是 | String | 参数类型。取值:
|
Required | String | 是 | true | 是否必填。取值:
|
DefaultValue | - | 否 | - | 自定义参数默认值。 |
MinLength | Integer | 否 | 1 | 自定义参数值(字符串)的最小长度。 |
MaxLength | Integer | 否 | 50 | 自定义参数值(字符串)的最大长度。 |
MinValue | Integer | 否 | 10 | 自定义参数值(数值)的最小值。 |
MaxValue | Integer | 否 | 100 | 自定义参数值(数值)的最大值。 |
DecimalPrecision | Integer | 否 | 2 | 自定义参数值(数值)允许的小数点后位数。 |
GET /?Action=DescribeInvocations&Version=2020-04-01&InvocationId=ivk-2a745b412b4601b8d**** HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: ecs
{ "ResponseMetadata": { "RequestId": "202106111445100102252431000052****", "Action": "DescribeInvocations", "Version": "2020-04-01", "Service": "ecs", "Region": "cn-beijing" }, "Result": { "pageNumber": 1, "pageSize": 10, "totalCount": 17, "invocations": [ { "invocationId": "ivk-2a745b412b4601b8d****", "invocationName": "修改登录密码", "invocationDescription": "", "commandId": "cmd-ybtvqkik****", "commandName": "修改Linux实例密码", "commandType": "Shell", "repeatMode": "Once", "frequency": "", "invocationStatus": "Failed", "commandContent": "IyEvYmluL2Jh****8IGNocGFzc3dk", "parameters": "{\"username\":\"root\",\"password\":\"111@123\"}", "username": "root", "workingDir": "/home", "timeout": 60, "startTime": "2022-11-10T06:49:59Z", "endTime": "2022-11-10T06:50:59Z", "instanceNumber": 3, "enableParameter": true, "commandDescription": "脚本描述", "commandProvider": "Volcengine", "parameterDefinitions": [ { "type": "String", "name": "username", "required": true, "defaultValue": "", "minLength": 1, "maxLength": 100, "minValue": "", "maxValue": "", "decimalPrecision": 0 }, { "type": "String", "name": "password", "required": true, "defaultValue": "", "minLength": 1, "maxLength": 100, "minValue": "", "maxValue": "", "decimalPrecision": 0 } ], "launchTime": "", "recurrenceEndTime": "" } ] } }