安全

huawei-cloud-eip-list

试用

Lists Huawei Cloud EIP (Elastic IP, 弹性公网IP) resources — enumerates all EIPs in a region with public IP address, EIP ID, status, bandwidth, associated instance and creation time, using the KooCLI `hcloud EIP ListPublicips` command (primary) or the huaweicloudsdkeip Python SDK (fallback). Provides read-only EIP inventory for network resource auditing, cost review and resource discovery. Use this skill whenever the user mentions EIP list query. Triggers include: list EIPs, EIP list, query EIP, enumerate EIPs, show EIPs, elastic IP list, public IP inventory, 查询弹性公网IP, EIP列表, 弹性公网IP列表, 查看EIP, 列出EIP, 获取EIP列表, 查询EIP, 查询公网IP.

它能做什么

Lists Huawei Cloud EIP (Elastic IP, 弹性公网IP) resources — enumerates all EIPs in a region with public IP address, EIP ID, status, bandwidth, associated instance and creation time, using the KooCLI `hcloud EIP ListPublicips` command (primary) or the huaweicloudsdkeip Python SDK (fallback). Provides read-only EIP inventory for network resource auditing, cost review and resource discovery. Use this skill whenever the user mentions EIP list query. Triggers include: list EIPs, EIP list, query EIP, enumerate EIPs, show EIPs, elastic IP list, public IP inventory, 查询弹性公网IP, EIP列表, 弹性公网IP列表, 查看EIP, 列出EIP, 获取EIP列表, 查询EIP, 查询公网IP.

技能文档

Huawei Cloud EIP List Skill

Overview

This skill lists all Huawei Cloud EIP (Elastic IP, 弹性公网IP) resources owned by the authenticated account in the specified region. It is a read-only inventory skill: it never creates, modifies, deletes EIPs, or changes any bandwidth or association.

Architecture:

Agent → hcloud CLI (KooCLI EIP, primary) → Huawei Cloud EIP API
       ↘ huaweicloudsdkeip Python SDK (fallback)  ↗

Applicable Scenarios:

  • EIP inventory and resource discovery (which public IPs exist, their status and bandwidth)
  • Network cost review (EIP count, bandwidth size and billing mode per region)
  • Troubleshooting connectivity (checking whether an EIP exists and is bound to an instance)
  • Compliance reporting (enumerating all EIPs per project/region)

Prerequisites

  1. hcloud CLI (KooCLI) installed and authenticated — See references/cli-installation-guide.md
  2. IAM permissionsvpc:publicIps:list (list) and vpc:publicIps:get (show detail) — See references/eip-policies.md
  3. Python 3.6+ with huaweicloudsdkeip package (SDK fallback) — pip install huaweicloudsdkeip

Credentials. KooCLI reads credentials from hcloud configure (AK/SK) or environment variables. The EIP API is region-scoped: the same account credentials used for other Huawei Cloud services work here, and --cli-region selects the region whose EIPs are queried. Never ask the user to paste AK/SK into the conversation.

Workflow

  1. Verify prerequisiteshcloud version, then run the list command (below)
  2. Run the queryhcloud EIP ListPublicips --cli-region= (CLI primary) with desired options
  3. Handle results — Parse EIP IDs, public IP addresses, statuses, bandwidths, and associated instances; report the total EIP count
  4. Fallback — If the CLI is unavailable, use the Python SDK example below

Core Commands

List All EIPs

hcloud EIP ListPublicips --cli-region=cn-north-4

List EIPs (JSON Output)

hcloud EIP ListPublicips --cli-region=cn-north-4 --cli-output=json

Note: ListPublicips is a multi-version API — hcloud prints a version hint line (ListPublicips is a multi-version API, where the version (v3) is default...) to stdout before the JSON body. When piping to jq/python3 -c json.load, skip the first line (e.g. tail -n +2) or use the SDK fallback path below.

Filter by EIP ID

hcloud EIP ListPublicips --cli-region=cn-north-4 --id.1=

Filter by Public IP Address

hcloud EIP ListPublicips --cli-region=cn-north-4 --public_ip_address.1=

Filter by IP Version

hcloud EIP ListPublicips --cli-region=cn-north-4 --ip_version.1=4

Filter by Enterprise Project

hcloud EIP ListPublicips --cli-region=cn-north-4 --enterprise_project_id.1=0

Pagination (limit + marker, v2 API)

