SuperAPI AI Directory

byted-vedb-mysql

Deployment & operations

View repository

Updated 10-15 17:30

About this skill

Volcano Engine VEDBM Management Skill

This skill is used to manage Volcano Engine VEDBM (Cloud Database) instances and includes the following features:

  1. Create instance: Supports user-defined instance specifications, defaults to 2C8G specifications, username root, password randomly generated
  2. View instance list: Query all VEDBM instances in the specified region
  3. View database account list: Query all database accounts and their statuses in the specified instance
  4. View instance connection addresses: Query the connection address information of the specified instance (domain name, port, IP, etc.)

✨ New Features

  • Intelligent specification matching: Supports users entering simple formats (such as "2c8g", "4c16g")
  • Flexible default values: Defaults to 2C8G specifications
  • Automatic downgrade/upgrade: If the specification provided by the user does not exist, automatically select the closest available specification

Usage Process

Step 1: Collect Necessary Information

When the user triggers this skill, first check whether the necessary information is available. If not, guide the user to provide:

Information Required Description
VPC ID ✅ Virtual Private Cloud ID
Subnet ID ✅ Subnet ID
Availability Zone ID ✅ Availability Zone (such as cn-guangzhou-a)
AccessKey ID ✅ Volcano Engine Access Key ID
Secret Access Key ✅ Volcano Engine Secret Access Key

Step 2: Information Collection Method

Method A: Dialogue guidance (recommended for first use)

Ask the user:

"Okay, I will help you create a VEDBM instance! You need to provide some information:

  1. What is the VPC ID?
  2. What is the Subnet ID?
  3. Which availability zone do you want to use? (such as cn-guangzhou-a)
  4. What is the AccessKey ID?
  5. What is the Secret Access Key?"

Method B: Environment variable configuration (recommended for frequent use)

Prompt the user to configure environment variables:

# 配置环境变量
export VOLCENGINE_ACCESS_KEY="你的AccessKeyId"
export VOLCENGINE_SECRET_KEY="你的SecretAccessKey"
export VEDBM_VPC_ID="你的VPC ID"
export VEDBM_SUBNET_ID="你的子网 ID"
export VEDBM_ZONE_ID="cn-guangzhou-a"

Or use the .env file:

cd scripts
cp .env.example .env
# 编辑 .env 文件填入真实信息

Step 3: Execute Creation

After collecting the information, execute the create command.

Access Key Configuration

Method 1: Command line parameters

python scripts/create_vedbm_instance.py \
  --vpc-id <你的VPC ID> \
  --subnet-id <你的子网 ID> \
  --zone-id cn-guangzhou-a \
  --access-key-id <你的AccessKeyId> \
  --secret-access-key <你的SecretAccessKey>

Method 2: Environment variables

export VOLCENGINE_ACCESS_KEY="your-access-key-id"
export VOLCENGINE_SECRET_KEY="your-secret-access-key"
export VEDBM_VPC_ID="your-vpc-id"
export VEDBM_SUBNET_ID="your-subnet-id"
export VEDBM_ZONE_ID="cn-guangzhou-a"

python scripts/create_vedbm_instance.py

Method 3: Mixed use

You can use environment variables for some and command line parameters for others:

export VOLCENGINE_ACCESS_KEY="your-access-key-id"
export VOLCENGINE_SECRET_KEY="your-secret-access-key"

python scripts/create_vedbm_instance.py \
  --vpc-id <你的VPC ID> \
  --subnet-id <你的子网 ID> \
  --zone-id cn-guangzhou-a

Availability Zone Description

Guangzhou region availability zones:

  • cn-guangzhou-a - Availability Zone A
  • cn-guangzhou-c - Availability Zone C

Note: There is no cn-guangzhou-b

Node Specifications

Specification CPU Memory Description
vedb.mysql.x2.large 2 cores 8GB Default, entry level
vedb.mysql.x4.large 4 cores 16GB High cost-effectiveness
vedb.mysql.g4.large 4 cores 16GB General-purpose
vedb.mysql.p4.large 4-core 16GB Performance
vedb.mysql.x4.xlarge 8-core 32GB High-performance
vedb.mysql.x8.large 16-core 64GB Flagship

