huaweicloud/huaweicloud-skills

huawei-cloud-obs-bucket-create

Skill specialized for creating buckets on Huawei Cloud OBS.

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/huaweicloud/huaweicloud-skills --skill huawei-cloud-obs-bucket-create

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

Huawei Cloud OBS Bucket Create Skill

Overview

This skill is used for creating buckets on Huawei Cloud Object Storage Service (OBS). It provides a simple, interactive bucket creation process, including bucket name validation, region selection, access permission configuration, and other advanced options.

Applicable Scenarios:

  • Creating new buckets on Huawei Cloud OBS
  • Setting bucket access permissions and policies
  • Configuring bucket region and storage class
  • Validating bucket names against specifications
  • Batch creation of multiple buckets

Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent).

Unsupported Operations

This skill is only for creating OBS buckets, listing buckets and checking bucket properties. It does NOT execute the following operations. When the user requests any of them, clearly refuse and suggest the alternative command:

Unsupported OperationAlternative Command
Delete bucket / objecthcloud OBS rm
Upload / download fileshcloud OBS cp
Lifecycle rule managementhcloud OBS lifecycle
Change bucket attributeshcloud OBS chattri
Refusal guidance: when a request falls into the table above (or is any operation other than bucket creation/list/stat), tell the user "The skill does not support this operation" and provide the matching hcloud OBS alternative command shown above. Do not attempt to run unsupported operations.

Prerequisites

1. Huawei Cloud CLI Tool Installed

Required check: Huawei Cloud CLI (hcloud / KooCLI) >= 3.2.0

bash
> **⚠️ Mandatory: every `hcloud` command in this skill MUST be wrapped with `skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- ` — bare `hcloud` calls are strictly forbidden.**

# Check if installed
skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- hcloud version

If not installed, or version is lower than 3.2.0, refer to cli-installation-guide.md for KooCLI installation. KooCLI has built-in obsutil tool, if KooCLI version check passes, obsutil check can be skipped.

2. Huawei Cloud Credentials Configured

  • Valid Huawei Cloud OBS credentials (AK/SK mode)
bash
# View configuration
skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- hcloud obs ls -s

# Configuration file location ~/.obsutilconfig

If Huawei Cloud credentials are not configured, prompt the user to execute the following command:

bash
# Configure Huawei Cloud credentials
skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- hcloud OBS config -i="<Your AK>" -k="<Your SK>" -e="obs.<Region>.myhuaweicloud.com"
Huawei Cloud OBS credentials do not inherit from Huawei Cloud credentials and need to be set separately.
  • Security Rules:
  • 🚫 Do not directly enter AK/SK values in plain text.
  • 🚫 Never expose AK/SK values, do not extract AK/SK from hcloud configuration files.
  • ✅ Only use hcloud configure list to check credential status.
  • `skill-quality-cli` — ensured by bash scripts/ensure_cli.sh (idempotent, skips if present)
  • Upgrade: run skill-quality-cli upgrade manually (no auto-upgrade)
  • Disable telemetry report: set SKILL_QUALITY_REPORT=0

Core Workflow

Bucket name bucket-name is a required condition for creating an OBS bucket. If the context does not specify a bucket name, prompt the user that a specific bucket name is needed, no other text prompts required.

Step 1: Validate Bucket Name

Bucket name rules are as follows:

1. 3-63 characters, starting with a number or letter, supporting lowercase letters, numbers, "-", ".". 2. IP address format is not allowed. 3. Cannot start or end with "-" or ".". 4. Two adjacent "." are not allowed (e.g., "my..bucket"). 5. Adjacent "." and "-" are not allowed (e.g., "my-.bucket" and "my.-bucket")."
If the bucket name does not comply with the specification. Remind the user to reset the bucket name.

Step 2: Select Region

Get the region for the OBS bucket to be created from the context.

IMPORTANT: -location must always be explicitly specified. Do NOT rely on the endpoint value in ~/.obsutilconfig as a default region — creating a bucket without an explicit -location fails with IllegalLocationConstraintException. If the context does not specify a region, prompt the user to provide one (e.g. cn-north-4).

Region validation: before creating the bucket, validate the region chosen by the user against the valid region list below. If the region is invalid, do NOT run the create command; instead return a friendly message:

The region {region} is invalid. Please use a valid region, e.g. cn-north-4, cn-east-2, cn-south-1, ap-southeast-1, etc.

