Logo Huawei Cloud Swr Enterprise Instance

Huawei Cloud Swr Enterprise Instance

Tổ chức
huaweicloud
huawei-cloud-swr-enterprise-instance

Huawei Cloud SWR enterprise instance management skill using hcloud CLI. Use this skill when the user wants to: (1) manage SWR enterprise instances - create/list/show/delete/update configuration, (2) manage instance namespaces - create/list/show/update/delete with security scanning settings, (3) manage instance registries (sync targets) - create/list/show/update/delete, (4) manage instance repositories - list/show/delete/update, (5) manage instance artifacts (image versions) - list/show/delete/scan, (6) manage instance credentials - long-term and temporary, (7) manage instance endpoints - internal/public access, (8) manage instance domains - add/list/show/delete/update, (9) check instance statistics and job status. Trigger: user mentions "SWR enterprise instance", "SWR 企业实例", "SWR 企业版", "企业仓库实例", "SWR instance", "SWR 专业版", "swr.ee", "instance namespace", "instance registry", "instance repository", "instance artifact", "instance credential", "instance endpoint", "instance domain", "企业仓库", "实例管理", "同步目标仓库", "sync target"

Tổng quan

Nhà phát hànhhuaweicloud
Kho mãhuaweicloud-skills
Tên kỹ nănghuawei-cloud-swr-enterprise-instance
Sao
59
Bản fork
24
Tệp đi kèm
19
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 19 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được huaweicloud công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Huawei Cloud Swr Enterprise Instance trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/container/swr/huawei-cloud-swr-enterprise-instance
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/huaweicloud/huaweicloud-skills.git /tmp/huaweicloud-skills
mkdir -p .claude/skills
cp -r /tmp/huaweicloud-skills/skills/container/swr/huawei-cloud-swr-enterprise-instance .claude/skills/huawei-cloud-swr-enterprise-instance
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Huawei Cloud Swr Enterprise Instance trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Huawei Cloud Swr Enterprise Instance ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Huawei Cloud Swr Enterprise Instance với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Huawei Cloud SWR Enterprise Instance Management

Overview

This skill provides lifecycle management capabilities for Huawei Cloud SWR (Software Repository for Container) enterprise instances using the hcloud CLI. Enterprise instances provide dedicated, isolated container registry environments with advanced features like security scanning, replication policies, and custom domain support.

Note: Some features (e.g., replication policies) are managed via the SWR enterprise instance console, not through CLI. See Out of Scope above.

Architecture: hcloud CLI → SWR Service API → Instance/Namespace/Registry/Repository/Artifact/Credential/Endpoint/Domain resources

Related Skills:

  • huawei-cloud-swr-image-management - Image lifecycle management (basic SWR namespaces, repos, tags, auth, quotas)
  • huawei-cloud-swr-image-governance - Image governance (permissions, retention, sharing, tags, immutable rules)
  • huawei-cloud-swr-image-automation - Image automation ops (sync, triggers, domains)

Out of Scope:

This skill does NOT support the following operations. If the user requests any of these, inform them and suggest the correct skill:

OperationUse InsteadReason
Manage basic (non-enterprise) SWR namespaceshuawei-cloud-swr-image-managementBasic SWR namespace lifecycle
Push/pull images (docker login/push/pull)Docker CLI (use this skill to get credentials first)Docker CLI operation, not API
Build imagesCodeArts Build, CCE, or local DockerSWR is a registry, not a build service
Manage namespace/repo permissionshuawei-cloud-swr-image-governancePermission governance is a separate skill
Create retention/aging policies on basic SWRhuawei-cloud-swr-image-governanceRetention governance for basic SWR
Create image sync rules on basic SWRhuawei-cloud-swr-image-automationSync automation for basic SWR
Create/Delete triggers on basic SWRhuawei-cloud-swr-image-automationTrigger automation for basic SWR
Manage SWR agency delegation for basic SWRhuawei-cloud-swr-image-governanceAgency delegation for basic SWR
  • Create and manage SWR enterprise instances
  • Manage instance namespaces with security scanning and vulnerability blocking
  • Configure instance registries for cross-instance image sync
  • Query and manage instance repositories and artifacts
  • Obtain instance access credentials (long-term and temporary)
  • Configure instance network access (internal VPC endpoints, public access with whitelist)
  • Manage custom domains for instance access
  • Monitor instance statistics and job status