🎯 Specification Input Format

Multiple input formats are supported:

1. Abbreviated format (recommended)

  • 2c8g - 2-core 8GB
  • 4c16g - 4-core 16GB
  • 8c32g - 8-core 32GB

2. Specify CPU only

  • 2c - Automatically match the 2-core specification
  • 4c - Automatically match the 4-core specification

3. Specify memory only

  • 8g - Automatically match the 8GB specification
  • 16g - Automatically match the 16GB specification

4. Full specification name

  • vedb.mysql.x2.large
  • vedb.mysql.x4.large

🤖 Intelligent Matching Rules

If the specification provided by the user does not exist, the system will automatically select the closest specification:

  1. Prefer specifications greater than or equal to the target configuration
  2. CPU weight > Memory weight
  3. If there is no sufficiently large specification, select the largest available specification

Example:

  • User input 3c10g → Automatically matched 4c16g
  • User input 5c20g → Automatically matched 8c32g
  • User input 1c4g → Automatically matched 2c8g(minimum specification)

Prerequisites

  1. Volcengine Python SDK is installed:

    pip install volcengine-python-sdk
    
  2. Volcengine access credentials are configured (Access Key ID and Secret Access Key)

Usage

Run the script to create an instance:

python scripts/create_vedbm_instance.py

Script Parameters

The script supports the following optional parameters:

  • --region: Region, default cn-guangzhou
  • --instance-name: Instance name, randomly generated by default
  • --node-spec: Node specification (optional, default 2c8g)
    • Supported formats:2c8g、4c16g、vedb.mysql.x2.large
  • --vpc-id: VPC ID (required)
  • --subnet-id: Subnet ID (required)
  • --zone-id: Availability zone ID (required)

Output Information

After successful creation, the following will be returned:

  • Instance ID
  • Connection address
  • Port
  • Username (root)
  • Password (randomly generated)
  • Specification used (including description and code)

Example

Example 1: Use the default specification (2c8g)

python scripts/create_vedbm_instance.py \
  --vpc-id vpc-123456 \
  --subnet-id subnet-123456 \
  --zone-id cn-guangzhou-a

Example 2: Use an abbreviated specification

python scripts/create_vedbm_instance.py \
  --vpc-id vpc-123456 \
  --subnet-id subnet-123456 \
  --zone-id cn-guangzhou-a \
  --node-spec 4c16g

Example 3: Use the full specification name

python scripts/create_vedbm_instance.py \
  --vpc-id vpc-123456 \
  --subnet-id subnet-123456 \
  --zone-id cn-guangzhou-a \
  --node-spec vedb.mysql.x4.large

Example 4: Specify CPU only

python scripts/create_vedbm_instance.py \
  --vpc-id vpc-123456 \
  --subnet-id subnet-123456 \
  --zone-id cn-guangzhou-a \
  --node-spec 8c

Feature 2: View Instance List

Usage Process

Step 1: Collect necessary information

When the user needs to view the instance list, first check whether the necessary information is available. If not, guide the user to provide:

Information Required Description
AccessKey ID ✅ Volcengine Access Key ID
Secret Access Key ✅ Volcengine Secret Access Key
Region (optional) ❌ Region to query, default cn-guangzhou

Step 2: Information collection method

Method A: Dialogue guidance (recommended for first-time use)

Ask the user:

"Okay, I'll help you view the VEDBM instance list! You need to provide some information:

  1. What is the AccessKey ID?
  2. What is the Secret Access Key?
  3. Which region do you want to query? (default cn-guangzhou)"

Method B: Environment variable configuration (recommended for frequent use)

Prompt the user to configure environment variables (can be reused for the configuration used to create instances):

# 配置环境变量
export VOLCENGINE_ACCESS_KEY="你的AccessKeyId"
export VOLCENGINE_SECRET_KEY="你的SecretAccessKey"
export VEDBM_REGION="cn-guangzhou"  # 可选

