Updated on 2026-04-15 GMT+08:00

Querying Available Resources

Function

This API is used to query available resources.

Debugging

You can debug this API in API Explorer.

Authorization Information

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    bms:serverAvailableResource:get

    read

    -

    -

    -

    -

URI

GET /v1/{project_id}/baremetalservers/available_resource

Table 1 lists the parameters.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

availability_zone

Yes

Specifies the AZ.

Request

None

Response

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

available_resource

Array of objects

Specifies available resources. For details, see Table 3.

Table 3 available_resource parameters

Parameter

Type

Description

availability_zone

String

Specifies the AZ.

flavors

Array of objects

Specifies the flavors. For details, see Table 4.

Table 4 flavors parameters

Parameter

Type

Description

flavor_id

String

Specifies the flavor ID.

count

Integer

Specifies the quantity.

status

String

Specifies the status.

Example Request

GET https://{endpoint}/v1/{project_id}/baremetalservers/available_resource

Example Response

{
	"available_resource": [{
		"availability_zone": "cn-southwest-242a",
		"flavors": [{
			"flavor_id": "s3.small.1",
			"count": 1,
			"status": ""
		}]
	}]
}

Returned Values

See Status Codes.

Error Codes

See Error Codes.