Coding

huawei-cloud-bms-list

Try it

Query the list of Huawei Cloud BMS (Bare Metal Server) instances under the current tenant / project, focused on the BMS NAME list. Returns each server's name, id and status; can also output a pure BMS name-only list. Supports filtering by status, name and pagination (limit/offset). Uses the KooCLI command `hcloud BMS ListBareMetalServers --cli-region={region}` (primary) against the v1 API, or the huaweicloudsdkbms Python SDK (fallback). Read-only — never creates, modifies or deletes any bare metal server. Use this skill whenever the user wants to list/inspect the BMS instances of the tenant or query the BMS name list, e.g. for BMS inventory, daily inspection, or cost review. Triggers include: "list BMS", "BMS list", "query BMS names", "BMS name list", "裸金属服务器列表", "查询裸金属服务器", "BMS名称列表", "裸金属服务器名称", "list bare metal servers", "how many BMS".

What it does

Query the list of Huawei Cloud BMS (Bare Metal Server) instances under the current tenant / project, focused on the BMS NAME list. Returns each server's name, id and status; can also output a pure BMS name-only list. Supports filtering by status, name and pagination (limit/offset). Uses the KooCLI command `hcloud BMS ListBareMetalServers --cli-region={region}` (primary) against the v1 API, or the huaweicloudsdkbms Python SDK (fallback). Read-only — never creates, modifies or deletes any bare metal server. Use this skill whenever the user wants to list/inspect the BMS instances of the tenant or query the BMS name list, e.g. for BMS inventory, daily inspection, or cost review. Triggers include: "list BMS", "BMS list", "query BMS names", "BMS name list", "裸金属服务器列表", "查询裸金属服务器", "BMS名称列表", "裸金属服务器名称", "list bare metal servers", "how many BMS".

The skill document

Huawei Cloud BMS List Skill

Overview

This skill queries the list of BMS (Bare Metal Server) instances under the current Huawei Cloud tenant / project and returns their key attributes — in particular the BMS name list (name), along with id and status. It is a read-only inspection skill: it never creates, modifies, or deletes servers, volumes, NICs, or any related resources.

Architecture:

Agent → hcloud CLI (KooCLI, BMS ListBareMetalServers, primary) → Huawei Cloud BMS v1 API
       ↘ huaweicloudsdkbms Python SDK (fallback)                ↗

API path (verified from huaweicloudsdkbms v1 SDK _list_bare_metal_servers_http_info):

OperationMethodAPI Path
List bare metal serversGET/v1/{project_id}/baremetalservers/detail

Applicable Scenarios:

  • BMS inventory: "list all BMS instances of this tenant" or "show me the BMS name list"
  • Daily inspection: snapshot of all bare metal servers with their status
  • Cost review: enumerate servers to spot unused or oversized resources
  • Fast lookup: retrieve the exact BMS name(s) for follow-up operations

能力边界(Capability Boundary): 本 Skill 仅查询 BMS(裸金属服务器)列表。不创建/删除/修改裸金属服务器, 也不查询/操作单台服务器的详情(show-by-id)、网卡、磁盘、密码等其它资源。 若用户询问"创建/删除/重启裸金属服务器"、"查询单台服务器详情"、"挂载磁盘"等, 请明确告知本 Skill 不提供该能力。

Prerequisites

  1. hcloud CLI (KooCLI) installed and authenticated — See references/cli-installation-guide.md
  2. Python 3.8+ with huaweicloudsdkbms package installed (SDK fallback only)
  3. IAM permissionsbms:servers:list (or the system policy BMS ReadOnlyAccess) is required to list bare metal servers. See references/iam-policies.md
  4. A region where the tenant owns BMS instances; specify it with --cli-region

Workflow

  1. Identify the intent — Confirm the user wants to list BMS instances (and optionally the filters: status, name, or name-only output).
  2. Confirm region — Default cn-north-4; let the user override with another region if needed.
  3. Run the query — Use the CLI command below with the requested filters.
  4. Present the results — Show the server name, id and status for each BMS; on a name-list request, output just the names.
  5. Handle errors — If the CLI fails (credentials/permissions/network), retry with the SDK fallback described in references/verification-method.md.

Core Commands

KooCLI format: hcloud --cli-region= [--key=value]

List all BMS instances (names, ids, status)

hcloud BMS ListBareMetalServers --cli-region={region} --cli-output=json

List only the BMS names

hcloud BMS ListBareMetalServers --cli-region={region} --cli-output=json | jq -r '.servers[].name'

Compact fields: name, id, status

hcloud BMS ListBareMetalServers --cli-region={region} --cli-output=json \
  | jq -r '.servers[] | [.name, .id, .status] | @tsv'

Filter by BMS status

hcloud BMS ListBareMetalServers --cli-region={region} --status=ACTIVE --cli-output=json

Status enum: ACTIVE, BUILD, ERROR, HARD_REBOOT, REBOOT, REBUILD, SHUTOFF.

Note: Invalid status values are silently ignored by the BMS API — the request still returns HTTP 200 with an unfiltered server list. Always use the exact enum values listed above; a typo will not raise an error and the returned list will not be filtered as expected.