Usage

Run the script to query the instance list:

python scripts/list_instances.py

Script parameters

The script supports the following parameters:

  • --region: region, default cn-guangzhou
  • --access-key-id: access key ID (or environment variable VOLCENGINE_ACCESS_KEY)
  • --secret-access-key: secret access key (or environment variable VOLCENGINE_SECRET_KEY)

Output information

After a successful query, it returns:

  • Region
  • Total number of instances
  • Detailed information for each instance:
    • Instance ID
    • Instance name
    • Instance status
    • Node specification
    • Availability zone
    • Creation time

Examples

Example 1: Use the default region (cn-guangzhou)

python scripts/list_instances.py

Example 2: Specify a region

python scripts/list_instances.py --region cn-beijing

Example output

====================================================================================================
✅ VEDBM 实例列表查询成功!
====================================================================================================
区域: cn-guangzhou
实例总数: 2

📋 实例列表:
----------------------------------------------------------------------------------------------------
实例 ID                  实例名称                  状态         规格                可用区          
----------------------------------------------------------------------------------------------------
vedbm-xxx123456         vedbm-instance-123456    Running     vedb.mysql.x2.large cn-guangzhou-a
vedbm-yyy789012         vedbm-instance-789012    Running     vedb.mysql.x4.large cn-guangzhou-c
----------------------------------------------------------------------------------------------------
====================================================================================================

Feature 3: View the database account list

Usage process

Step 1: Collect the necessary information

When the user needs to view the database account list, first check whether the necessary information is available. If not, guide the user to provide:

Information Required Description
Instance ID ✅ VEDBM instance ID
AccessKey ID ✅ Volcano Engine access key ID
Secret Access Key ✅ Volcano Engine secret access key

Step 2: Information collection method

Method A: Conversational guidance (recommended for first-time use)

Ask the user:

"Okay, I'll help you view the database account list of the VEDBM instance! You need to provide some information:

  1. What is the instance ID?
  2. What is the AccessKey ID?
  3. What is the Secret Access Key?"

Method B: Environment variable configuration (recommended for frequent use)

Prompt the user to configure environment variables (can be reused for the configuration used to create instances):

# 配置环境变量
export VOLCENGINE_ACCESS_KEY="你的AccessKeyId"
export VOLCENGINE_SECRET_KEY="你的SecretAccessKey"

Usage

Run the script to query the account list:

python scripts/list_db_accounts.py --instance-id <实例ID>

Script parameters

The script supports the following parameters:

  • --region: region, default cn-guangzhou
  • --instance-id: instance ID (must be provided)
  • --access-key-id: access key ID (or environment variable VOLCENGINE_ACCESS_KEY)
  • --secret-access-key: secret access key (or environment variable VOLCENGINE_SECRET_KEY)

Output information

After a successful query, it returns:

  • Instance ID
  • Region
  • Total number of accounts
  • Detailed information for each account:
    • Account name
    • Account type
    • Account status

Examples

python scripts/list_db_accounts.py \
  --instance-id vedbm-xxx123456

Example output

======================================================================
✅ 数据库账号列表查询成功!
======================================================================
实例 ID: vedbm-xxx123456
区域: cn-guangzhou
账号总数: 2

📋 账号列表:
----------------------------------------------------------------------
账号名称             账号类型          账号状态        
----------------------------------------------------------------------
root                Super           Available     
testuser            Normal          Available     
----------------------------------------------------------------------
======================================================================

Feature 4: View the instance connection address

Usage process

Step 1: Collect the necessary information

When the user needs to view the instance connection address, first check whether the necessary information is available. If not, guide the user to provide:

Information Required Description
Instance ID ✅ VEDBM Instance ID
AccessKey ID ✅ Volcengine Access Key ID
Secret Access Key ✅ Volcengine Secret Access Key

Step 2: Information Collection Method

Method A: Conversation Guidance (Recommended for First Use)

Ask the user:

"Okay, I'll help you check the connection address of the VEDBM instance! I need you to provide some information:

  1. What is the instance ID?
  2. What is the AccessKey ID?
  3. What is the Secret Access Key?"

Method B: Environment Variable Configuration (Recommended for Frequent Use)

Prompt the user to configure environment variables (can reuse the configuration of other features):

# 配置环境变量
export VOLCENGINE_ACCESS_KEY="你的AccessKeyId"
export VOLCENGINE_SECRET_KEY="你的SecretAccessKey"

Usage

Run the script to query the connection address:

python scripts/get_instance_endpoint.py --instance-id <实例ID>

Script Parameters

The script supports the following parameters:

  • --region: Region, default cn-guangzhou
  • --instance-id: Instance ID (required)
  • --access-key-id: Access Key ID (or environment variable VOLCENGINE_ACCESS_KEY)
  • --secret-access-key: Secret Access Key (or environment variable VOLCENGINE_SECRET_KEY)

Output Information

After a successful query, it will return:

  • Instance ID
  • Region
  • Total number of endpoints
  • Detailed information for each endpoint:
    • Endpoint ID
    • Endpoint type (Primary, Cluster, etc.)
    • Connection address for each endpoint:
      • Domain name
      • Port
      • IP address
      • Network type

Example

python scripts/get_instance_endpoint.py \
  --instance-id vedbm-xxx123456

Output Example

================================================================================
✅ 实例连接地址查询成功!
================================================================================
实例 ID: vedbm-xxx123456
区域: cn-guangzhou
终端总数: 2

📍 终端 1:
--------------------------------------------------------------------------------
  终端 ID: endpoint-abc123
  终端类型: Primary

  📡 连接地址:
    地址 1:
      域名: vedbm-xxx123456.rds.volcengine.com
      端口: 3306
      IP地址: 10.0.0.100
      网络类型: Private

📍 终端 2:
--------------------------------------------------------------------------------
  终端 ID: endpoint-def456
  终端类型: Cluster

  📡 连接地址:
    地址 1:
      域名: vedbm-xxx123456-cluster.rds.volcengine.com
      端口: 3306
      IP地址: 10.0.0.101
      网络类型: Private
--------------------------------------------------------------------------------
================================================================================

Feature 5: View Instance Details

Usage Process

Step 1: Collect Necessary Information

When the user needs to view instance details, first check whether the necessary information is available. If not, guide the user to provide:

Information Required Description
Instance ID ✅ VEDBM Instance ID
AccessKey ID ✅ Volcengine Access Key ID
Secret Access Key ✅ Volcengine Secret Access Key

Step 2: Information Collection Method

Method A: Conversation Guidance (Recommended for First Use)

Ask the user:

"Okay, I'll help you check the VEDBM instance details! I need you to provide some information:

  1. What is the instance ID?
  2. What is the AccessKey ID?
  3. What is the Secret Access Key?"

Method B: Environment Variable Configuration (Recommended for Frequent Use)

Prompt the user to configure environment variables (can reuse the configuration of other features):

# 配置环境变量
export VOLCENGINE_ACCESS_KEY="你的AccessKeyId"
export VOLCENGINE_SECRET_KEY="你的SecretAccessKey"

Usage

Run the script to query instance details:

python scripts/describe_instance.py --instance-id <实例ID>

Script Parameters

The script supports the following parameters:

  • --region: Region, default cn-guangzhou
  • --instance-id: Instance ID (required)
  • --access-key-id: Access Key ID (or environment variable VOLCENGINE_ACCESS_KEY)
  • --secret-access-key: Secret Access Key (or environment variable VOLCENGINE_SECRET_KEY)
  • --full: Display the full attribute list (for debugging)

Output Information

After a successful query, it will return:

Basic Information

  • Instance ID
  • Instance Name
  • Instance Status
  • Creation Time
  • Project Name

Specification Information

  • Node Specification
  • Configuration (CPU cores + memory)
  • Number of Nodes
  • Specification Series

Storage Information

  • Used Storage
  • Storage Billing Type

