All Products
Search
Document Center

Bastionhost:ListProjects

Last Updated:Aug 15, 2026

Queries a list of projects.

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 syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the bastion host instance.

Note

You can call the DescribeInstances operation to obtain this parameter.

bastionhost-cn-st220aw****

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

NextToken

string

No

The token required for the next query in cursor-based pagination.

Note

Leave this parameter empty for the first query. For subsequent requests, set this parameter to the value of NextToken returned in the previous response.

42bc833a0a0002dae0b5e8707e68181f

MaxResults

integer

No

The number of entries to return. Default value: 20. Maximum value: 100.

20

Keyword

string

No

The project name to query. Fuzzy match is supported.

test

Skip

integer

No

The number of entries to skip.

Note

This parameter takes effect only when NextToken is empty.

2

Response elements

Element

Type

Description

Example

object

Schema of Response

TotalCount

integer

The total number of projects returned.

10

NextToken

string

The token for the next query.

4ieSWJCwxvW3dk3wF.BqkrZmP72nWu5zJ5NWydMqyEs****

MaxResults

integer

The value of the MaxResults request parameter if a valid MaxResults parameter was provided. Otherwise, the default value is returned.

20

RequestId

string

The unique request ID generated by Alibaba Cloud.

81500666-d7f5-4143-8329-0223cc738105

Projects

array<object>

The project list.

object

The project information.

ProjectId

integer

The project ID.

3

Name

string

The project name.

Project_name

Description

string

The project description.

comment

IsDefault

boolean

Indicates whether the project is the default project. Valid values:

  • true: Yes.

  • false: No.

false

MemberIds

array

The list of member accounts UIDs associated with the project.

string

The UID of a member accounts associated with the project.

170****9123

HostCount

integer

The total number of hosts in the project.

21

DatabaseCount

integer

The total number of database instances in the project.

1

AppCount

integer

The total number of applications in the project.

0

Examples

Success response

JSON format

{
  "TotalCount": 10,
  "NextToken": "4ieSWJCwxvW3dk3wF.BqkrZmP72nWu5zJ5NWydMqyEs****",
  "MaxResults": 20,
  "RequestId": "81500666-d7f5-4143-8329-0223cc738105",
  "Projects": [
    {
      "ProjectId": 3,
      "Name": "Project_name",
      "Description": "comment",
      "IsDefault": false,
      "MemberIds": [
        "170****9123"
      ],
      "HostCount": 21,
      "DatabaseCount": 1,
      "AppCount": 0
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.