Typical Use Cases:

  • "Create an SWR enterprise instance for my organization"
  • "Create a namespace with auto-scan and vulnerability blocking"
  • "Configure a registry for syncing images to another instance"
  • "Get docker login credentials for my instance"
  • "Add a VPC internal endpoint or custom domain to my instance"

Prerequisites

1. hcloud CLI Requirements (MANDATORY)

  • hcloud CLI installed (version >= 7.2.2)
  • Run hcloud version to verify installation
  • First-time usage: printf "y\n" | hcloud version to accept privacy statement

2. Credential Configuration

hcloud CLI supports two credential modes. See references/credential-configuration.md for full details.

Quick setup (choose one):

bash
# Mode A — Long-term AK/SK
export HUAWEI_CLOUD_AK=<your-ak>
export HUAWEI_CLOUD_SK=<your-sk>
export HUAWEI_CLOUD_REGION=cn-north-4

# Mode B — Temporary AK/SK + SecurityToken
export HUAWEI_CLOUD_AK=<your-temp-ak>
export HUAWEI_CLOUD_SK=<your-temp-sk>
export HUAWEI_CLOUD_SECURITY_TOKEN=<your-security-token>
export HUAWEI_CLOUD_REGION=cn-north-4
  • Security rules: Never expose AK/SK/SecurityToken values. Use hcloud configure list to check presence only.

3. SWR Enterprise Service Activation (MANDATORY)

Before creating SWR enterprise instances, the user must first activate the SWR enterprise service in the Huawei Cloud console. This is a one-time enablement step per account/region.

Activation Steps:

  1. Access the SWR enterprise instance console via direct URL: https://console.huaweicloud.com/swr-instance
    • Important: The SWR enterprise instance console is not available from the main console navigation menu. Users must use this direct URL to access it.
  2. If prompted, review and accept the SWR enterprise service terms
  3. Confirm the service is activated by verifying the console loads successfully
  4. If activation is not available in the target region, the console will display an error or the service will not be listed

Verification: After activation, run hcloud SWR ListInstance --cli-region=<region> — if the service is activated, this returns an empty list (or existing instances). If not activated, an error will be returned.

Console Access:

  • SWR Enterprise Instance Console: https://console.huaweicloud.com/swr-instance
  • This URL provides access to instance management, namespace configuration, repository browsing, and replication policy setup
  • The console is region-aware — select the target region in the top-right corner after opening the URL

4. IAM Permission Requirements

This skill requires SWR enterprise instance permissions (instance, namespace, registry, repository, artifact, credential, endpoint, domain, job, statistic operations). See IAM Permission Policies for the complete permission table and policy JSON.

Permission Failure Handling:

  1. When any command fails due to permission errors, read references/iam-policies.md
  2. Display the required permission list and policy JSON to the user
  3. Guide the user to create a custom policy in the IAM console and grant authorization
  4. Pause execution and wait for user confirmation that permissions have been granted

Core Commands

1. Instance Lifecycle

See Task: Instance Lifecycle for detailed workflows.

bash
# Create an enterprise instance
# ⚠️ hcloud CLI CreateInstance has a known bug (duplicate --project_id parameter).
# Use the Python SDK helper script instead:
python scripts/swr_instance_helper.py create --name=my-instance --spec=swr.ee.professional \
    --vpc_id=<vpc-id> --subnet_id=<subnet-id> --enterprise_project_id=0 --cli-region=cn-north-4

# Alternatively, use --cli-jsonInput (see references/common-pitfalls.md Pitfall 15)
# hcloud SWR CreateInstance --cli-jsonInput=create_instance.json --cli-region=cn-north-4

# List all instances
hcloud SWR ListInstance --cli-region=cn-north-4

# List instances with status filter
hcloud SWR ListInstance --status=Running --cli-region=cn-north-4

