Preview every file this package writes on install before you run the command above.
Summary
|
Skill instructions
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 Operation
Alternative Command
Delete bucket / object
hcloud OBS rm
Upload / download files
hcloud OBS cp
Lifecycle rule management
hcloud OBS lifecycle
Change bucket attributes
hcloud 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.
> **⚠️ Mandatory: every `hcloud` commandin 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:
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:
3-63 characters, starting with a number or letter, supporting lowercase letters, numbers, "-", ".".
IP address format is not allowed.
Cannot start or end with "-" or ".".
Two adjacent "." are not allowed (e.g., "my..bucket").
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.
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] ...
# 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.
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.
Option
Description
Possible Values
-location=xxx
Region (required)
cn-north-4, cn-east-2, cn-south-1, ap-southeast-1, etc.
-acl=xxx
Access Control List
private, public-read, public-read-write
-az=xxx
Availability Zone
multi-az
-sc=xxx
Default Storage Class
standard, warm, cold, deep-archive
-epid=xxx
Enterprise Project ID
Obtained from the Enterprise Project Management (EPS) console or API
-kms=xxx
KMS Key ID for SSE-KMS encryption
Obtained from the Data Encryption Workshop (DEW/KMS) console; key must exist in the same region
-fs
Create 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 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
Naming Convention: Use meaningful bucket names, such as project-name-environment-purpose-20250527
Region Selection: Choose the region closest to users to reduce latency, Beijing 4 (cn-north-4) is a commonly used region
Access Control: Use private ACL by default, only open public-read when needed
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
Batch Creation: Use batch_create_buckets.sh script to batch create multiple buckets
Version Control: Consider enabling bucket version control to prevent accidental deletion
Notes
Bucket Name Uniqueness: Bucket name is globally unique in Huawei Cloud OBS, cannot be duplicated with other users
Region Immutability: Cannot change the bucket region after creation
Cost: Storage buckets are free, but storing data, requests, and traffic will incur costs
Security: Do not hard-code AK/SK in scripts, use environment variables or configuration files
Permissions: Ensure the user executing the command has sufficient OBS permissions
Network: Ensure network can access Huawei Cloud OBS service endpoints
Quota: Check account's OBS bucket quantity quota
Deletion Protection: Important buckets can enable deletion protection to prevent accidental deletion
Add this badge to a GitHub README so readers can open the package page and install the same version.
[](https://www.aipm-registry.com/skills/huaweicloud/huawei-cloud-obs-bucket-create/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)
This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.
AI assistant context
What this skill is for
@huaweicloud/huawei-cloud-obs-bucket-create@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: |
Generate Huawei Cloud Terraform configurations and execute deployment with user-guided approval. Use this skill when users want to create Huawei Cloud infrastructure as Terraform, whether they ask explicitly for Terraform or describe goa...
Run aipm add @huaweicloud/huawei-cloud-obs-bucket-create@1.0.0 in a project that has AIPM initialized.
Supported tools
@huaweicloud/huawei-cloud-obs-bucket-create@1.0.0 supports All tools.
Before installing
AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.