Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
cinience avatar

Alicloud Compute Swas Open

  • 265 installs
  • 396 repo stars
  • Updated July 18, 2026
  • cinience/alicloud-skills

alicloud-compute-swas-open is an AI agent skill that provisions and manages Alibaba Cloud Simple Application Server (SWAS-OPEN 2020-06-01) resources for developers who need lightweight compute to host web apps and APIs w

About

alicloud-compute-swas-open is an agent skill in cinience/alicloud-skills that guides coding agents through Alibaba Cloud Simple Application Server management via the SWAS-OPEN 2020-06-01 OpenAPI. The skill maps instance query, start/stop/reboot, firewall rules, Cloud Assistant command execution, disk/snapshot/image operations, and lightweight database tasks to documented API calls, preferring the alibabacloud_swas_open20200601 Python SDK over manual RPC signing. It bundles 5 Python helper scripts for all-region instance inventory, plan and status summaries, and SSH access fixes, plus reference docs covering API groups, endpoints, systemd binary deployment, and ESA CDN HTTPS integration. Developers reach for alicloud-compute-swas-open when provisioning or operating SWAS instances to host web apps and APIs without repeatedly switching to the Alibaba Cloud console. The skill is version 1.0.0.

  • Provisions SWAS instances
  • Configures managed web stacks
  • Opens ports and runtime settings
  • Reduces bare-metal ops burden
  • Prepares lightweight app hosting

Alicloud Compute Swas Open by the numbers

  • 265 all-time installs (skills.sh)
  • Ranked #422 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cinience/alicloud-skills --skill alicloud-compute-swas-open

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs265
repo stars396
Last updatedJuly 18, 2026
Repositorycinience/alicloud-skills

How do you provision Alibaba Cloud SWAS instances via API?

Provision and open Alibaba Cloud Simple Web Application Server instances to host lightweight web apps, APIs, and managed runtime stacks with minimal ops overhead.

Who is it for?

Developers already on Alibaba Cloud who want an AI agent to provision, deploy to, and operate Simple Application Server instances through OpenAPI instead of manual console work.

Skip if: Developers not using Alibaba Cloud Simple Application Server, or teams needing full ECS, Kubernetes, or multi-VPC networking orchestration beyond SWAS scope.

When should I use this skill?

Trigger when the user asks to provision, list, start, stop, reboot, firewall, deploy binaries to, or troubleshoot Alibaba Cloud SWAS / Simple Application Server instances.

What you get

Running SWAS instances, configured firewall rules, systemd-deployed application binaries, TSV/JSON inventory reports, and API evidence files under output/compute-swas-open/ or output/aliyun-swas-manage/.

  • Provisioned SWAS instances with firewall and SSH access
  • TSV/JSON all-region instance inventory reports
  • Deployment and API evidence files in output/compute-swas-open/

By the numbers

  • Targets SWAS-OPEN OpenAPI version 2020-06-01
  • Bundles 5 Python inventory and SSH helper scripts
  • Published as skill version 1.0.0

Files

SKILL.mdMarkdownGitHub ↗

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).ALICLOUD_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).

python3 -m venv .venv
. .venv/bin/activate
python -m pip install alibabacloud_swas_open20200601 alibabacloud_tea_openapi alibabacloud_credentials
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("ALICLOUD_ACCESS_KEY_ID") or os.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID")
    sk = os.getenv("ALICLOUD_ACCESS_KEY_SECRET") or os.getenv("ALIBABA_CLOUD_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:ListInstancesStartInstance(s)StopInstance(s)RebootInstance(s)
  • Command execution:RunCommand or CreateCommand + InvokeCommand; use DescribeInvocations/DescribeInvocationResult
  • Firewall:ListFirewallRules/CreateFirewallRule(s)/ModifyFirewallRule/EnableFirewallRule/DisableFirewallRule
  • Snapshot/disk/image:CreateSnapshotResetDiskCreateCustomImage 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.

See references/command-assistant.md for details.

Clarifying questions (ask when uncertain)

1. What is the target region? Is VPC endpoint required? 2. What are target instance IDs? Are they currently Running? 3. What command/script type/timeout is needed? Linux or Windows? 4. Do you need batch execution or scheduled execution?

Output Policy

If you need to save results or responses, write to: output/compute-swas-open/

Validation

mkdir -p output/alicloud-compute-swas-open
for f in skills/compute/swas/alicloud-compute-swas-open/scripts/*.py; do
  python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/alicloud-compute-swas-open/validate.txt

Pass criteria: command exits 0 and output/alicloud-compute-swas-open/validate.txt is generated.

Output And Evidence

  • Save artifacts, command outputs, and API response summaries under output/alicloud-compute-swas-open/.
  • Include key parameters (region/resource id/time range) in evidence files for reproducibility.

Prerequisites

  • Configure least-privilege Alibaba Cloud credentials before execution.
  • Prefer environment variables: ALICLOUD_ACCESS_KEY_ID, ALICLOUD_ACCESS_KEY_SECRET, optional ALICLOUD_REGION_ID.
  • If region is unclear, ask the user before running mutating operations.

Workflow

1) Confirm user intent, region, identifiers, and whether the operation is read-only or mutating. 2) Run one minimal read-only query first to verify connectivity and permissions. 3) Execute the target operation with explicit parameters and bounded scope. 4) Verify results and save output/evidence files.

References

  • API overview and operation groups:references/api_overview.md
  • Endpoints and integration:references/endpoints.md
  • Cloud Assistant highlights:references/command-assistant.md
  • Official source list:references/sources.md

Related skills

How it compares

Choose alicloud-compute-swas-open for fixed-plan Simple Application Server workloads; pick a full ECS or VPC skill from the same repo when you need custom networking, larger instance families, or cluster-scale orchestrat

FAQ

What Alibaba Cloud API does alicloud-compute-swas-open use?

alicloud-compute-swas-open targets the Simple Application Server SWAS-OPEN OpenAPI version 2020-06-01. The skill maps instance, disk, snapshot, image, firewall, Cloud Assistant, monitoring, tag, and lightweight database operations to documented API groups in references/api_overvi

Which SDK should agents use for SWAS OpenAPI calls?

alicloud-compute-swas-open recommends the Python SDK packages alibabacloud_swas_open20200601, alibabacloud_tea_openapi, and alibabacloud_credentials. The skill avoids manual RPC signing and notes the aliyun CLI may not expose swas-open as a product name.

What helper scripts ship with alicloud-compute-swas-open?

alicloud-compute-swas-open includes 5 Python scripts: list_instances_all_regions.py, summary_instances_by_plan.py, summary_instances_by_status.py, fix_ssh_access.py, and get_ssh_port.py. These produce TSV or JSON inventory output and help repair SSH key-based access on custom por

Cloud & Infrastructurebackenddevopsintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.