Network Information

  • Region
  • Availability Zone
  • VPC ID
  • Subnet ID

Database Information

  • Database Version
  • Kernel Version
  • Time Zone

Billing Information

  • Billing Type
  • Billing Status
  • Deletion Protection

Node Details

  • ID, type, specification, and availability zone of each node

Example

Example 1: Query instance details

python scripts/describe_instance.py \
  --instance-id vedbm-xxx123456

Example 2: Display the complete attribute list (for debugging)

python scripts/describe_instance.py \
  --instance-id vedbm-xxx123456 \
  --full

Output Example

====================================================================================================
✅ VEDBM 实例详情查询成功!
====================================================================================================

📋 基本信息:
----------------------------------------------------------------------------------------------------
  实例 ID:        vedbm-4wuvdt3jhlce
  实例名称:      free
  实例状态:      Running
  创建时间:      2026-04-03T05:35:38Z
  项目名称:      default

💻 规格信息:
----------------------------------------------------------------------------------------------------
  节点规格:      vedb.mysql.g4.large
  配置:          4核 16GB
  节点数量:      2
  规格系列:      General

💾 存储信息:
----------------------------------------------------------------------------------------------------
  已用存储:      2.093 GiB
  存储计费类型:  PostPaid

🌐 网络信息:
----------------------------------------------------------------------------------------------------
  区域:          cn-guangzhou
  可用区:        cn-guangzhou-a
  VPC ID:        vpc-3f03n0s2v50qo72200s6jj8ni
  子网 ID:       subnet-11wfhusxgt05c40yrhczqa9cl

🗄️  数据库信息:
----------------------------------------------------------------------------------------------------
  数据库版本:    MySQL_8_0
  内核版本:      3.3.2.7
  时区:          UTC -01:00

💰 计费信息:
----------------------------------------------------------------------------------------------------
  计费类型:      PostPaid
  计费状态:      Normal
  删除保护:      disabled

🔧 节点详情:
----------------------------------------------------------------------------------------------------
  节点 ID                               类型           规格                        可用区
----------------------------------------------------------------------------------------------------
  vedbm-4wuvdt3jhlce-0                ReadOnly     vedb.mysql.g4.large       cn-guangzhou-a
  vedbm-4wuvdt3jhlce-1                Primary      vedb.mysql.g4.large       cn-guangzhou-a
====================================================================================================

Feature 6: Upgrade Instance Specification

Use Cases

  1. User-specified specification: If the user has specified a specification, make the change according to the user-specified specification
  2. Automatic upgrade: If the user has not specified a specification, first check the current instance specification, then by default upgrade one level based on the CPU specification
  3. No cross-specification-type: General specifications can only be upgraded within general specifications, and dedicated specifications can only be upgraded within dedicated specifications
  4. Maximum specification prompt: If upgrade is not possible, inform the user that the current specification is already the maximum and cannot be upgraded
  5. Timeout handling: If the upgrade task has not completed within 10 minutes, inform the user to monitor the task status through the console

Usage Process

Step 1: Collect Necessary Information

When the user needs to upgrade the instance specification, first check whether the necessary information is available. If not, guide the user to provide:

Information Required Description
Instance ID ✅ VEDBM instance ID
AccessKey ID ✅ Volcano Engine Access Key ID
Secret Access Key ✅ Volcano Engine Secret Access Key
Target specification (optional) ❌ If not provided, automatically upgrade by one level

Step 2: Information Collection Method

Method A: Dialogue guidance (recommended for first-time use)

Ask the user:

"Okay, I'll help you upgrade the VEDBM instance specification! You need to provide some information:

  1. What is the instance ID?
  2. What is the AccessKey ID?
  3. What is the Secret Access Key?
  4. What is the target specification? (Optional; if not provided, automatically upgrade by one level)"

Method B: Environment variable configuration (recommended for frequent use)

Prompt the user to configure environment variables (the configuration from other features can be reused):

# 配置环境变量
export VOLCENGINE_ACCESS_KEY="你的AccessKeyId"
export VOLCENGINE_SECRET_KEY="你的SecretAccessKey"

