Data & analysis

huawei-cloud-services-count

Try it

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", "华为云服务总数", "华为云有多少个服务", "查询华为云服务数量".

What it does

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", "华为云服务总数", "华为云有多少个服务", "查询华为云服务数量".

The skill document

Huawei Cloud Services Count

Overview

This Skill queries how many Huawei Cloud services are available through the KooCLI offline metadata cache. It reads the local services_en.json file downloaded by hcloud meta download, parses the service entries, and returns the total count. No network API calls are needed after the initial metadata download.

Use case: Quickly determine how many cloud services Huawei Cloud offers at a glance, useful for reporting, documentation, or capacity awareness.

Prerequisites

  1. KooCLI (hcloud) installed and configured with valid AK/SK credentials
  2. Python 3.6+ available for JSON parsing
  3. KooCLI offline metadata must be downloaded at least once (hcloud meta download)

Workflow

1. Refresh metadata → hcloud meta download
2. Parse local JSON → Read ~/.hcloud/metaRepo/services_en.json
3. Count entries → Count the items in the services array
4. Output → Print the total number of services

Core Commands

Refresh metadata and count services

Run the following command to refresh the offline metadata and output the total service count:

echo "y" | hcloud meta download && python3 -c "
import json
import os

meta_path = os.path.expanduser('~/.hcloud/metaRepo/services_en.json')
with open(meta_path) as f:
    data = json.load(f)

items = data.get('items', [])
seen = set()
unique_count = 0
for item in items:
    text = item['Service']['Text']
    if text not in seen:
        seen.add(text)
        unique_count += 1

print(f'Huawei Cloud Services Count: {len(items)} total entries, {unique_count} unique services')
"

Count services only (skip download if metadata is recent)

If metadata was already downloaded recently, you can skip the download step:

python3 -c "
import json, os
meta_path = os.path.expanduser('~/.hcloud/metaRepo/services_en.json')
with open(meta_path) as f:
    data = json.load(f)
items = data.get('items', [])
print(f'Huawei Cloud Services Count: {len(items)}')
"

Parameter Confirmation

ParameterRequiredDescriptionDefault
{region}NoHuawei Cloud region (not required for meta commands)cn-north-4
{skip_download}NoSkip metadata refresh if cache is recentfalse

Reference Documents

  • CLI Installation Guide — KooCLI installation and configuration
  • IAM Policies — Required IAM permissions
  • Verification Method — How to verify the skill works
  • Data Flow Diagram — Mermaid data flow
  • Acceptance Criteria — Success criteria

KooCLI Command Format Standard

hcloud meta download
  • Service: Not applicable — meta is a KooCLI system command, not a service-specific command
  • Operation: download — lower case (system operation)
  • Confirmation: Pipe echo "y" | to auto-confirm the overwrite prompt

Related skills

Provides guidance for Huawei Cloud KooCLI command-line tool operations. Covers KooCLI installation, IAM authentication configuration, access credential confi...

by huaweicloud-skills-team1 installs

Queries Huawei Cloud billing and pricing. Covers balances, bills, coupons, cash coupons, stored-value cards, orders, refunds, costs, free resources, resource...

1 installs

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

by huaweicloud-skills-team2 installs

Queries Huawei Cloud storage resources (EVS/OBS/SFS/CBR). Covers cloud disks (volumes/snapshots/types/quotas/recycle bin), OBS buckets (ACL/metadata/notifica...

by huaweicloud-skills-team1 installs

Queries Huawei Cloud Cloud Connect (CC) resources via hcloud CLI. Covers cloud connection instances (single + list), bandwidth packages (single + list), inter-region bandwidths (single + list), network instances (single + list), cloud connection routes (single + list), and cross-account authorisations (granted + received). No write operations. Use this skill when the user needs to inspect cross-cloud connectivity topology, check bandwidth package status, review inter-region bandwidth allocation, query network instances attached to a cloud connection, troubleshoot routing in Cloud Connect, or audit cross-account authorisation relationships (who authorised whom). Triggers: 云连接, CC, Cloud Connect, 带宽包, bandwidth package, 域间带宽, inter-region bandwidth, 网络实例, network instance, 路由查询, cloud connection route, 跨云网络, cross-cloud connectivity, 授权, authorisation, 被授权, permission, 跨账号, cross-account.

Count the number of Huawei Cloud GaussDB instances in a region and output the count. Covers both GaussDB for openGauss and GaussDB (MySQL-compatible) instances. Returns the authoritative total_count from the list API, so the reported number is always correct. Read-only — never creates, modifies or deletes any resource. Use for GaussDB database inventory, daily inspection, or cost review. Triggers include: count GaussDB, GaussDB count, GaussDB instance count, how many GaussDB instances, GaussDB数量, GaussDB实例数量, 查询GaussDB数量, GaussDB总数, 统计GaussDB实例数.

1 installs