All Products
Search
Document Center

Bastionhost:ListTodoOpsTaskApprovals

Last Updated:Jun 29, 2026

Retrieves the list of pending automated O&M approval requests.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID of the bastion host.

Note

You can invoke the DescribeInstances operation to obtain this parameter.

bastionhost-cn-m413tuhlo03

RegionId

string

No

The region ID of the bastion host.

Note

For the mapping between region IDs and region names, see Regions and zones.

cn-hangzhou

Keyword

string

No

The task name or task remarks to query. Fuzzy match is supported.

test

ScheduleType

string

No

The task scheduling type used to filter results. Valid values:

  • FixTime: scheduled execution.

  • CycleInterval: periodic execution.

  • Manual: manually triggered by the user.

Manual

PageNumber

string

No

The page number of the current page in a paging query. Default value: 1.

1

PageSize

string

No

The maximum number of entries per page in a paging query.
The maximum value of the PageSize parameter is 100. The default number of entries per page is 20. If PageSize is left empty, 20 entries are returned by default.

Note

Do not leave PageSize empty.

20

Response elements

Element

Type

Description

Example

object

Schema of Response

Approves

array<object>

The returned data.

object

ApproveId

string

The approval ID of the O&M task.

1

ApplyAt

integer

The time when the request was submitted, in seconds (UNIX timestamp).

1669965908

ClientName

string

The username of the O&M task applicant.

Username

ClientUid

integer

The bastion host user ID of the applicant.

12

Comment

string

The remarks of the O&M task.

Comment

ScheduleType

string

The scheduling type of the task.

  • FixTime: scheduled execution.

  • CycleInterval: periodic execution.

  • Manual: manually triggered by the user.

Manual

TaskId

integer

The ID of the O&M task.

2

Name

string

The name of the O&M task.

task

RequestId

string

The unique request ID generated by Alibaba Cloud for this request.

45717163-334B-5955-8048-A02DAC6B3817

TotalCount

integer

The total number of approval records returned.

6

Examples

Success response

JSON format

{
  "Approves": [
    {
      "ApproveId": "1",
      "ApplyAt": 1669965908,
      "ClientName": "Username",
      "ClientUid": 12,
      "Comment": "Comment",
      "ScheduleType": "Manual",
      "TaskId": 2,
      "Name": "task"
    }
  ],
  "RequestId": "45717163-334B-5955-8048-A02DAC6B3817",
  "TotalCount": 6
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The argument is invalid. The argument is invalid.
500 InternalError An unknown error occurred. An unknown error occurred.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.