Install
openclaw skills install huawei-cloud-swr-enterprise-instanceHuawei Cloud SWR enterprise instance lifecycle management via hcloud CLI. Trigger: "SWR enterprise instance", "SWR 企业实例", "SWR 企业版", "企业仓库实例", "swr.ee", "实例管理"
openclaw skills install huawei-cloud-swr-enterprise-instanceThis skill provides lifecycle management for Huawei Cloud SWR (Software Repository for Container)
enterprise instances using hcloud CLI. Enterprise instances provide dedicated, isolated container
registry environments with security scanning, replication, and custom domain support.
Architecture: hcloud CLI → SWR API → Instance/Namespace/Registry/Repository/Artifact/Credential/Endpoint/Domain
Related Skills:
huawei-cloud-swr-image-management - Image lifecycle (basic SWR namespaces, repos, tags, auth, quotas)huawei-cloud-swr-image-governance - Image governance (permissions, retention, sharing, immutable rules)huawei-cloud-swr-image-automation - Image automation ops (sync, triggers, domains)Capabilities:
You must authorize the SWR Enterprise Repository feature before using this skill. Visit https://console.huaweicloud.com/swr-instance to complete authorization. If any API returns an authorization error, direct the user to this link and wait for confirmation.
hcloud version to verify; first-time: printf "y\n" | hcloud versionHUAWEI_CLOUD_AK, HUAWEI_CLOUD_SK, HUAWEI_CLOUD_REGIONexport HUAWEI_CLOUD_AK=<your-ak>
export HUAWEI_CLOUD_SK=<your-sk>
export HUAWEI_CLOUD_REGION=cn-north-4
See IAM Permission Policies for complete permission list and policy JSON.
Permission Failure Handling:
references/iam-policies.mdSee Command Reference for full command examples and naming rules.
⚠️ hcloud CLI CreateInstance Bug: hcloud SWR CreateInstance has a duplicate --project_id
parameter bug (重复的参数:project_id). Use the Python SDK script instead:
python scripts/swr_instance_helper.py create --name=my-instance --spec=swr.ee.basic \
--vpc_id=<vpc-id> --subnet_id=<subnet-id> \
--enterprise_project_id=0 --description="My enterprise registry"
All other lifecycle commands (List/Show/Update/Delete) work fine with hcloud CLI.
Resource Types and Commands:
| Resource | Key Commands | Reference |
|---|---|---|
| Instance | Create (SDK), List, Show, UpdateConfig, Delete | Task: Lifecycle |
| Namespace | Create, List, Show, Update, Delete | Task: Namespaces |
| Registry | Create, List, Show, Update, Delete | Task: Registries |
| Repository | List, Show, Update, Delete | Task: Registries |
| Artifact | List, Show, Scan, Delete | Task: Artifacts |
| Credential | CreateLt, CreateTemp, List, Update, Delete | Task: Credentials |
| Endpoint | CreateInternal, List, Show, Delete, Policy CRUD | Task: Endpoints |
| Domain | Add, List, Show, Delete, Update | Task: Domains |
| Statistics/Jobs | ListStatistics, ListJobs, ShowJob, DeleteJob | Command Reference |
See Parameter Reference for detailed parameter tables (Common, Instance Creation, Namespace, Registry, Endpoint Whitelist).
See Output Format for response format examples.
See Verification Method for step-by-step verification.
prod-instance, dev-instance)auto_scan=true and prevent_vul=true for productionhigh/critical for production; none/low for developmentswr.ee.basic for small teams; swr.ee.professional for enterprise| Document | Description |
|---|---|
| Command Reference | Full CLI examples and naming rules |
| Parameter Reference | Parameter tables (Instance, Namespace, Registry, Endpoint) |
| SWR Instance API Guide | hcloud SWR instance API reference |
| SDK Helper Script | Python SDK for CreateInstance (bypasses hcloud bug) |
| Output Format | Response format examples |
| IAM Permission Policies | Required permissions and policy JSON |
| Verification Method | Step-by-step verification |
| Common Pitfalls | Troubleshooting guides |
| Task: Instance Lifecycle | Instance create, list, show, update config |
| Task: Instance Namespaces | Namespace CRUD workflows |
| Task: Instance Registries | Registry CRUD and repositories |
| Task: Instance Artifacts | Artifact management and scanning |
| Task: Instance Credentials | Credential management workflows |
| Task: Instance Endpoints | Internal and public access configuration |
| Task: Instance Domains | Custom domain management |
offset must be 0 or a multiple of limitSee Common Pitfalls for detailed troubleshooting guides.
Key pitfalls: invalid instance name format, VPC/subnet not found, instance still creating, offset not multiple of limit, registry credential wrong, domain cert not found, cannot delete default domain, public whitelist format, hcloud CreateInstance bug, SWR service quota exceeded.