# Show instance details
# Show instance details
hcloud SWR ShowInstance --instance_id=<instance-id> --cli-region=cn-north-4

**Note**: `ShowInstance` does not return endpoint information. To view network access endpoints, use:
- `hcloud SWR ListInstanceInternalEndpoints --instance_id=<instance-id> --cli-region=cn-north-4` for internal VPC endpoints
- `hcloud SWR ShowInstanceEndpointPolicy --instance_id=<instance-id> --cli-region=cn-north-4` for public access status and whitelist

# View instance configuration
hcloud SWR ShowInstanceConfiguration --instance_id=<instance-id> --cli-region=cn-north-4

# Update instance configuration (anonymous access)
# Update instance configuration (anonymous access)
hcloud SWR UpdateInstanceConfiguration --instance_id=<instance-id> --anonymous_access=false --cli-region=cn-north-4

**Configuration Scope**: `UpdateInstanceConfiguration` only supports the `--anonymous_access` parameter (boolean). This is the sole instance-level configuration option available via API. Other settings (spec, VPC, encryption) are set at creation time and cannot be modified afterward.

# Delete instance (CAUTION: removes all data permanently)
hcloud SWR DeleteInstance --instance_id=<instance-id> --cli-region=cn-north-4

Instance Naming Rules:

  • Start with lowercase letter
  • Followed by lowercase letters, digits, or hyphens (-)
  • No consecutive hyphens
  • Cannot end with hyphen
  • Length: 3-48 characters

Instance Spec Options: swr.ee.basic (basic edition), swr.ee.professional (professional edition)

Spec and Region Availability:

  • Not all specs (flavors) are available in all regions. Before creating an instance, verify that the desired spec is supported in the target region.
  • Use hcloud SWR ListInstance --cli-region=<region> to check if the SWR enterprise service is available in a region. If the API returns an error, the service may not be available in that region.
  • Use hcloud SWR ListSyncRegions --cli-region=<region> to list regions where SWR service is available for cross-region sync.
  • Common regions with SWR enterprise support include: cn-north-4, cn-north-1, cn-east-3, cn-south-1, cn-east-2, cn-southwest-2, cn-north-9, ap-southeast-1, ap-southeast-2, ap-southeast-3.
  • If instance creation fails with spec/region errors, try a different spec or region. The error message will indicate if the spec is not supported in the target region.

Billing Details:

  • WARNING: Creating an SWR enterprise instance incurs hourly costs. The user must be informed of this before proceeding.
  • --charge_mode: Only postPaid (on-demand/pay-as-you-go) is supported. No prepaid or annual/monthly billing available.
  • --spec=swr.ee.basic: Basic edition — suitable for small teams, limited features. Lower hourly cost.
  • --spec=swr.ee.professional: Professional edition — full features including security scanning, replication, custom domains. Higher hourly cost.
  • Costs are incurred per hour based on instance spec. No upfront payment required. Billing starts when the instance enters Running status.
  • To stop billing: delete the instance with hcloud SWR DeleteInstance. Billing stops immediately after deletion.
  • Use --enterprise_project_id to associate the instance with an enterprise project for cost tracking and attribution.
  • For detailed pricing information, refer to the Huawei Cloud SWR pricing page or consult the SWR enterprise instance console at https://console.huaweicloud.com/swr-instance.

Instance Status Values: Initial, Creating, Running, Unavailable

2. Instance Namespaces

See Task: Instance Namespaces for detailed workflows.

bash
# Create a namespace with auto-scan and vulnerability blocking
hcloud SWR CreateInstanceNamespace --instance_id=<instance-id> --namespace_name=group-dev --metadata.public=false --metadata.auto_scan=true --metadata.prevent_vul=true --metadata.severity=high --cli-region=cn-north-4

# List namespaces
hcloud SWR ListInstanceNamespaces --instance_id=<instance-id> --cli-region=cn-north-4

# List namespaces with filter
hcloud SWR ListInstanceNamespaces --instance_id=<instance-id> --public=false --limit=20 --offset=0 --cli-region=cn-north-4

# Show namespace details
hcloud SWR ShowInstanceNamespace --instance_id=<instance-id> --namespace_name=group-dev --cli-region=cn-north-4

