huaweicloud/huaweicloud-skills

huawei-cloud-obs-bucket-create

Skill specialized for creating buckets on Huawei Cloud OBS.

Voir la source
Document Skill original

Rendu depuis le dépôt source en conservant titres, exemples, code, tableaux, liens et images.

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

Prerequisites

1. Huawei Cloud CLI Tool Installed

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

bash
# Check if installed
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
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
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.

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. If no region is specified, use the "endpoint" parameter in the ~/.obsutilconfig file as the region by default. 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
hcloud OBS mb obs://bucket-name [-acl=xxx] [-location=xxx] [-fs] [-az=xxx] [-sc=xxx]
bash
# Batch create multiple buckets. Script exit code 6 from Huawei Cloud CLI is normal behavior, not an execution error
./scripts/batch_create_buckets.sh <bucket-name-prefix> <regions>

Step 4: Validate Success (Optional)

bash
# List all buckets to confirm creation success
hcloud OBS ls

# Check bucket properties
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
hcloud OBS mb obs://bucket-name [-acl=xxx] [-location=xxx] [-fs] [-az=xxx] [-sc=xxx]
OptionDescriptionPossible Values
-acl=xxxAccess Control Listprivate, public-read, public-read-write
-location=xxxRegioncn-north-4, cn-east-2, etc.
-az=xxxAvailability Zonemulti-az
-sc=xxxDefault Storage Classstandard, warm, cold, deep-archive

List Storage Buckets

bash
hcloud OBS ls

View Storage Bucket Properties

bash
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)
  • 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)

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

Reference Documentation

DocumentDescription
KooCLI Installation GuideKooCLI installation guide
Common Errors and SolutionsError troubleshooting
du même dépôt

Autres Skills

Tous les Skills
huaweicloud
Communauté

huawei-cloud-publish-work-to-gallery

Publish user's work to the Huawei Cloud University Operations Platform (华为云高校运营平台/作品陈列馆). Use this skill whenever the user wants to publish, submit, or upload a project/work to the gallery or a training camp (训练营) on the platform — including casual phrasings like "把作品发布上去", "投稿到陈列馆", "传作品到平台", "提交作品/项目", "报名发布作品", as well as formal ones like "publish to work gallery", "submit to training camp", "upload work to the platform". Do NOT use for general dev questions, git push to GitCode alone, or platform browsing without publishing intent.

installations
5
GitHub Stars
50
Mis à jour
23 sept.
huaweicloud
Communauté

huawei-cloud-eip-cost-optimizer

Huawei Cloud EIP (Elastic IP) cost optimization skill using hcloud CLI (KooCLI). 1. List and query EIPs across regions with detailed status 2. Identify idle/unbound EIPs and generate cost optimization reports 3. Set up idle EIP monitoring with webhook/email alerts 4. Generate HTML/JSON cost analysis reports 5. Maintain operation audit logs for compliance Read-only analysis only - NO bandwidth adjustment, tag management, or EIP release/deletion. Triggers include: "EIP cost optimization", "idle EIP analysis", "EIP audit", "cost report", "EIP status query", "EIP list", "EIP monitoring", "EIP alert", "cost analysis", "idle monitoring", "operation audit", "EIP 成本优化", "闲置 EIP 分析", "EIP 审计", "成本报告", "EIP 状态查询", "EIP 查询", "EIP 列表", "EIP 监控", "EIP 告警", "成本分析", "闲置监控", "操作审计"

installations
1
GitHub Stars
50
Mis à jour
22 sept.
huaweicloud
Communauté

huawei-cloud-flexus-l-deploy-jiuwenswarm

One-click deployment of JiuwenSwarm multi-Agent collaboration platform on Huawei Cloud Flexus L instances. Usage scenarios: When users need to quickly deploy JiuwenSwarm/JiuwenClaw on Huawei Cloud Flexus L instances, when they need to automatically create cloud instances and deploy AI Agent platforms, when they need to configure model APIs and message channels (Xiaoyi/Feishu/DingTalk). Automatically create instances, deploy applications via COC, configure models and message channels. Trigger keywords: JiuwenSwarm deployment, JiuwenClaw deployment, 九问Swarm部署, 九问Claw部署, 一键部署JiuwenSwarm, AI智能体平台部署, 部署九问Swarm, 部署九问Claw,云服务器部署AI平台.

installations
1
GitHub Stars
50
Mis à jour
22 sept.
huaweicloud
Communauté

huawei-cloud-flexus-l-server-flexusagent-deployment

Deploy AI Agent development platform (Dify) on Huawei Cloud Flexus L instance, providing deployment operations, password management, MaaS model configuration, and workflow import capabilities. Trigger keywords: deploy flexusagent/一键部署Flexus AI Agent开发平台、change password/修改开发平台管理员密码、change dify password/修改dify平台密码、add maas provider/添加MaaS模型供应商、configure maas model/配置MaaS模型、view workflow/查看AI Agent工作流、import workflow/导入AI Agent工作流

installations
1
GitHub Stars
50
Mis à jour
22 sept.