alibabacloud-hologres-instance-manage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHologres Instance Management
Hologres实例管理
Skill for managing Alibaba Cloud Hologres instances - list all instances and get instance details.
用于管理阿里云Hologres实例的Skill——支持列出所有实例和获取实例详情。
Architecture
架构
User → Aliyun CLI → Hologres API (hologram) → Instance List / Instance DetailsUser → Aliyun CLI → Hologres API (hologram) → Instance List / Instance DetailsInstallation
安装
Pre-check: Aliyun CLI >= 3.3.1 required Runto verify >= 3.3.1. If not installed or version too low, seealiyun versionfor installation instructions. Then [MUST] runreferences/cli-installation-guide.mdto enable automatic plugin installation.aliyun configure set --auto-plugin-install true
bash
curl -fsSL --connect-timeout 4 --max-time 120 https://aliyuncli.alicdn.com/install.sh | bash
aliyun version预检查:要求Aliyun CLI版本 >= 3.3.1 运行确认版本不低于3.3.1。如果未安装或版本过低, 请参考aliyun version的安装指引操作。 之后[必须]运行references/cli-installation-guide.md开启插件自动安装功能。aliyun configure set --auto-plugin-install true
bash
curl -fsSL --connect-timeout 4 --max-time 120 https://aliyuncli.alicdn.com/install.sh | bash
aliyun versionAuthentication
认证
This skill relies on the Alibaba Cloud default credential chain. It never reads, prints, or explicitly handles AK/SK values.
Security Rules:
- NEVER read, echo, or print AK/SK values
- NEVER ask the user to input AK/SK directly
- NEVER use
with literal credential valuesaliyun configure set- ONLY use
to verify credential statusaliyun configure list
bash
aliyun configure listCheck the output for a valid profile (AK, STS, EcsRamRole, or RamRoleArn).
If no valid profile exists, STOP here. The user must configure credentials outside of this session and return after shows a valid profile.
aliyun configure list本Skill依赖阿里云默认凭证链,不会读取、打印或显式处理AK/SK的值。
安全规则:
- 禁止读取、回显或打印AK/SK值
- 禁止要求用户直接输入AK/SK
- 禁止使用带明文凭证值的
命令aliyun configure set- 仅可使用
命令验证凭证状态aliyun configure list
bash
aliyun configure list检查输出中是否存在有效配置(AK、STS、EcsRamRole或RamRoleArn)。
如果不存在有效配置,请停止操作。 用户必须在当前会话外完成凭证配置,待显示有效配置后再返回操作。
aliyun configure listRAM Policy
RAM策略
The following RAM permissions are required for this skill:
| Product | RAM Action | Resource Scope | Description |
|---|---|---|---|
| Hologram | hologram:ListInstances | | List all Hologres instances |
| Hologram | hologram:GetInstance | | Get instance details |
See references/ram-policies.md for the complete RAM policy document.
[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
- Read
to get the full list of permissions required by this SKILLreferences/ram-policies.md- Use
skill to guide the user through requesting the necessary permissionsram-permission-diagnose- Pause and wait until the user confirms that the required permissions have been granted
本Skill需要以下RAM权限:
| 产品 | RAM操作 | 资源范围 | 描述 |
|---|---|---|---|
| Hologram | hologram:ListInstances | | 列出所有Hologres实例 |
| Hologram | hologram:GetInstance | | 获取实例详情 |
完整RAM策略文档请查看references/ram-policies.md。
[必须]权限失败处理规则: 执行过程中任何命令或API调用因权限错误失败时,遵循以下流程处理:
- 读取
获取本Skill所需的完整权限列表references/ram-policies.md- 使用
skill引导用户申请所需权限ram-permission-diagnose- 暂停操作,等待用户确认已授予所需权限后再继续
Parameter Confirmation
参数确认
IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, resource group IDs, tags, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
| Parameter Name | Required/Optional | Description | Default Value |
|---|---|---|---|
| RegionId | Optional | Region where instances are located | User's default region |
| InstanceId | Required (for GetInstance) | The ID of the Hologres instance | None |
| resourceGroupId | Optional | Filter by resource group ID | None |
| tag | Optional | Filter by tags (key-value pairs) | None |
| cmsInstanceType | Optional | Cloud Monitor instance type (standard/follower/mc-acceleration/warehouse/high-memory/serverless) | None |
重要提示:参数确认 — 执行任何命令或API调用前, 所有用户可自定义参数(例如RegionId、实例名、资源组ID、 标签等)必须与用户确认。未经用户明确许可,不得假设或使用默认值。
| 参数名 | 必填/可选 | 描述 | 默认值 |
|---|---|---|---|
| RegionId | 可选 | 实例所在区域 | 用户默认区域 |
| InstanceId | GetInstance操作必填 | Hologres实例ID | 无 |
| resourceGroupId | 可选 | 按资源组ID过滤 | 无 |
| tag | 可选 | 按标签(键值对)过滤 | 无 |
| cmsInstanceType | 可选 | 云监控实例类型(standard/follower/mc-acceleration/warehouse/high-memory/serverless) | 无 |
Core Workflow
核心工作流
Task 1: List All Hologres Instances
任务1:列出所有Hologres实例
Query all Hologres instances in the specified region.
bash
undefined查询指定区域下的所有Hologres实例。
bash
undefinedList all instances
列出所有实例
aliyun hologram POST /api/v1/instances
--header "Content-Type=application/json" --body "{}"
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--header "Content-Type=application/json" --body "{}"
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
aliyun hologram POST /api/v1/instances
--header "Content-Type=application/json" --body "{}"
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--header "Content-Type=application/json" --body "{}"
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
List instances with resource group filter
按资源组过滤列出实例
aliyun hologram POST /api/v1/instances
--header "Content-Type=application/json"
--body '{"resourceGroupId":"rg-acfmvscak73zmby"}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--header "Content-Type=application/json"
--body '{"resourceGroupId":"rg-acfmvscak73zmby"}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
aliyun hologram POST /api/v1/instances
--header "Content-Type=application/json"
--body '{"resourceGroupId":"rg-acfmvscak73zmby"}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--header "Content-Type=application/json"
--body '{"resourceGroupId":"rg-acfmvscak73zmby"}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
List instances with tag filter
按标签过滤列出实例
aliyun hologram POST /api/v1/instances
--header "Content-Type=application/json"
--body '{"tag":[{"key":"env","value":"production"}]}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--header "Content-Type=application/json"
--body '{"tag":[{"key":"env","value":"production"}]}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
aliyun hologram POST /api/v1/instances
--header "Content-Type=application/json"
--body '{"tag":[{"key":"env","value":"production"}]}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--header "Content-Type=application/json"
--body '{"tag":[{"key":"env","value":"production"}]}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
List instances by CMS instance type
按CMS实例类型列出实例
aliyun hologram POST /api/v1/instances
--header "Content-Type=application/json"
--body '{"cmsInstanceType":"standard"}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--header "Content-Type=application/json"
--body '{"cmsInstanceType":"standard"}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
**Response Fields:**
- `InstanceId`: Instance ID
- `InstanceName`: Instance name
- `InstanceStatus`: Status (Creating/Running/Suspended/Allocating)
- `InstanceType`: Type (Warehouse/Follower/Standard/Serverless/Shared)
- `InstanceChargeType`: Payment type (PostPaid/PrePaid)
- `RegionId`: Region ID
- `Endpoints`: Network endpoints listaliyun hologram POST /api/v1/instances
--header "Content-Type=application/json"
--body '{"cmsInstanceType":"standard"}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--header "Content-Type=application/json"
--body '{"cmsInstanceType":"standard"}'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
**响应字段:**
- `InstanceId`:实例ID
- `InstanceName`:实例名称
- `InstanceStatus`:实例状态(Creating/Running/Suspended/Allocating)
- `InstanceType`:实例类型(Warehouse/Follower/Standard/Serverless/Shared)
- `InstanceChargeType`:付费类型(PostPaid/PrePaid)
- `RegionId`:区域ID
- `Endpoints`:网络端点列表Task 2: Get Instance Details
任务2:获取实例详情
Get detailed information about a specific Hologres instance.
bash
undefined获取指定Hologres实例的详细信息。
bash
undefinedGet instance details by ID
按ID获取实例详情
aliyun hologram GET /api/v1/instances/{instanceId}
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
aliyun hologram GET /api/v1/instances/{instanceId}
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
Example with actual instance ID
填入实际实例ID的示例
aliyun hologram GET /api/v1/instances/hgprecn-cn-i7m2v08uu00a
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
**Response Fields:**
- `InstanceId`: Instance ID
- `InstanceName`: Instance name (2-64 characters)
- `InstanceStatus`: Status (Creating/Running/Suspended/Allocating)
- `InstanceType`: Type (Warehouse/Follower/Standard/Serverless/Shared)
- `InstanceChargeType`: Payment type (PostPaid/PrePaid)
- `Cpu`: CPU cores
- `Memory`: Memory in GB
- `Disk`: Standard storage size in GB
- `ColdStorage`: Cold storage capacity in GB
- `Version`: Instance version
- `Endpoints`: Network endpoints with VPC/Internet/Intranet details
- `AutoRenewal`: Whether auto-renewal is enabled
- `EnableHiveAccess`: Whether data lake acceleration is enabled
- `EnableServerless`: Whether serverless computing is enabled
- `EnableSSL`: Whether SSL is enabled
- `StorageType`: Storage type (redundant/local)aliyun hologram GET /api/v1/instances/hgprecn-cn-i7m2v08uu00a
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills
**响应字段:**
- `InstanceId`:实例ID
- `InstanceName`:实例名称(2-64个字符)
- `InstanceStatus`:实例状态(Creating/Running/Suspended/Allocating)
- `InstanceType`:实例类型(Warehouse/Follower/Standard/Serverless/Shared)
- `InstanceChargeType`:付费类型(PostPaid/PrePaid)
- `Cpu`:CPU核数
- `Memory`:内存大小,单位GB
- `Disk`:标准存储大小,单位GB
- `ColdStorage`:冷存储容量,单位GB
- `Version`:实例版本
- `Endpoints`:网络端点,包含VPC/公网/内网详细信息
- `AutoRenewal`:是否开启自动续费
- `EnableHiveAccess`:是否开启数据湖加速
- `EnableServerless`:是否开启Serverless计算
- `EnableSSL`:是否开启SSL
- `StorageType`:存储类型(redundant/local)Success Verification Method
成功验证方法
See references/verification-method.md for detailed verification steps.
详细验证步骤请查看references/verification-method.md。
Quick Verification
快速验证
bash
undefinedbash
undefinedVerify ListInstances
验证ListInstances接口
aliyun hologram POST /api/v1/instances
--header "Content-Type=application/json" --body "{}"
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills | jq '.InstanceList'
--header "Content-Type=application/json" --body "{}"
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills | jq '.InstanceList'
aliyun hologram POST /api/v1/instances
--header "Content-Type=application/json" --body "{}"
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills | jq '.InstanceList'
--header "Content-Type=application/json" --body "{}"
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills | jq '.InstanceList'
Verify GetInstance
验证GetInstance接口
aliyun hologram GET /api/v1/instances/{your-instance-id}
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills | jq '.Instance.InstanceStatus'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills | jq '.Instance.InstanceStatus'
**Success Indicators:**
- HTTP status code 200
- `Success` field is `true`
- `InstanceList` or `Instance` field contains valid dataaliyun hologram GET /api/v1/instances/{your-instance-id}
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills | jq '.Instance.InstanceStatus'
--read-timeout 4 --user-agent AlibabaCloud-Agent-Skills | jq '.Instance.InstanceStatus'
**成功标识:**
- HTTP状态码为200
- `Success`字段值为`true`
- `InstanceList`或`Instance`字段包含有效数据Cleanup
清理
This skill performs read-only operations. No cleanup is required.
本Skill仅执行只读操作,无需清理。
Command Tables
命令表
See references/related-commands.md for the complete CLI commands reference.
| Action | CLI Command | Description |
|---|---|---|
| List Instances | | Get list of all Hologres instances |
| Get Instance | | Get details of a specific instance |
完整CLI命令参考请查看references/related-commands.md。
| 操作 | CLI命令 | 描述 |
|---|---|---|
| 列出实例 | | 获取所有Hologres实例列表 |
| 获取实例 | | 获取指定实例的详情 |
Best Practices
最佳实践
- Always verify credentials before executing commands using
aliyun configure list - Use filters (resourceGroupId, tags) to narrow down results when listing many instances
- Check instance status before performing operations - ensure instance is in state
Running - Use appropriate network endpoints - choose VPCSingleTunnel for internal access, Internet for external access
- Monitor instance expiration - check for PrePaid instances to avoid service interruption
ExpirationTime - Enable SSL for production environments to ensure secure connections
- 执行命令前始终验证凭证,使用命令检查
aliyun configure list - 列出大量实例时使用过滤器(资源组ID、标签)缩小结果范围
- 执行操作前检查实例状态,确保实例处于状态
Running - 使用合适的网络端点——内部访问选择VPCSingleTunnel,外部访问选择公网端点
- 监控实例到期时间——检查包年包月实例的,避免服务中断
ExpirationTime - 生产环境开启SSL,确保连接安全
Reference Links
参考链接
| Reference | Description |
|---|---|
| references/cli-installation-guide.md | Aliyun CLI installation guide |
| references/ram-policies.md | Required RAM permissions |
| references/related-commands.md | Complete CLI commands reference |
| references/verification-method.md | Success verification steps |
| Hologres API Documentation | Official API documentation |
| 参考文档 | 描述 |
|---|---|
| references/cli-installation-guide.md | Aliyun CLI安装指南 |
| references/ram-policies.md | 所需RAM权限说明 |
| references/related-commands.md | 完整CLI命令参考 |
| references/verification-method.md | 成功验证步骤 |
| Hologres API文档 | 官方API文档 |
Error Handling
错误处理
| HTTP Status | Error Code | Error Message | Resolution |
|---|---|---|---|
| 403 | NoPermission | RAM user permission is insufficient | Grant |
| 400 | InvalidParameter | Invalid parameter value | Check parameter format and constraints |
| 404 | InstanceNotFound | Instance does not exist | Verify instance ID is correct |
For more error codes, see Hologres Error Center.
| HTTP状态码 | 错误码 | 错误信息 | 解决方案 |
|---|---|---|---|
| 403 | NoPermission | RAM用户权限不足 | 授予 |
| 400 | InvalidParameter | 参数值无效 | 检查参数格式和约束条件 |
| 404 | InstanceNotFound | 实例不存在 | 核实实例ID是否正确 |
更多错误码请查看Hologres错误中心。