Documents

huawei-cloud-dcs-list

Try it

Query Huawei Cloud DCS (Distributed Cache Service) instance names and list all managed Redis/Memcached instances across a region. Provides read-only name lookup, name filtering, status-based filtering, and instance ID lookup for inventory reporting and daily inspection. Triggers include: DCS list, list DCS instances, query DCS names, DCS instance name, find DCS instance, DCS name lookup, DCS instance list, Redis instance names, cache instance names, DCS inventory, 查询DCS名称, DCS实例名称, 缓存实例名称, DCS列表, DCS实例列表, 查询缓存实例名称.

What it does

Query Huawei Cloud DCS (Distributed Cache Service) instance names and list all managed Redis/Memcached instances across a region. Provides read-only name lookup, name filtering, status-based filtering, and instance ID lookup for inventory reporting and daily inspection. Triggers include: DCS list, list DCS instances, query DCS names, DCS instance name, find DCS instance, DCS name lookup, DCS instance list, Redis instance names, cache instance names, DCS inventory, 查询DCS名称, DCS实例名称, 缓存实例名称, DCS列表, DCS实例列表, 查询缓存实例名称.

The skill document

Huawei Cloud DCS List Skill

Overview

This skill provides read-only name-query capabilities for Huawei Cloud DCS (Distributed Cache Service, i.e. managed Redis / Memcached). It lists all DCS instances in a region, extracts instance names, and supports filtering by name and status, and instance ID lookup. It is designed for quick name lookups, inventory reporting, and daily instance inspection.

Architecture:

Agent → hcloud CLI (primary) → Huawei Cloud DCS API
       ↘ Python SDK (fallback) ↗

Applicable Scenarios:

  • List all DCS instance names in a region for inventory
  • Find a DCS instance by name (fuzzy or exact match)
  • Check which instances are in a given status (RUNNING, etc.)
  • Look up a specific instance by ID for cross-reference

Prerequisites

  1. hcloud CLI installed and authenticated — See references/cli-installation-guide.md
  2. Python 3.8+ with huaweicloudsdkdcs package (SDK fallback)
  3. Huawei Cloud AK/SK configured via environment variables or hcloud configure set
  4. IAM permissionsDCS ReadOnlyAccess or finer-grained policy — See references/iam-policies.md

Workflow

  1. Identify query scope — Decide whether to list all DCS instances, filter by name, status, or instance ID
  2. Select execution mode — Use the hcloud CLI by default; fall back to the Python SDK if the CLI is unavailable
  3. Execute the query — Run the appropriate command and capture the response
  4. Present results — Summarize DCS instance names, IDs and statuses in a readable form

Note on exact name matching: The DCS ListInstances API documents a name_equal query parameter for exact-match filtering. In current deployments it can return empty results even for existing names, so the fuzzy --name filter is the reliable way to look up an instance by name; use the returned instance_id with ShowInstance for precise detail.

Core Commands

Instance Name Queries

PurposeCommand
List all DCS instanceshcloud DCS ListInstances --cli-region={region} --limit={limit}
List instances filtered by name (fuzzy)hcloud DCS ListInstances --cli-region={region} --name={name} [--limit={limit}]
List instances filtered by statushcloud DCS ListInstances --cli-region={region} --status={status} [--limit={limit}]
List instances filtered by instance IDhcloud DCS ListInstances --cli-region={region} --instance_id={instance_id}
Show a single instance's detailhcloud DCS ShowInstance --cli-region={region} --instance_id={instance_id}

Name-Only Lookup (jq)

To extract just the instance names:

hcloud DCS ListInstances --cli-region={region} --limit={limit} | jq -r '.instances[].name'

To list instance names with status:

hcloud DCS ListInstances --cli-region={region} --limit={limit} | jq -r '.instances[] | "\(.name)\t\(.status)\t\(.instance_id)"'

SDK Fallback Examples

When the CLI is unavailable, use the Python SDK:

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkdcs.v2.region.dcs_region import DcsRegion
from huaweicloudsdkdcs.v2 import dcs_client
from huaweicloudsdkdcs.v2.model import ListInstancesRequest

credentials = BasicCredentials() \
    .with_ak(os.getenv("HUAWEI_ACCESS_KEY")) \
    .with_sk(os.getenv("HUAWEI_SECRET_KEY")) \
    .with_project_id("{project_id}")

client = dcs_client.DcsClient.new_builder() \
    .with_credentials(credentials) \
    .with_region(DcsRegion.value_of("{region}")) \
    .build()

request = ListInstancesRequest()
request.limit = 100
response = client.list_instances(request)
for instance in response.instances:
    print(instance.name, instance.status, instance.instance_id)

Parameter Confirmation