Filter by BMS name

hcloud BMS ListBareMetalServers --cli-region={region} --name={server_name} --cli-output=json

Pagination (limit / offset)

hcloud BMS ListBareMetalServers --cli-region={region} --limit=25 --offset=1 --cli-output=json

Note: In the BMS v1 list response, the server name is the top-level name field of each item in servers[]. The id is id and the status is status. count holds the total number of matched servers.

Parameter Confirmation

ParameterRequiredDescriptionExample
{region}YesHuawei Cloud regioncn-north-4
{status}NoServer status filterACTIVE
{name}NoServer name filterbms-01
{limit}NoPage size (default 25, max 1000)25
{offset}NoPage number (starts at 1)1

KooCLI Command Format Standard

The KooCLI command format is:

hcloud --cli-region= [--key=value ...]

Note: this is a generic format template, not an executable command — replace , , `` and the parameters with real values (e.g. hcloud BMS ListBareMetalServers --cli-region=cn-north-4).

  • Service name: BMS (starts with uppercase).
  • Operation name: PascalCase — ListBareMetalServers.
  • Region: always pass --cli-region=.
  • Simple parameters use --key=value, for example --status=ACTIVE.

Reference Documents

  • IAM Policies — Least-privilege IAM permissions
  • CLI Installation Guide — hcloud CLI setup and authentication
  • Verification Method — How to verify the skill works
  • Dataflow Diagram — Request flow diagram
  • Acceptance Criteria — Acceptance test checklist

Related skills

Read-only query of Huawei Cloud ECS, BMS, IMS, and AS resources via local Python scripts.

by huaweicloud-skills-team2 installs

Queries Huawei Cloud ECS (Elastic Cloud Server) resources in read-only mode. Covers ECS instances, flavors, keypairs, quotas, server groups, block devices, NICs, VNC console, launch templates, recycle bin, scheduled events, and tags. No write operations. Use this skill when the user needs to query ECS instance details, list flavors, check server status, view block devices, or inspect ECS resource attributes. Triggers include: 查询ECS, ECS实例查询, 云服务器查询, 弹性云服务器, ECS规格, ECS配额, 云服务器列表, ECS详情, query ECS, list ECS servers, show server details, ECS flavors, ECS quotas, ECS keypairs, server groups, block devices, ECS inventory, cloud server list, ecs list, ecs query, ecs show.

Query the list of Huawei Cloud EVS (Elastic Volume Service) disks under the current tenant / project, focused on the EVS disk NAME list. Returns each disk's name, id, status and size; can also output a pure EVS name-only list. Supports filtering by status, name and pagination (limit/offset). Uses the KooCLI command `hcloud EVS ListVolumes --cli-region={region}` (primary) against the v2 API, or the huaweicloudsdkevs Python SDK (fallback). Read-only — never creates, modifies or deletes any disk. Use this skill whenever the user wants to list/inspect the EVS disks of the tenant or query the EVS disk name list, e.g. for disk inventory, daily inspection, or cost review. Triggers include: "list EVS", "EVS list", "query EVS names", "EVS name list", "云硬盘列表", "查询云硬盘", "EVS磁盘名称", "云硬盘名称", "list volumes", "list elastic volumes", "how many EVS disks".

Query the total number of Huawei Cloud services available through KooCLI offline metadata. Returns the count of all supported cloud services from the cached service catalog. Triggers include: "how many Huawei Cloud services", "count Huawei Cloud services", "华为云服务总数", "华为云有多少个服务", "查询华为云服务数量".

1 installs

Query the current Huawei Cloud backup (VBS/Volume Backup Service) list. Lists all backups in the user's project, with optional filtering by status, name, resource type, vault, and time range. The legacy VBS service has been superseded by CBR (Cloud Backup and Recovery), so this skill queries backups through the CBR ListBackups API/CLI. Use when the user wants to: (1) list all backups / VBS backup list, (2) check backup status and details, (3) filter backups by name, status, resource type, vault, or time range, (4) inspect backup inventory for daily inspection or troubleshooting. Triggers include: "VBS", "备份列表", "备份", "云硬盘备份", "backup list", "list backups", "备份状态", "CBR", "Cloud Backup", "vbs list"

Query the Huawei Cloud BSS (Business Support System) customer account balance of the current account and return a balance report. Returns the currency, total debt amount, and per-account balances (cash/balance account, credit account, reward account, deposit account) with amounts. Uses the huaweicloudsdkbss Python SDK (`show_customer_account_balances`, v2 API `GET /v2/accounts/customer-accounts/balances`) — KooCLI does NOT support the BSS service, so the SDK is the only execution path. The shipped scripts/query_account_balance.py integrates the execution-quality reporting SDK and reports every run to the skillsopr operations console. Read-only — never creates, modifies or deletes any billing resource. Use this skill whenever the user wants to check the personal Huawei Cloud account balance, remaining balance, debt, or billing account status, e.g. for cost review, before creating pay-per-use resources, or daily inspection. Triggers include: "账户余额", "余额查询", "查询余额", "账单余额", "我的余额", "欠费",