# Update namespace (change visibility, scan settings)
hcloud SWR UpdateInstanceNamespace --instance_id=<instance-id> --namespace_name=group-dev --metadata.public=true --metadata.prevent_vul=false --cli-region=cn-north-4

# Delete namespace (CAUTION: removes all repositories under it)
hcloud SWR DeleteInstanceNamespace --instance_id=<instance-id> --namespace_name=group-dev --cli-region=cn-north-4

Namespace Naming Rules:

  • Start with lowercase letter or digit
  • Followed by lowercase letters, digits, dots, underscores, or hyphens
  • Dots, underscores, hyphens cannot be directly connected
  • End with lowercase letter or digit
  • Length: 1-64 characters

Vulnerability Severity Levels: none, low, medium, high, critical

3. Instance Registries (Sync Targets)

See Task: Instance Registries for detailed workflows.

bash
# Create a registry (sync target for another SWR enterprise instance)
hcloud SWR CreateInstanceRegistry --instance_id=<instance-id> --name=target-instance --type=swr-pro-internal --url=<target-url> --credential.type=basic --credential.access_key=<ak> --credential.access_secret=<sk> --insecure=false --instance_id=<target-instance-id> --project_id=<target-project-id> --region_id=cn-east-3 --cli-region=cn-north-4

# Create a registry for open-source Harbor
hcloud SWR CreateInstanceRegistry --instance_id=<instance-id> --name=harbor-target --type=swr-pro --url=https://harbor.example.com --credential.type=basic --credential.access_key=<username> --credential.access_secret=<password> --insecure=false --cli-region=cn-north-4

# List registries
hcloud SWR ListInstanceRegistries --instance_id=<instance-id> --cli-region=cn-north-4

# Show registry details
hcloud SWR ShowInstanceRegistry --instance_id=<instance-id> --registry_id=<registry-id> --cli-region=cn-north-4

# Update registry
hcloud SWR UpdateInstanceRegistry --instance_id=<instance-id> --registry_id=<registry-id> --name=new-name --url=<new-url> --credential.type=basic --credential.access_key=<new-ak> --credential.access_secret=<new-sk> --insecure=false --type=swr-pro --cli-region=cn-north-4

# Delete registry
hcloud SWR DeleteInstanceRegistry --instance_id=<instance-id> --registry_id=<registry-id> --cli-region=cn-north-4

Registry Types: swr-pro (open-source Harbor), swr-pro-internal (another SWR enterprise instance), huawei-SWR (basic SWR)

Credential Acquisition for Target Registries:

  • For swr-pro-internal (another SWR enterprise instance): Use CreateInstanceLtCredential on the target instance to obtain access_key (credential name) and access_secret (credential password).
  • For huawei-SWR (basic SWR): Use CreateInstanceTempCredential or basic SWR CreateAuthorizationToken to get temporary credentials.
  • For swr-pro (Harbor): Use the Harbor account username and password.
  • Credentials are stored securely by the instance and used for replication operations only.

4. Instance Repositories

See Task: Instance Registries for repository section.

bash
# List repositories in instance
hcloud SWR ListInstanceRepositories --instance_id=<instance-id> --cli-region=cn-north-4

# List repositories with filter
hcloud SWR ListInstanceRepositories --instance_id=<instance-id> --namespace_id=<ns-id> --limit=20 --offset=0 --order_column=updated_at --order_type=desc --cli-region=cn-north-4

# Show repository details
hcloud SWR ShowInstanceRepository --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --cli-region=cn-north-4

# Update repository description
hcloud SWR UpdateInstanceRepository --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --description="Updated description" --cli-region=cn-north-4

# Delete repository (CAUTION: removes all artifacts)
hcloud SWR DeleteInstanceRepository --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --cli-region=cn-north-4

5. Instance Artifacts (Image Versions)

See Task: Instance Artifacts for detailed workflows.

bash
# List artifacts in a repository
hcloud SWR ListInstanceArtifacts --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --cli-region=cn-north-4

# List artifacts with filter
hcloud SWR ListInstanceArtifacts --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --type=IMAGE --limit=20 --offset=0 --cli-region=cn-north-4