ParameterRequiredDescriptionExample
{region}YesHuawei Cloud regioncn-north-4
{name}NoDCS instance name filter (fuzzy match)dcs-eval-client
{status}NoInstance status filterRUNNING
{instance_id}NoInstance ID filter / required for ShowInstance51bb645e-d27f-465d-8192-c912d134756c
{limit}NoMaximum records to return (1-1000, default 10)100
{project_id}ConditionalProject ID (required for SDK/API)0a1234b56c78d9ef

Reference Documents

  • CLI Installation Guide
  • IAM Policies
  • Verification Method
  • Data Flow Diagram
  • Acceptance Criteria

KooCLI Command Format Standard

hcloud DCS  --cli-region= [--key=value ...]
FeatureDescriptionExample
Service nameDCShcloud DCS ListInstances
Operation namePascalCaseListInstances, ShowInstance
Region parameter--cli-region=--cli-region=cn-north-4
Simple parameter--key=value--name=dcs-eval-client

Related skills

Query Huawei Cloud DCS (Distributed Cache Service) instances, configurations, backups, slow logs, big key/hot key scan tasks, migration tasks, ACL accounts, IP whitelists, tags, quotas, and instance statistics. Provides read-only inspection capabilities for daily operations, performance troubleshooting, and compliance auditing. Triggers include: DCS query, list DCS instances, check Redis instance status, view cache configuration, backup records, slow logs, big key analysis, hot key analysis, migration task, ACL account, IP whitelist, instance quota, list DCS, query DCS, show DCS, DCS instance, Redis instance, 分布式缓存, DCS查询, DCS实例查询, 缓存实例.

Count the number of Huawei Cloud DCS (Distributed Cache Service) instances — managed Redis and Memcached — in a region and output the count. Returns the authoritative instance_num from the ListInstances API, so the reported number is always exact regardless of page size. Supports counting all instances, counting Redis-only (or Memcached-only) instances via the per-engine breakdown, filtering by status (RUNNING, FROZEN, etc.), and a per-status count breakdown via ListNumberOfInstancesInDifferentStatus. Read-only — never creates, modifies or deletes any resource. Use for Redis/DCS instance inventory, daily inspection, or cost review. Triggers include: count Redis, Redis count, DCS instance count, how many Redis instances, number of Redis instances, Redis数量, DCS实例数量, Redis实例数量, 查询Redis数量, 查询redis数量, 缓存实例数量, DCS数量, 统计Redis实例数, redis实例个数.

查询华为云账号下指定 Region 的关系型数据库服务(RDS)实例列表,输出精简的 实例名称 + ID + 状态 + 引擎类型 + 规格清单。 适合用于数据库资源盘点、运维巡检、故障排查与自动化脚本前置查询。

Query the list of Huawei Cloud DDS (Document Database Service, 文档数据库服务) instances under the current tenant / project and return the DDS instance NAMES. By default the skill prints only the instance names (one per line); with extra flags it also returns id, status, mode, datastore engine, version and created time. Supports filtering by instance name, id, mode (Sharding/ReplicaSet/Single), datastore type (DDS-Community/DDS-Enhanced), VPC and subnet, plus pagination via limit/offset. Uses the KooCLI command `hcloud DDS ListInstances --cli-region={region}` (primary) or the huaweicloudsdkdds Python SDK (fallback). Read-only — never creates, modifies, deletes, restarts or stops any DDS instance. Use this skill whenever the user wants to list/inspect the DDS instances of the tenant or query the DDS instance name list, e.g. for database inventory, daily inspection, or cost review. Triggers include: "list DDS", "DDS list", "query DDS names", "DDS实例列表", "查询DDS", "DDS实例名称", "dds list", "how many

1 installs

查询华为云账号下指定 Region 的弹性云服务器(ECS)实例列表,输出精简的实例名称 + ID 清单。 适合用于云资源盘点、运维巡检、自动化脚本前置查询。

Query the list of Huawei Cloud RDS (Relational Database Service, 云数据库) instances under the current tenant / project and return the RDS instance NAMES. By default the skill prints only the instance names (one per line); with extra flags it also returns id, status, engine type, flavor, private IPs and created time. Supports filtering by instance name, id, type (Single/Ha/Replica), datastore engine (MySQL/PostgreSQL/SQLServer/MariaDB) and VPC, plus pagination via limit/offset. Uses the KooCLI command `hcloud RDS ListInstances --cli-region={region}` (primary) or the huaweicloudsdkrds Python SDK (fallback). Read-only — never creates, modifies, deletes, restarts or stops any RDS instance. Use this skill whenever the user wants to list/inspect the RDS instances of the tenant or query the RDS instance name list, e.g. for database inventory, daily inspection, or cost review. Triggers include: "list RDS", "RDS list", "query RDS names", "RDS实例列表", "查询RDS", "RDS实例名称", "rds list", "how many RDS", "