Skip to content
Agentmart
Submit a tool

aliyun-swas-manage

Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances…

Skill by EthanYoQ

IndexedMIT★ 11
Write a review

Chalk Labs

Need help deploying aliyun-swas-manage?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ethanyoq-aliyun-swas-manage

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances, starting/stopping/rebooting, executing commands (cloud assistant), managing disks/snapshots/images, firewall rules/templates, key pairs, tags, monitoring, and lightweight database operations.

Use cases: backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/aliyun-swas-manage

What's inside

Skill name
aliyun-swas-manage
Description
Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances, starting/stopping/rebooting, executing commands (cloud assistant), managing disks/snapshots/images, firewall rules/templates, key pairs, tags, monitoring, and lightweight database operations.
License
MIT
Instructions
166 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (11)

  • SKILL.md
  • openai.yaml · agents/
  • api_overview.md · references/
  • command-assistant.md · references/
  • endpoints.md · references/
  • sources.md · references/
  • fix_ssh_access.py · scripts/
  • get_ssh_port.py · scripts/
  • list_instances_all_regions.py · scripts/
  • summary_instances_by_plan.py · scripts/
  • summary_instances_by_status.py · scripts/

SKILL.md (first lines)

---
name: aliyun-swas-manage
description: Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances, starting/stopping/rebooting, executing commands (cloud assistant), managing disks/snapshots/images, firewall rules/templates, key pairs, tags, monitoring, and lightweight database operations.
version: 1.0.0
---

Category: service

# Simple Application Server (SWAS-OPEN 2020-06-01)

Use SWAS-OPEN OpenAPI to manage full SAS resources: instances, disks, snapshots, images, key pairs, firewall, Cloud Assistant, monitoring, tags, and lightweight databases.

## Prerequisites

- Prepare AccessKey with least-privilege RAM user/role.
- Choose correct region and matching endpoint (public/VPC).`ALIBABACLOUD_REGION_ID` can be used as default region; if unset choose the most reasonable region, ask user if unclear.
- This OpenAPI uses RPC signing; prefer Python SDK or OpenAPI Explorer instead of manual signing.

## SDK Priority

1) Python SDK (preferred)
2) OpenAPI Explorer
3) Other SDKs

### Python SDK quick query (instance ID / IP / plan)

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

```bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install alibabacloud_swas_open20200601 alibabacloud_tea_openapi alibabacloud_credentials
```

```python
import os
from alibabacloud_swas_open20200601.client import Client as SwasClient
from alibabacloud_swas_open20200601 import models as swas_models
from alibabacloud_tea_openapi import models as open_api_models


def create_client(region_id: str) -> SwasClient:
    config = open_api_models.Config(
        region_id=region_id,
        endpoint=f"swas.{region_id}.aliyuncs.com",
    )
    ak = (
        os.getenv("ALIBABACLOUD_ACCESS_KEY_ID")
        or os.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID")
        or os.getenv("ALICLOUD_ACCESS_KEY_ID")
    )
    sk = (
        os.getenv("ALIBABACLOUD_ACCESS_KEY_SECRET")
        or os.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET")
        or os.getenv("ALICLOUD_ACCESS_KEY_SECRET")
    )
    if ak and sk:
        config.access_key_id = ak
        config.access_key_secret = sk
    return SwasClient(config)


def list_regions():
    client = create_client("cn-hangzhou")
    resp = client.list_regions(swas_models.ListRegionsRequest())
    return [r.region_id for r in resp.body.regions]


def list_instances(region_id: str):
    client = create_client(region_id)
    resp = client.list_instances(swas_models.ListInstancesRequest(region_id=region_id))
    return resp.body.instances


def main():
    for region_id in list_regions():
        for inst in list_instances(region_id):
            ip = getattr(inst, "public_ip_address", None) or getattr(inst, "inner_ip_address", None)
            spec = getattr(inst, "plan_name", None) or getattr(inst, "plan_id", None)
            print(inst.instance_id, ip or "-", spec or "-", region_id)


if __name__ == "__main__":
    main()
```

### Python SDK scripts (recommended for inventory and summary)

- All-region instance inventory (TSV/JSON):`scripts/list_instances_all_regions.py`
- Count instances by plan:`scripts/summary_instances_by_plan.py`
- Count instances by status:`scripts/summary_instances_by_status.py`
- Fix SSH key-based access (custom port supported):`scripts/fix_ssh_access.py`
- Get current SSH port of an instance:`scripts/get_ssh_port.py`

## CLI Notes

- `aliyun` CLI may not expose `swas-open` as product name; prefer Python SDK.
  If CLI is mandatory, generate request examples in OpenAPI Explorer first, then migrate to CLI.

## Workflow

1) Confirm resource type and region (instance/disk/snapshot/image/firewall/command/database/tag).  
2) Identify API group and operation in `references/api_overview.md`.  
3) Choose invocation method (Python SDK / OpenAPI Explorer / other SDK).  
4) After mutations, verify state/results with query APIs.  

## Common Operation Map

- Instance query/start/stop/reboot:`ListInstances`、`StartInstance(s)`、`StopInstance(s)`、`RebootInstance(s)`  
- Command execution:`RunCommand` or `CreateCommand` + `InvokeCommand`; use `DescribeInvocations`/`DescribeInvocationResult`  
- Firewall:`ListFirewallRules`/`CreateFirewallRule(s)`/`ModifyFirewallRule`/`EnableFirewallRule`/`DisableFirewallRule`  
- Snapshot/disk/image:`CreateSnapshot`、`ResetDisk`、`CreateCustomImage` etc.  

## Cloud Assistant Execution Notes

- Target instance must be in Running state.
- Cloud Assistant agent must be installed (use `InstallCloudAssistant`).
- For PowerShell commands, ensure required modules are available on Windows instances.
- After execution, use `DescribeInvocations` or `DescribeInvocationResult` to fetch status and outputs.

From EthanYoQ/Skill-hub, MIT.

More from EthanYoQ/Skill-hub

Signals

Stars
11
Forks
4
Open issues
0
Last commit (this folder)
Sep 19, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from EthanYoQ

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get aliyun-swas-manage running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying aliyun-swas-manage?

CallGet help
Cite this page

aliyun-swas-manage skill. Agent Mart. https://agentmart.dev/skills/ethanyoq-aliyun-swas-manage (last updated 2026-10-24)