hcloud EIP ListPublicips/v2 --cli-region=cn-north-4 --limit=10 --marker=

Show EIP Detail

hcloud EIP ShowPublicip/v3 --cli-region=cn-north-4 --publicip_id=

SDK Fallback Example

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkeip.v2 import EipClient
from huaweicloudsdkeip.v2.model import ListPublicipsRequest
from huaweicloudsdkeip.v2.region.eip_region import EipRegion

credentials = BasicCredentials(
    os.environ["HUAWEI_CLOUD_ACCESS_KEY"],
    os.environ["HUAWEI_CLOUD_SECRET_KEY"],
)
client = EipClient.new_builder() \
    .with_credentials(credentials) \
    .with_region(EipRegion.value_of("cn-north-4")) \
    .build()

response = client.list_publicips(ListPublicipsRequest())
eips = response.publicips or []
for eip in eips:
    print(eip.id, eip.public_ip_address, eip.status, eip.bandwidth)
print("EIP number:", len(eips))

Parameter Confirmation

ParameterRequiredDescriptionExample
--cli-regionYesHuawei Cloud region for the CLI endpointcn-north-4
--project_idNoProject ID (defaults to the region's parent project)--project_id=xxx
--id.[N]NoFilter by EIP ID (repeatable)--id.1=xxx
--public_ip_address.[N]NoFilter by public IP address (repeatable)--public_ip_address.1=1.2.3.4
--ip_version.[N]NoFilter by IP version (4 or 6)--ip_version.1=4
--enterprise_project_id.[N]NoFilter by enterprise project ID (0 = default)--enterprise_project_id.1=0
--status.[N]NoFilter by EIP status (v3 API)--status.1=ACTIVE
--limitNoPage size (v2 API, up to 100)--limit=50
--markerNoStart resource ID for pagination (v2 API)--marker=
--cli-outputNoOutput format (json/table)--cli-output=json

Reference Documents

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

KooCLI Command Format Standard

The hcloud EIP module maps directly to the Huawei Cloud EIP API operations.

FeatureDescriptionExample
Service nameEIPhcloud EIP ListPublicips
Operation nameEIP API operation nameListPublicips
Simple parameter--key=valuehcloud EIP ListPublicips --cli-output=json
Output format--cli-output=json/table--cli-output=json
CredentialsKooCLI configured account (AK/SK or env vars)hcloud configure

相关技能

Queries the EIP (Elastic IP, 弹性公网IP) bound to a single Huawei Cloud ECS instance — given an ECS ID or ECS name, returns the associated public IP address, EIP ID, status, bandwidth and binding details, using the KooCLI `hcloud EIP ListPublicips` command (primary, filtered by `vnic.device_id`) or the huaweicloudsdkeip Python SDK (fallback). Provides a read-only per-instance EIP lookup for network troubleshooting, cost review and resource discovery. Use this skill whenever the user wants the EIP of a specific ECS. Triggers include: ECS EIP query, EIP of ECS, find ECS public IP, ECS 的EIP, 查询ECS的弹性公网IP, ECS公网IP, ECS绑定的EIP, 单个ECS的eip, 查询ECS的eip, 查看ECS的弹性IP, ECS外网IP, 获取ECS公网地址.

Huawei Cloud EIP (Elastic IP) cost optimization skill using hcloud CLI (KooCLI). 1. List and query EIPs across regions with detailed status 2. Identify idle/unbound EIPs and generate cost optimization reports 3. Set up idle EIP monitoring with webhook/email alerts 4. Generate HTML/JSON cost analysis reports 5. Maintain operation audit logs for compliance **Read-only analysis only - NO bandwidth adjustment, tag management, or EIP release/deletion**. Triggers include: "EIP cost optimization", "idle EIP analysis", "EIP audit", "cost report", "EIP status query", "EIP list", "EIP monitoring", "EIP alert", "cost analysis", "idle monitoring", "operation audit", "EIP 成本优化", "闲置 EIP 分析", "EIP 审计", "成本报告", "EIP 状态查询", "EIP 查询", "EIP 列表", "EIP 监控", "EIP 告警", "成本分析", "闲置监控", "操作审计"

作者 huaweicloud-skills-team

面向华为云资源的只读查询能力,用于资源清点、核对与参数发现。

作者 huaweicloud-skills-team6 次安装

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".

通过本地 Python 脚本只读查询华为云 ECS、BMS、IMS、AS 资源。

作者 huaweicloud-skills-team2 次安装