Valid OBS regions (also see <https://developer.huaweicloud.com/intl/en-us/endpoint>):

Region CodeRegionRegion CodeRegion
cn-north-1North China-Beijing 1cn-north-4North China-Beijing 4
cn-north-9North China-Ulanqab 1cn-north-5North China-Hohhot 2
cn-east-2East China-Shanghai 2cn-east-3East China-Shanghai 1
cn-east-4East China-Shanghai 4cn-east-5East China-Nanjing 1
cn-south-1South China-Guangzhoucn-south-2South China-Shenzhen
cn-south-4South China-Guangzhou 2cn-south-5South China-Guangzhou 3
cn-south-21South China-Guangzhou 4cn-southwest-2Southwest-Guiyang 1
cn-southeast-1East China-Fuzhou 1ap-southeast-1Asia Pacific-Hong Kong
ap-southeast-2Asia Pacific-Bangkokap-southeast-3Asia Pacific-Singapore
ap-southeast-4Asia Pacific-Jakartaap-southeast-5Asia Pacific-Hyderabad
ap-southeast-6Asia Pacific-Tokyo 1ap-southeast-7Asia Pacific-Mumbai
ap-northeast-1Asia Pacific-Tokyoaf-south-1Africa-Johannesburg
la-south-2Latin America-Santiagona-mexico-1Latin America-Mexico City 1
sa-brazil-1Latin America-Sao Paulo 1eu-west-101Europe-Paris 2
eu-west-0Europe-Paris 1

Return prompt text:

Once a bucket is created successfully, the region cannot be changed, please choose carefully. The region you want to create the bucket in is ${region}

Step 3: Create Bucket

bash
# Create with recommended configuration (-location is required)
skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- hcloud OBS mb obs://bucket-name -location=cn-north-4 [-acl=xxx] [-fs] [-az=xxx] [-sc=xxx] [-epid=xxx] [-kms=xxx]
bash
# Batch create multiple buckets with auto-generated names (prefix-purpose-timestamp).
# Script exit code 6 from Huawei Cloud CLI is normal behavior, not an execution error
./scripts/batch_create_buckets.sh <bucket-name-prefix> <regions> <purpose1> [purpose2] ...
bash
# Batch create multiple buckets with user-specified names (comma-separated)
./scripts/batch_create_buckets.sh --names "bucket-a,bucket-b,bucket-c" --region <region>

Step 4: Validate Success (Optional)

bash
# List all buckets to confirm creation success
skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- hcloud OBS ls

# Check bucket properties
skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- hcloud OBS stat obs://bucket-name

If the bucket list contains the bucket name created this time and the bucket information is output normally, prompt that the creation is successful and list the basic information of the bucket.

Core Commands

Create Storage Bucket

bash
skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- hcloud OBS mb obs://bucket-name -location=cn-north-4 [-acl=xxx] [-az=xxx] [-sc=xxx] [-epid=xxx] [-kms=xxx] [-fs]
Note: -location is required. Always pass an explicit -location=<region> from the valid region list in Step 2; creating a bucket without it fails with IllegalLocationConstraintException.
OptionDescriptionPossible Values
-location=xxxRegion (required)cn-north-4, cn-east-2, cn-south-1, ap-southeast-1, etc.
-acl=xxxAccess Control Listprivate, public-read, public-read-write
-az=xxxAvailability Zonemulti-az
-sc=xxxDefault Storage Classstandard, warm, cold, deep-archive
-epid=xxxEnterprise Project IDObtained from the Enterprise Project Management (EPS) console or API
-kms=xxxKMS Key ID for SSE-KMS encryptionObtained from the Data Encryption Workshop (DEW/KMS) console; key must exist in the same region
-fsCreate as a file-optimized (parallel file system) bucket—

List Storage Buckets

bash
skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- hcloud OBS ls

View Storage Bucket Properties

bash
skill-quality-cli run --skill-name huawei-cloud-obs-bucket-create -- hcloud OBS stat obs://${bucket-name}

Parameter Confirmation

Required Parameters

  • bucket-name: Storage bucket name, must comply with OBS naming convention (3-63 characters, lowercase letters, numbers, hyphens, dots, not starting or ending with hyphen or dot)

Optional Parameters

  • region: Region code, such as cn-north-4 (North China-Beijing 4), cn-east-2 (East China-Shanghai 2), cn-south-1 (South China-Guangzhou). Must be one of the valid regions listed in [Step 2](#step-2-select-region) and should be explicitly passed via `-location`. Use the region closest to users to reduce latency.
  • acl: Access permission, default private
  • storage-class: Storage class, default standard
  • az: Availability zone, default single availability zone, can be set to multi-az (multi-availability zone)
  • epid: Enterprise Project ID, used to assign the bucket to a specific enterprise project. Leave empty to use the default project.
  • kms: KMS Key ID, used to enable SSE-KMS encryption on the created bucket. The key must exist in the same region as the bucket.

Best Practices

  1. Naming Convention: Use meaningful bucket names, such as project-name-environment-purpose-20250527
  2. Region Selection: Choose the region closest to users to reduce latency, Beijing 4 (cn-north-4) is a commonly used region
  3. Access Control: Use private ACL by default, only open public-read when needed
  4. Storage Class: Choose based on access frequency:
  • Standard storage (standard): Frequently accessed data
  • Infrequent access storage (warm): Infrequently accessed data
  • Archive storage (cold): Rarely accessed data
  • Deep archive storage (deep-archive): Very rarely accessed data
  1. Batch Creation: Use batch_create_buckets.sh script to batch create multiple buckets
  2. Version Control: Consider enabling bucket version control to prevent accidental deletion

Notes

  1. Bucket Name Uniqueness: Bucket name is globally unique in Huawei Cloud OBS, cannot be duplicated with other users
  2. Region Immutability: Cannot change the bucket region after creation
  3. Cost: Storage buckets are free, but storing data, requests, and traffic will incur costs
  4. Security: Do not hard-code AK/SK in scripts, use environment variables or configuration files
  5. Permissions: Ensure the user executing the command has sufficient OBS permissions
  6. Network: Ensure network can access Huawei Cloud OBS service endpoints
  7. Quota: Check account's OBS bucket quantity quota
  8. Deletion Protection: Important buckets can enable deletion protection to prevent accidental deletion

References

DocumentDescription
KooCLI Installation GuideKooCLI installation guide
Common Errors and SolutionsError troubleshooting
z tego samego repozytorium

Więcej Skills

Wszystkie Skills
huaweicloud
Społeczność

huawei-cloud-devbridge-tunnel

Create and manage DevBridge development tunnels on Huawei Cloud to securely expose local development services to remote devices. Based on DevBridge CLI v0.2.x and API Key authentication. Use this skill when the user wants to: (1) install and configure the DevBridge CLI, (2) create/list/update/delete tunnels, (3) manage tunnel ports and protocols, (4) host local services through tunnels, (5) connect to remote tunnels from another device, (6) manage authentication and API Keys. Trigger: user menti

Instalacje / 1h
3
GitHub Stars
59
Aktualizacja
20 lis
huaweicloud
Społeczność

huawei-cloud-find-skills

Invoke this skill to search, list, query, discover, browse, find and install any Huawei Cloud (华为云) agent skill. Triggers include: "华为云", "华为云有什么skill", "华为云相关skill", "华为云agent skill 市场", "华为云skill类目", "explore Huawei Cloud skills", "show Huawei Cloud skill categories", "does a Huawei Cloud skill exist for...", "which Huawei Cloud skills exist", "搜索华为云技能", "查询华为云skill列表", "有没有管理ECS/OBS/RDS的skill", "帮我找 XX 华为云skill", "介绍 XX Skill 内容", "华为云 XX Skill 具体做什么", "安装华为云Skill".

Instalacje / 1h
3
GitHub Stars
59
Aktualizacja
20 lis
huaweicloud
Społeczność

huawei-cloud-terraform-installer

Installs Terraform CLI cross-platform with Huawei Cloud mirror support. Use this skill whenever the user mentions installing Terraform, setting up Terraform environment, or when IaC tasks detect missing Terraform. Trigger: install terraform, setup terraform, terraform environment, huaweicloud provider.

Instalacje / 1h
6
GitHub Stars
59
Aktualizacja
7 lis
huaweicloud
Społeczność

huawei-cloud-billing-scout

Huawei Cloud BSS billing (not AWS/Azure/other clouds; refuses pricing quotes, real-name review, and any non-billing scope): balance, spend, attribution, reconciliation, coupons, stored-value cards, enterprise/partner billing. One-page briefing via hcloud. Use when the request is about Huawei Cloud billing. Triggers include: 华为云余额, 华为云欠费, 华为云本月花费, 华为云扣费原因, 华为云账单对账, 华为云资源包, 华为云优惠券, 华为云企业主账号, 华为云伙伴账务, 华为云服务编码, Huawei Cloud balance / bill / spend / reconciliation / coupon / stored-value card / BSS b

Instalacje / 1h
5
GitHub Stars
59
Aktualizacja
7 lis