본문으로 건너뛰기
cccskills
무료GitHub에 공개

alicloud-vpc

Manage Alibaba Cloud VPC networking using the @alicloud/vpc20160428 TypeScript SDK. Use when working with virtual private clouds, VSwitches, route tables, EIPs, NAT gateways, VPN gateways, Express Connect, BGP routing, network ACLs, flow logs, traffic mirroring, IPv6, HAVIP, gateway endpoints, and resource tagging. Covers all 396 APIs of the VPC 20160428 version.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md7.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Alibaba Cloud VPC Skill

Manage VPC networking infrastructure via the @alicloud/vpc20160428 TypeScript SDK.

Prerequisites

npm install @alicloud/vpc20160428 @alicloud/openapi-core @darabonba/typescript
export ALIBABA_CLOUD_ACCESS_KEY_ID="<your-key-id>"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<your-key-secret>"

See scripts/setup_client.ts for a reusable client factory, and references/quickstart.md for full setup including endpoints, CIDR blocks, pagination, and async polling.

Client Initialization

import Client from '@alicloud/vpc20160428';
import { Config } from '@alicloud/openapi-core';

const client = new Client(new Config({
  accessKeyId: process.env.ALIBABA_CLOUD_ACCESS_KEY_ID,
  accessKeySecret: process.env.ALIBABA_CLOUD_ACCESS_KEY_SECRET,
  endpoint: 'vpc.aliyuncs.com',
  regionId: 'cn-hangzhou',
}));

API Overview (396 APIs in 13 Domains)

DomainAPIsKey OperationsReference
VPC Management32createVpc, describeVpcs, modifyVpcAttributereferences/vpc.md
VSwitch11createVSwitch, describeVSwitchesreferences/vswitch.md
Route Table & Entry33createRouteEntry, describeRouteTablesreferences/route-table.md
Elastic IP (EIP)47allocateEipAddress, associateEipAddressreferences/eip.md
NAT Gateway30createNatGateway, createSnatEntry, createForwardEntryreferences/nat-gateway.md
VPN Gateway62createVpnGateway, createVpnConnection, createSslVpnServerreferences/vpn.md
Express Connect & VBR83createPhysicalConnection, createVirtualBorderRouterreferences/express-connect.md
BGP Routing11createBgpGroup, createBgpPeer, addBgpNetworkreferences/bgp.md
Network ACL9createNetworkAcl, associateNetworkAclreferences/network-acl.md
Flow Log8createFlowLog, activeFlowLogreferences/flow-log.md
Traffic Mirror14createTrafficMirrorSession, createTrafficMirrorFilterreferences/traffic-mirror.md
IPv6 & HAVIP47createIpv6Gateway, createHaVip, allocateIpv6Addressreferences/ipv6.md
Tag, Region & Zone9tagResources, describeRegions, describeZonesreferences/tag-resource.md

Core Patterns

RPC-Style with regionId

All VPC APIs require regionId to specify the target region:

import * as models from '@alicloud/vpc20160428/dist/models';

const { body } = await client.describeVpcs(new models.DescribeVpcsRequest({
  regionId: 'cn-hangzhou',
  pageSize: 50,
  pageNumber: 1,
}));

Resource Lifecycle (Async)

Most create operations are asynchronous. Poll status after creation:

// Create VPC
const { body } = await client.createVpc(new models.CreateVpcRequest({
  regionId: 'cn-hangzhou',
  cidrBlock: '10.0.0.0/8',
  vpcName: 'my-vpc',
}));

// Poll until Available
let status = '';
while (status !== 'Available') {
  const { body: desc } = await client.describeVpcs(new models.DescribeVpcsRequest({
    regionId: 'cn-hangzhou', vpcId: body.vpcId,
  }));
  status = desc.vpcs?.vpc?.[0]?.status || '';
  if (status !== 'Available') await new Promise(r => setTimeout(r, 2000));
}

Page-Based Pagination

Most Describe APIs use pageNumber + pageSize:

let pageNumber = 1;
let all: any[] = [];
while (true) {
  const { body } = await client.describeVpcs(new models.DescribeVpcsRequest({
    regionId: 'cn-hangzhou', pageSize: 50, pageNumber,
  }));
  all.push(...(body.vpcs?.vpc || []));
  if (all.length >= (body.totalCount || 0)) break;
  pageNumber++;
}

Error Handling

try {
  await client.createVpc(request);
} catch (err: any) {
  console.error(`Code: ${err.code}, Message: ${err.message}, RequestId: ${err.data?.RequestId}`);
}

Common Workflows

1. VPC + VSwitch Setup

createVpc → createVSwitch (per zone) → createNetworkAcl → associateNetworkAcl

2. NAT Gateway for Internet Access

createNatGateway → allocateEipAddress → associateEipAddress → createSnatEntry → createForwardEntry

3. Site-to-Site VPN

createVpnGateway → createCustomerGateway → createVpnConnection → createVpnRouteEntry

4. VPC Peering

createVpcPeerConnection → acceptVpcPeerConnection → createRouteEntry (both sides)

5. Express Connect

createPhysicalConnection → createVirtualBorderRouter → createBgpGroup → createBgpPeer → addBgpNetwork

6. Flow Log

createFlowLog → activeFlowLog → describeFlowLogs

7. Traffic Mirroring

createTrafficMirrorFilter → createTrafficMirrorFilterRules → createTrafficMirrorSession

8. EIP & Bandwidth

allocateEipAddress → associateEipAddress → createCommonBandwidthPackage → addCommonBandwidthPackageIp

See references/workflows.md for detailed workflow examples with full code.

API Reference Quick Index

Load the corresponding reference file for parameter details:

  • VPC CRUD/CIDR/DHCP/vRouter: references/vpc.md
  • VSwitch CRUD/CIDR reservation: references/vswitch.md
  • Route tables/entries/gateway routes: references/route-table.md
  • EIP/bandwidth packages/public IP pools: references/eip.md
  • NAT gateway/SNAT/DNAT/Full NAT/NAT IP: references/nat-gateway.md
  • VPN gateway/IPsec/SSL VPN/tunnels: references/vpn.md
  • Physical connections/VBR/peering/prefix lists: references/express-connect.md
  • BGP groups/peers/networks: references/bgp.md
  • Network ACL rules: references/network-acl.md
  • Flow log capture/analysis: references/flow-log.md
  • Traffic mirror filters/sessions: references/traffic-mirror.md
  • IPv6 gateway/translator/HAVIP/gateway endpoints: references/ipv6.md
  • Tags/regions/zones: references/tag-resource.md

Each reference file contains per-API documentation with method signatures and parameter tables.

Code Examples

See scripts/examples.ts for ready-to-use code covering:

  • VPC and VSwitch CRUD
  • Route entry management
  • EIP allocation, binding, and release
  • NAT gateway with SNAT/DNAT rules
  • Network ACL creation
  • Flow log creation and activation
  • Resource tagging

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," or "hypothesis." For tracking implementation, see analytics-tracking.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

ComeOnOliver의 스킬 모두 보기

이 스킬의 문제 신고