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

alicloud-ecs

Manage Alibaba Cloud Elastic Compute Service (ECS) using the @alicloud/ecs20140526 TypeScript SDK. Use when working with cloud servers on Alibaba Cloud, including instance lifecycle (create, start, stop, reboot, delete), disks and snapshots, images, security groups, VPC networking, EIP, ENI, SSH key pairs, dedicated hosts, auto provisioning, launch templates, Cloud Assistant commands, tags, system events, diagnostics, storage capacity units, and prefix lists. Covers all 374 APIs of the ECS 20140526 version.

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md7.8 KB

SKILL.md(원문)

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

Alibaba Cloud ECS Skill

Manage cloud servers, disks, images, networks, security, and operations via the @alicloud/ecs20140526 TypeScript SDK.

Prerequisites

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

See scripts/setup_client.ts for a reusable client factory, and references/quickstart.md for full setup including regions, instance types, charge types, and pagination.

Client Initialization

import Client from '@alicloud/ecs20140526';
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,
  regionId: 'cn-hangzhou',
  endpoint: 'ecs.cn-hangzhou.aliyuncs.com',
}));

API Overview (374 APIs in 14 Domains)

DomainAPIsKey OperationsReference
Instance71runInstances, startInstance, stopInstance, describeInstancesreferences/instance.md
Disk & Snapshot46createDisk, attachDisk, createSnapshot, createAutoSnapshotPolicyreferences/disk.md
Image23createImage, copyImage, importImage, describeImagesreferences/image.md
Security Group15createSecurityGroup, authorizeSecurityGroup, revokeSecurityGroupreferences/security-group.md
Network & EIP91createVpc, createVSwitch, allocateEipAddress, createNetworkInterfacereferences/network.md
SSH Key Pair6createKeyPair, attachKeyPair, describeKeyPairsreferences/key-pair.md
Dedicated Host15allocateDedicatedHosts, describeDedicatedHostsreferences/dedicated-host.md
Auto Provisioning20createAutoProvisioningGroup, createElasticityAssurancereferences/auto-scaling.md
Launch Template7createLaunchTemplate, describeLaunchTemplatesreferences/launch-template.md
Cloud Assistant22runCommand, describeInvocationResults, createActivationreferences/command.md
Tag & Resource18tagResources, describeRegions, describeZonesreferences/tag-resource.md
System Events20describeInstancesFullStatus, createDiagnosticReportreferences/system-event.md
Storage & Deployment16createStorageSet, createDeploymentSet, createSavingsPlanreferences/storage-capacity.md
Prefix List5createPrefixList, describePrefixListsreferences/prefix-list.md

Core Patterns

RPC-Style API

ECS uses RPC-style APIs. All parameters are flat fields in a Request object:

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

const { body } = await client.describeInstances(new models.DescribeInstancesRequest({
  regionId: 'cn-hangzhou',
  instanceIds: JSON.stringify(['i-xxx1', 'i-xxx2']),
  pageSize: 10,
  pageNumber: 1,
}));

regionId is Required

Almost all ECS APIs require regionId. Always include it:

const request = new models.DescribeDisksRequest({
  regionId: 'cn-hangzhou',  // Required!
  diskIds: JSON.stringify(['d-xxx']),
});

Page-Based Pagination

Most Describe/List APIs use pageNumber + pageSize:

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

JSON-Encoded Array Parameters

Some parameters accept JSON-encoded arrays:

// instanceIds, diskIds, etc. are JSON strings
instanceIds: JSON.stringify(['i-xxx1', 'i-xxx2']),
diskIds: JSON.stringify(['d-xxx1']),

Error Handling

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

Common Workflows

1. Launch Instance

describeRegions → describeInstanceTypes → describeImages → createSecurityGroup → authorizeSecurityGroup → runInstances

2. Disk & Snapshot

createDisk → attachDisk → createSnapshot → createAutoSnapshotPolicy → applyAutoSnapshotPolicy

3. Image Management

createImage → copyImage → describeImages → importImage / exportImage

4. Security Group Rules

createSecurityGroup → authorizeSecurityGroup → authorizeSecurityGroupEgress → describeSecurityGroupAttribute

5. Instance Scaling

stopInstance → modifyInstanceSpec → startInstance

6. Remote Command Execution

describeCloudAssistantStatus → runCommand → describeInvocationResults

7. Network Interface

createNetworkInterface → attachNetworkInterface → assignPrivateIpAddresses

8. Key Pair Login

createKeyPair → runInstances (keyPairName) → attachKeyPair

9. Dedicated Host

describeDedicatedHostTypes → allocateDedicatedHosts → runInstances (dedicatedHostId)

10. Tag-Based Management

tagResources → describeInstances (tag filter) → untagResources

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

API Reference Quick Index

Load the corresponding reference file for parameter details:

  • Instance lifecycle/types/pricing: references/instance.md
  • Disk/snapshot/auto-snapshot: references/disk.md
  • Image/pipeline/share: references/image.md
  • Security group/rules: references/security-group.md
  • VPC/VSwitch/EIP/ENI/NAT/Route: references/network.md
  • SSH key pairs: references/key-pair.md
  • Dedicated hosts/clusters: references/dedicated-host.md
  • Auto provisioning/elasticity/capacity: references/auto-scaling.md
  • Launch templates: references/launch-template.md
  • Cloud Assistant commands: references/command.md
  • Tags/regions/zones/tasks: references/tag-resource.md
  • System events/diagnostics: references/system-event.md
  • Storage sets/deployment sets/savings: references/storage-capacity.md
  • Prefix lists: references/prefix-list.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:

  • Instance CRUD and lifecycle management
  • Security group creation and rule management
  • Disk creation, attachment, and snapshot
  • Image creation and listing
  • SSH key pair management
  • Cloud Assistant remote command execution
  • Tag-based resource management
  • Region and zone queries

리뷰

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

댓글

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

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

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. 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의 스킬 모두 보기

이 스킬의 문제 신고