# Show artifact details
hcloud SWR ShowInstanceArtifact --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --reference=<digest> --cli-region=cn-north-4

# Show artifact with scan overview
hcloud SWR ShowInstanceArtifact --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --reference=<digest> --with_scan_overview=true --cli-region=cn-north-4

# Get artifact build history
hcloud SWR ShowInstanceArtifactAddition --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --reference=<digest> --addition=build_history --cli-region=cn-north-4

# List artifact vulnerabilities
hcloud SWR ListInstanceArtifactVulnerabilities --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --reference=<digest> --cli-region=cn-north-4

# Start manual vulnerability scan
hcloud SWR StartManualScanning --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --reference=<digest> --cli-region=cn-north-4

# Delete artifact (CAUTION: removes the image version permanently)
hcloud SWR DeleteInstanceArtifact --instance_id=<instance-id> --namespace_name=group-dev --repository_name=my-app --reference=<digest> --cli-region=cn-north-4

Artifact Types: IMAGE (container image), CHART (Helm chart)

⚠️ Image Vulnerability Scanning Limitation: Image vulnerability scanning depends on Huawei Cloud HSS (Host Security Service). The current skill does not support HSS configuration or management. To use scanning features:

  • Basic edition (swr.ee.basic): Scanning is not supported. Upgrade to professional edition.
  • Professional edition (swr.ee.professional): Scanning requires HSS to be enabled. Please activate HSS in the Huawei Cloud console first, then use the SWR enterprise instance console (https://console.huaweicloud.com/swr-instance) to verify scanning is functional before relying on it in automation workflows.
  • If scanning fails on a professional edition instance, check HSS service status and ensure HSS is properly activated for the target region.

6. Instance Credentials

See Task: Instance Credentials for detailed workflows.

bash
# Create a long-term access credential
hcloud SWR CreateInstanceLtCredential --instance_id=<instance-id> --name=my-credential --cli-region=cn-north-4

# Create a temporary access credential
hcloud SWR CreateInstanceTempCredential --instance_id=<instance-id> --cli-region=cn-north-4

# List long-term credentials
hcloud SWR ListInstanceLtCredentials --instance_id=<instance-id> --cli-region=cn-north-4

# Enable/disable a long-term credential
hcloud SWR UpdateInstanceLtCredential --instance_id=<instance-id> --credential_id=<cred-id> --enable=false --cli-region=cn-north-4

# Delete a long-term credential
hcloud SWR DeleteInstanceLtCredential --instance_id=<instance-id> --credential_id=<cred-id> --cli-region=cn-north-4

Credential Naming Rules (same as namespace): lowercase/digit start, 1-64 chars

7. Instance Endpoints (Network Access)

See Task: Instance Endpoints for detailed workflows.

bash
# Create internal VPC endpoint
hcloud SWR CreateInstanceInternalEndpoint --instance_id=<instance-id> --vpc_id=<vpc-id> --subnet_id=<subnet-id> --project_id=<vpc-project-id> --cli-region=cn-north-4

# List internal endpoints
hcloud SWR ListInstanceInternalEndpoints --instance_id=<instance-id> --cli-region=cn-north-4

# Show internal endpoint details
hcloud SWR ShowInstanceInternalEndpoint --instance_id=<instance-id> --internal_endpoints_id=<endpoint-id> --cli-region=cn-north-4

# Delete internal endpoint
hcloud SWR DeleteInstanceInternalEndpoint --instance_id=<instance-id> --internal_endpoints_id=<endpoint-id> --cli-region=cn-north-4

# Enable public access
hcloud SWR CreateInstanceEndpointPolicy --instance_id=<instance-id> --enable=true --cli-region=cn-north-4

# Disable public access
hcloud SWR CreateInstanceEndpointPolicy --instance_id=<instance-id> --enable=false --cli-region=cn-north-4

# View public access status and whitelist
hcloud SWR ShowInstanceEndpointPolicy --instance_id=<instance-id> --cli-region=cn-north-4

# Update public access whitelist (full replacement)
hcloud SWR UpdateInstanceEndpointPolicy --instance_id=<instance-id> --ip_list.1.ip=10.0.0.0/8 --ip_list.1.description="Internal network" --ip_list.2.ip=192.168.0.0/16 --ip_list.2.description="VPN network" --cli-region=cn-north-4

8. Instance Domains

See Task: Instance Domains for detailed workflows.

bash
# Add a custom domain
hcloud SWR AddDomainName --instance_id=<instance-id> --domain_name=registry.example.com --certificate_id=<scm-cert-id> --cli-region=cn-north-4

# List all domains
hcloud SWR ListDomainNames --instance_id=<instance-id> --cli-region=cn-north-4

# Get domain overview
hcloud SWR ShowDomainOverview --cli-region=cn-north-4

# Delete a domain (default domain cannot be deleted)
hcloud SWR DeleteDomainName --instance_id=<instance-id> --domainname_id=<domain-id> --cli-region=cn-north-4

# Update domain certificate
hcloud SWR UpdateDomainName --instance_id=<instance-id> --domainname_id=<domain-id> --certificate_id=<new-cert-id> --cli-region=cn-north-4

9. Instance Statistics and Jobs

bash
# Get instance statistics
hcloud SWR ListInstanceStatistics --instance_id=<instance-id> --cli-region=cn-north-4

# List instance jobs (async operations)
hcloud SWR ListInstanceJobs --cli-region=cn-north-4

# Show job details
hcloud SWR ShowInstanceJob --job_id=<job-id> --cli-region=cn-north-4

# Delete a job record
hcloud SWR DeleteInstanceJob --job_id=<job-id> --cli-region=cn-north-4

10. Instance Audit Logs

SWR enterprise instances provide built-in audit logging via ListAuditLogs API (pull/delete/create operations). No dependency on CTS required.

bash
hcloud SWR ListAuditLogs --instance_id=<instance-id> --project_id=<project-id> --operation=pull --cli-region=cn-north-4
# --operation: pull, delete, or create; --limit/--offset for pagination

See API Guide for full details.

Parameter Reference

See Parameter Reference for complete parameter tables including: common parameters, instance creation (name, spec, VPC, subnet, encryption), namespace (public, auto_scan, prevent_vul, severity), registry (type, url, credential), and endpoint whitelist parameters.

Output Format

See Output Format for detailed response format examples (Instance List, Instance Details, Namespace List, Internal Endpoint List, Domain Name List, Long-term Credential).

Verification

See Verification Method for step-by-step verification.

Best Practices

  1. Instance naming & VPC: Use descriptive names (prod-instance, dev-instance); choose VPC/subnet matching your workload environment
  2. Namespace security: Enable auto_scan=true and prevent_vul=true for production; set severity=high/critical for prod, none/low for dev
  3. Credentials: Store registry credentials securely and rotate periodically; use CreateInstanceLtCredential for CI/CD, CreateInstanceTempCredential for temp access
  4. Public access: Always configure IP whitelist when enabling public access via UpdateInstanceEndpointPolicy; use SCM certificates for custom domain HTTPS
  5. Delete with caution: Deleting an instance removes ALL data permanently; deleting a namespace removes ALL repositories
  6. Instance spec: Use swr.ee.basic for small teams; swr.ee.professional for enterprise with advanced features

参数确认

OperationCLI CommandRisk LevelConfirmation Required
CreateInstancehcloud SWR CreateInstanceHighCreating a paid instance incurs costs. Confirm instance spec (swr.ee.basic or swr.ee.professional), VPC/subnet configuration, and enterprise project before proceeding.
UpdateInstanceConfigurationhcloud SWR UpdateInstanceConfiguration --anonymous_access=trueHighEnabling anonymous access allows unauthenticated users to pull images, reducing security. Confirm this is intended before proceeding.
CreateInstanceEndpointPolicyhcloud SWR CreateInstanceEndpointPolicy --enable=trueMediumEnabling public access exposes the instance to the internet. Must configure IP whitelist via UpdateInstanceEndpointPolicy to restrict access. Confirm before proceeding.
DeleteInstanceLtCredentialhcloud SWR DeleteInstanceLtCredentialMediumDeleting a credential immediately revokes access for CI/CD pipelines using it. Recommend disabling the credential first (UpdateInstanceLtCredential --enable=false), verifying no active pipelines, then deleting.
CreateInstanceRegistryhcloud SWR CreateInstanceRegistryMediumCreating a sync target registry stores the target registry authentication credentials (access_key/access_secret). Confirm the target registry URL and credential information before proceeding.

工作流

This skill follows a standard workflow for SWR enterprise instance management:

  1. ⚠️ Billing Confirmation (MANDATORY) — Before executing any operation, inform the user of potential billing implications and obtain explicit consent:
    • Instance creation incurs hourly costs: swr.ee.basic (~¥0.35/hour) and swr.ee.professional (~¥1.05/hour) are paid specs. There is no free tier for enterprise instances.
    • Storage costs: Images stored in enterprise instances incur OBS storage fees.
    • Network costs: Cross-region sync and public access may incur traffic fees.
    • Ask the user to confirm: "Do you understand the billing implications and wish to proceed? (yes/no)"
    • Only proceed if the user explicitly confirms. If the user declines, stop and do not execute any operations.
  2. Prerequisites Check — Verify hcloud CLI installation and credential configuration
  3. Instance Identification — List or show existing instances to obtain instance_id
  4. Operation Execution — Execute the requested operation (create/update/delete/query)
  5. Result Verification — Confirm the operation succeeded by querying the resulting state
  6. Credential Management — For write operations, obtain and securely store any returned credentials
  7. Cleanup Confirmation — For destructive operations, confirm with the user before proceeding

KooCLI命令格式标准

All CLI commands use hcloud SWR <Operation> --param1=value1 --cli-region=<region> format.

Key rules: Use --key=value format, always specify --cli-region, never expose AK/SK, confirm before write operations, use --cli-output=json for structured output.

Known CLI Limitation: CreateInstance has a known hcloud CLI bug (duplicate --project_id parameter). Use the Python SDK helper script (scripts/swr_instance_helper.py) as the primary method, or --cli-jsonInput with path/body sections as an alternative. Other commands with same-name parameter conflicts (CreateInstanceInternalEndpoint, CreateInstanceRegistry) can use --cli-jsonInput. See Common Pitfalls (Pitfall 15) and CLI Format Guide for full details.

Reference Documents

Notes

  • Instance/Namespace/Artifact deletion is irreversible — removes all data permanently
  • Default domain cannot be deleted — only custom domains can be removed
  • AK/SK must never be hardcoded — use environment variables only
  • Pagination offset must be multiple of limit — offset must be 0 or a multiple of limit
  • Registry credential.access_secret is sensitive — never expose or log access secrets

Common Pitfalls

See Common Pitfalls & Solutions for detailed troubleshooting guides covering: invalid instance names, VPC/subnet errors, instance creation state, pagination offset rules, registry credential issues, domain certificate problems, public access whitelist format, SWR service activation, and spec availability.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Huawei Cloud Swr Enterprise Instance làm được gì?

Huawei Cloud SWR enterprise instance management skill using hcloud CLI. Use this skill when the user wants to: (1) manage SWR enterprise instances - create/list/show/delete/update configuration, (2) manage instance namespaces - create/list/show/update/delete with security scanning settings, (3) manage instance registries (sync targets) - create/list/show/update/delete, (4) manage instance repositories - list/show/delete/update, (5) manage instance artifacts (image versions) - list/show/delete/scan, (6) manage instance credentials - long-term and temporary, (7) manage instance endpoints - in...

Vì sao nên dùng Huawei Cloud Swr Enterprise Instance trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Huawei Cloud Swr Enterprise Instance là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Huawei Cloud Swr Enterprise Instance trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/container/swr/huawei-cloud-swr-enterprise-instance. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Huawei Cloud Swr Enterprise Instance?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Huawei Cloud Swr Enterprise Instance với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Huawei Cloud Swr Enterprise Instance với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Huawei Cloud Swr Enterprise Instance có miễn phí không?

Có. Kỹ năng này được huaweicloud phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