Specification Type Description

Series Description Available Specifications
G4 Series(General-purpose, default) General-purpose 4c16g → 8c32g → 16c64g → 32c128g
X4 Series(Standard) Standard 4c16g → 8c32g → 16c64g → 32c128g → 64c256g
X8 Series(Standard X8) Standard X8 8c32g → 16c64g → 32c128g → 64c256g → 96c384g → 128c512g
G8 Series(General-purpose G8) General-purpose G8 16c64g

⚠️ Note: Cross-series upgrades are not supported!

Usage

Run the script to upgrade the instance specification:

python scripts/upgrade_instance_spec.py --instance-id <实例ID>

Script parameters

The script supports the following parameters:

  • --region: Region, default cn-guangzhou
  • --instance-id: Instance ID (required)
  • --target-spec: Target specification (optional; if not provided, automatically upgrade by one level)
    • Supported formats:2c8g、4c16g、vedb.mysql.x4.large
  • --access-key-id: Access Key ID (or environment variable VOLCENGINE_ACCESS_KEY)
  • --secret-access-key: Secret Access Key (or environment variable VOLCENGINE_SECRET_KEY)

Output information

After a successful upgrade, the following will be returned:

  • Instance ID
  • Original specification
  • New specification
  • Specification code
  • Whether completed (if completed within 10 minutes)

Examples

Example 1: Automatically upgrade by one level (recommended)

python scripts/upgrade_instance_spec.py \
  --instance-id vedbm-xxx123456

Example 2: Specify the target specification (using the abbreviated format)

python scripts/upgrade_instance_spec.py \
  --instance-id vedbm-xxx123456 \
  --target-spec 4c16g

Example 3: Specify the target specification (using the full specification name)

python scripts/upgrade_instance_spec.py \
  --instance-id vedbm-xxx123456 \
  --target-spec vedb.mysql.x4.large

Output example

Automatic upgrade successful

================================================================================
✅ VEDBM 实例规格升级成功!
================================================================================
实例 ID: vedbm-xxx123456
原规格: vedb.mysql.x2.large
新规格: 4核16GB
规格代码: vedb.mysql.x4.large
================================================================================

Already at the maximum specification

================================================================================
❌ VEDBM 实例规格升级失败!
================================================================================
错误信息: 当前规格 'vedb.mysql.x8.large' 已经是 X 系列的最大规格,无法继续升级
实例 ID: vedbm-xxx123456
================================================================================

Wait timeout (10 minutes)

================================================================================
⏳ VEDBM 实例规格变更请求已提交
================================================================================
实例 ID: vedbm-xxx123456
原规格: vedb.mysql.x2.large
目标规格: 4核16GB
规格代码: vedb.mysql.x4.large

⚠️  注意: 规格变更请求已提交,但等待超时(10分钟)。请通过火山引擎控制台关注任务状态。
================================================================================

Cross-series upgrade rejected

================================================================================
❌ VEDBM 实例规格升级失败!
================================================================================
错误信息: 不支持跨规格类型升级(当前: X 系列, 目标: G 系列)
实例 ID: vedbm-xxx123456
================================================================================

Feature 7: Downgrade instance specification

Use cases

  1. User-specified specification: If the user specifies a specification, change it according to the user-specified specification
  2. Automatic downgrade: If the user does not specify a specification, first check the current instance specification, then by default downgrade by one level according to the CPU specification
  3. No cross-specification-type: General-purpose specifications can only be downgraded within general-purpose specifications, and dedicated specifications can only be downgraded within dedicated specifications
  4. Minimum specification prompt: If downgrade is not possible, inform the user that the current specification is already the minimum and cannot be downgraded
  5. Timeout handling: If the downgrade task has not completed within 10 minutes, inform the user to monitor the task status through the console

Usage process

Step 1: Collect necessary information

When the user needs to downgrade an instance specification, first check whether the necessary information is available. If not, guide the user to provide:

Information Required Description
Instance ID ✅ VEDBM instance ID
AccessKey ID ✅ Volcengine Access Key ID
Secret Access Key ✅ Volcengine Secret Access Key
Target specification (optional) ❌ If not provided, automatically downgrade by one level

Step 2: Information collection method

Method A: Conversation guidance (recommended for first-time use)

Ask the user:

"OK, I'll help you downgrade the VEDBM instance specification! You need to provide some information:

  1. What is the instance ID?
  2. What is the AccessKey ID?
  3. What is the Secret Access Key?
  4. What is the target specification? (Optional; if not provided, automatically downgrade by one level)"

Method B: Environment variable configuration (recommended for frequent use)

Prompt the user to configure environment variables (can reuse the configuration of other features):

# 配置环境变量
export VOLCENGINE_ACCESS_KEY="你的AccessKeyId"
export VOLCENGINE_SECRET_KEY="你的SecretAccessKey"

Specification type description

Series Description Available specifications
G4 series(General-purpose, default) General-purpose 4c16g ← 8c32g ← 16c64g ← 32c128g
X4 series(Standard) Standard 4c16g ← 8c32g ← 16c64g ← 32c128g ← 64c256g
X8 series(Standard X8) Standard X8 8c32g ← 16c64g ← 32c128g ← 64c256g ← 96c384g ← 128c512g
G8 series(General-purpose G8) General-purpose G8 16c64g

⚠️ Note: Cross-series downgrade is not supported!

Usage

Run the script to downgrade the instance specification:

python scripts/downgrade_instance_spec.py --instance-id <实例ID>

Script parameters

The script supports the following parameters:

  • --region: region, default cn-guangzhou
  • --instance-id: instance ID (required)
  • --target-spec: target specification (optional; if not provided, automatically downgrade by one level)
    • Supported formats:2c8g、4c16g、vedb.mysql.x4.large
  • --access-key-id: access key ID (or environment variable VOLCENGINE_ACCESS_KEY)
  • --secret-access-key: secret access key (or environment variable VOLCENGINE_SECRET_KEY)

Output information

After a successful downgrade, the following is returned:

  • Instance ID
  • Original specification
  • New specification
  • Specification code
  • Whether completed (if completed within 10 minutes)

Example

Example 1: Automatically downgrade by one level (recommended)

python scripts/downgrade_instance_spec.py \
  --instance-id vedbm-xxx123456

Example 2: Specify the target specification (using the abbreviated format)

python scripts/downgrade_instance_spec.py \
  --instance-id vedbm-xxx123456 \
  --target-spec 4c16g

Example 3: Specify the target specification (using the full specification name)

python scripts/downgrade_instance_spec.py \
  --instance-id vedbm-xxx123456 \
  --target-spec vedb.mysql.x4.large

Output example

Automatic downgrade successful

================================================================================
✅ VEDBM 实例规格降级成功!
================================================================================
实例 ID: vedbm-xxx123456
原规格: vedb.mysql.x4.large
新规格: 4核16GB
规格代码: vedb.mysql.x4.large
================================================================================

Already the minimum specification

================================================================================
❌ VEDBM 实例规格降级失败!
================================================================================
错误信息: 当前规格 'vedb.mysql.x4.large' 已经是 X4 系列的最小规格,无法继续降级
实例 ID: vedbm-xxx123456
================================================================================

Wait timed out (10 minutes)

================================================================================
⏳ VEDBM 实例规格变更请求已提交
================================================================================
实例 ID: vedbm-xxx123456
原规格: vedb.mysql.x4.large
目标规格: 4核16GB
规格代码: vedb.mysql.x4.large

⚠️  注意: 规格变更请求已提交,但等待超时(10分钟)。请通过火山引擎控制台关注任务状态。
================================================================================

Cross-series downgrade rejected

================================================================================
❌ VEDBM 实例规格降级失败!
================================================================================
错误信息: 不支持跨规格类型降级(当前: X 系列, 目标: G 系列)
实例 ID: vedbm-xxx123456
================================================================================