Aliyun Vpc Manage logo

Aliyun Vpc Manage

Community
cinience
aliyun-vpc-manage

Use when managing Alibaba Cloud Virtual Private Cloud (VPC) via OpenAPI/SDK, including listing or creating VPCs and VSwitches, querying available zones, deleting VPC resources, managing route tables, and troubleshooting VPC network configurations.

Overview

Publishercinience
Repositoryalicloud-skills
Skill namealiyun-vpc-manage
Stars
397
Forks
34
Bundled files
10
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 10 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by cinience on GitHub. Read the source before you install it.

Installation

Install the Aliyun Vpc Manage AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/cinience/alicloud-skills/tree/main/skills/network/vpc/aliyun-vpc-manage
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cinience/alicloud-skills.git /tmp/alicloud-skills
mkdir -p .claude/skills
cp -r /tmp/alicloud-skills/skills/network/vpc/aliyun-vpc-manage .claude/skills/aliyun-vpc-manage
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Aliyun Vpc Manage in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Aliyun Vpc Manage on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Aliyun Vpc Manage is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Category: service

Virtual Private Cloud (VPC)

Validation

bash
mkdir -p output/aliyun-vpc-manage
for f in skills/network/vpc/aliyun-vpc-manage/scripts/*.py; do
  python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-vpc-manage/validate.txt

Pass criteria: command exits 0 and output/aliyun-vpc-manage/validate.txt is generated.

Output And Evidence

  • Save list/summarize outputs under output/aliyun-vpc-manage/.
  • Keep command arguments and region scope in each evidence file.

Use Alibaba Cloud OpenAPI (RPC) with official SDKs or OpenAPI Explorer to manage VPC resources. Prefer the Python SDK for all examples and execution.

Prerequisites

bash
pip install alibabacloud_vpc20160428 alibabacloud_tea_openapi alibabacloud_credentials
  • Prepare AccessKey (RAM user/role with least privilege).
  • Choose the correct region and endpoint (public/VPC).
  • VPC OpenAPI is RPC style; prefer SDK or OpenAPI Explorer to avoid manual signing.

API behavior notes (from VPC docs)

  • DescribeVpcs and DescribeVSwitches support pagination via PageNumber + PageSize.
  • DescribeVpcs requires RegionId in the request.
  • CreateVpc returns VpcId immediately but VPC enters Pending status; poll with DescribeVpcs until Available.
  • CreateVSwitch requires an existing VPC in Available status and a valid ZoneId.
  • DeleteVpc fails if VPC still has VSwitches, security groups, or other resources attached.
  • DeleteVSwitch fails if VSwitch still has ECS instances or other resources.

Workflow

  1. Confirm region, resource identifiers, and desired action.
  2. Find API group and exact operation name in references/api_overview.md.
  3. Call API with Python SDK (preferred) or OpenAPI Explorer.
  4. Verify results with describe/list APIs.
  5. If you need repeatable inventory or summaries, use scripts/ and write outputs under output/aliyun-vpc-manage/.

SDK priority

  1. Python SDK (preferred)
  2. OpenAPI Explorer
  3. Other SDKs (only if Python is not feasible)

Python SDK quickstart (list VPCs)

Virtual environment is recommended (avoid PEP 668 system install restrictions).

bash
python3 -m venv .venv
. .venv/bin/activate
pip install alibabacloud_vpc20160428 alibabacloud_tea_openapi alibabacloud_credentials
python
from alibabacloud_vpc20160428.client import Client as Vpc20160428Client
from alibabacloud_vpc20160428 import models as vpc_models
from alibabacloud_tea_openapi import models as open_api_models


def create_client(region_id: str) -> Vpc20160428Client:
    config = open_api_models.Config(
        region_id=region_id,
        endpoint=f"vpc.{region_id}.aliyuncs.com",
    )
    return Vpc20160428Client(config)


def list_vpcs(region_id: str):
    client = create_client(region_id)
    resp = client.describe_vpcs(vpc_models.DescribeVpcsRequest(
        region_id=region_id,
        page_number=1,
        page_size=50,
    ))
    for v in resp.body.vpcs.vpc:
        print(v.vpc_id, v.vpc_name, v.cidr_block, v.status)


if __name__ == "__main__":
    list_vpcs("cn-hangzhou")

Python SDK scripts (recommended for inventory)

  • List VPCs in a region: scripts/list_vpcs.py
  • List VSwitches in a region: scripts/list_vswitches.py
  • Create a VPC: scripts/create_vpc.py
  • Create a VSwitch: scripts/create_vswitch.py
  • Delete a VPC: scripts/delete_vpc.py
  • Delete a VSwitch: scripts/delete_vswitch.py
  • Query available zones: scripts/describe_zones.py

VPC 网络规划设计原则

CIDR 地址规划

  • 每个地域的业务 VPC 使用独立的 /16 网段,避免跨地域互联时 CIDR 冲突。推荐分配方式:
地域推荐 CIDR
cn-hangzhou10.1.0.0/16
cn-shanghai10.2.0.0/16
ap-southeast-110.3.0.0/16
cn-beijing10.4.0.0/16
更多地域10.5~254.0.0/16
  • 不要使用过大的 CIDR(如 10.0.0.0/8),即使 VSwitch 只用了很小一部分。大网段会阻止与其他 10.x 段 VPC 通过 CEN 互联。
  • VSwitch 统一使用 /24(252 可用 IP),对大多数业务足够。如果单可用区需要大量实例,可用 /20(4092 IP)。
  • 预留网段间隔用于未来扩展。如应用层用 0-9,数据库层用 10-19,中间件用 20-29。

可用区与高可用

  • 生产环境至少覆盖 2~3 个可用区,每个可用区至少 1 个 VSwitch。
  • 应用层和数据层分布在不同可用区,确保单 AZ 故障时服务不中断。
  • 创建 VSwitch 前先用 scripts/describe_zones.py 查询可用区列表,不同地域的可用区编号不同。

VSwitch 分层隔离

按业务功能对 VSwitch 进行分段,便于通过 ACL 和安全组实现网络隔离:

10.x.0~9.0/24    → 应用层(Web/API 服务器)
10.x.10~19.0/24  → 数据层(RDS、Redis、MongoDB)
10.x.20~29.0/24  → 中间件(MQ、ES、Nacos)
10.x.30~39.0/24  → 管理层(跳板机、运维工具)

VSwitch 命名规范

推荐格式:vsw-{region简写}-{可用区}-{用途}

示例:vsw-sg-a-app、vsw-hz-h-db、vsw-sh-e-middleware

跨地域互联(CEN)

  • 需要互联的 VPC 的 CIDR 必须不重叠。
  • 自动生成的 VPC(如 FC 组件创建的)通常使用 10.0.0.0/8,不要将其加入 CEN,否则会与其他地域的 10.x 段冲突。
  • 业务 VPC 规划时应预先考虑 CEN 互联需求,从一开始就使用不重叠的 /16 网段。

常见陷阱

问题原因解决方案
CEN 挂载失败,提示 CIDR 冲突两个 VPC 使用了重叠的 CIDR新建 VPC 使用不重叠的 /16 网段
DeleteVpc 失败VPC 下仍有 VSwitch/安全组/NAT 等资源先删除所有子资源,再删 VPC
DeleteVSwitch 失败VSwitch 下仍有 ECS/RDS 等实例先释放或迁移实例
创建 VSwitch 报 ZoneId 无效该可用区不支持或已售罄用 describe_zones.py 查询有效可用区
默认 VPC 用于生产默认 VPC 网段不可控,且无法与其他 VPC 合理互联生产环境始终新建 VPC,规划好 CIDR

Common operation mapping

  • VPC lifecycle: CreateVpc, DeleteVpc, ModifyVpcAttribute
  • VPC query: DescribeVpcs, DescribeVpcAttribute
  • VSwitch lifecycle: CreateVSwitch, DeleteVSwitch, ModifyVSwitchAttribute
  • VSwitch query: DescribeVSwitches, DescribeVSwitchAttributes
  • Route tables: CreateRouteTable, DeleteRouteTable, DescribeRouteTables, CreateRouteEntry, DeleteRouteEntry
  • NAT Gateway: CreateNatGateway, DeleteNatGateway, DescribeNatGateways
  • EIP: AllocateEipAddress, AssociateEipAddress, UnassociateEipAddress, ReleaseEipAddress, DescribeEipAddresses
  • Tags: TagResources, UntagResources, ListTagResources

Query patterns

  • List VPCs: DescribeVpcs (supports filters: VpcId, VpcName, IsDefault, ResourceGroupId)
  • List VSwitches: DescribeVSwitches (supports filters: VpcId, VSwitchId, ZoneId, VSwitchName, IsDefault)
  • Available zones: use ECS DescribeZones API to find valid zones for VSwitch creation

AccessKey priority (must follow, align with README)

  1. Environment variables: ALIBABACLOUD_ACCESS_KEY_ID / ALIBABACLOUD_ACCESS_KEY_SECRET / ALIBABACLOUD_REGION_ID Region policy: ALIBABACLOUD_REGION_ID is an optional default. If unset, decide the most reasonable region for the task; if unclear, ask the user.
  2. Shared config file: ~/.alibabacloud/credentials (region still from env)

Auth setup (README-aligned)

Environment variables:

bash
export ALIBABACLOUD_ACCESS_KEY_ID="your-ak"
export ALIBABACLOUD_ACCESS_KEY_SECRET="your-sk"
export ALIBABACLOUD_REGION_ID="cn-hangzhou"

Also supported by the Alibaba Cloud SDKs:

bash
export ALIBABA_CLOUD_ACCESS_KEY_ID="your-ak"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="your-sk"

Legacy compatibility:

bash
export ALICLOUD_ACCESS_KEY_ID="your-ak"
export ALICLOUD_ACCESS_KEY_SECRET="your-sk"

Shared config file:

~/.alibabacloud/credentials

ini
[default]
type = access_key
access_key_id = your-ak
access_key_secret = your-sk

API discovery

  • Product code: Vpc
  • Default API version: 2016-04-28
  • Use OpenAPI metadata endpoints to list APIs and get schemas (see references).

Output policy

If you need to save responses or generated artifacts, write them under: output/aliyun-vpc-manage/

References

  • API overview: references/api_overview.md
  • Sources: references/sources.md

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Aliyun Vpc Manage AI skill do?

Use when managing Alibaba Cloud Virtual Private Cloud (VPC) via OpenAPI/SDK, including listing or creating VPCs and VSwitches, querying available zones, deleting VPC resources, managing route tables, and troubleshooting VPC network configurations.

Why use Aliyun Vpc Manage on TypingMind?

Because you install it once and use it with any model. Aliyun Vpc Manage is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Aliyun Vpc Manage in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cinience/alicloud-skills/tree/main/skills/network/vpc/aliyun-vpc-manage. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Aliyun Vpc Manage?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Aliyun Vpc Manage?

As many as you like. As long as a model supports skills, you can use Aliyun Vpc Manage with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Aliyun Vpc Manage AI skill free?

Yes. It is published on GitHub by cinience under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