All Products
Search
Document Center

Simple Application Server:ListInstances

Last Updated:Jul 31, 2025

This topic describes how to query the details of one or more instances in a specified region.

Operation description

The details include the server name, public IP address, internal IP address, creation time, and expiration time.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

swas-open:ListInstances

get

Instance

acs:swas-open:{#regionId}:{#accountId}:instance/*

*Instance

acs:swas-open:{#regionId}:{#accountId}:instance/{#InstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the Simple Application Server instance.

cn-hangzhou

InstanceIds

string

No

The IDs of the Simple Application Server instances. The value can be a JSON array of up to 100 instance IDs. Separate multiple IDs with commas (,).

Note

If you specify both the InstanceIds and PublicIpAddresses parameters, make sure that the IDs and public IP addresses belong to the same server. Otherwise, an empty value willl be returned.

["2ad1ae67295445f598017499dc****", "2ad1ae67295445f598017123dc****"]

ChargeType

string

No

The billing method. Valid: PrePaid. Servers support only the subscription billing method.

Default: PrePaid

PrePaid

PublicIpAddresses

string

No

The public IP addresses of the server. The value can be a JSON array of up to 100 public IP addresses. Separate multiple IP addresses with commas (,).

Note

If you specify both the InstanceIds and PublicIpAddresses parameters, make sure that the IDs and public IP addresses belong to the same server. Otherwise, an empty value is returned.

["42.1.**.**", "42.2.**.**"]

PageNumber

integer

No

The page number of the list of Simple Application Server instances.

Default: 1

1

PageSize

integer

No

The number of entries to return on each page. Maximum: 100.

Default: 10

10

Status

string

No

The status of the instance. Valid:

  • Pending: The instance is being prepared.

  • Starting: The instance is being started.

  • Running: The instance is running.

  • Stopping: The instance is being stopped.

  • Stopped: The instance is stopped.

  • Resetting: The instance is being reset.

  • Upgrading: The instance is being upgraded.

  • Disabled: The instance is unavailable.

Running

Tag

array<object>

No

The tags of the server.

object

No

A tag.

Key

string

No

The key of tag N. The tag key can be up to 64 characters in length. Valid values of N: 1 to 20.

TestKey

Value

string

No

The value of tag N. The tag value can be up to 64 characters in length. Valid values of N: 1 to 20.

TestValue

ResourceGroupId

string

No

The ID of the resource group to which the server belongs.

rg-aek2bti7cf7****

InstanceName

string

No

The name of the server. Fuzzy match with the asterisk (*) wildcard character is supported.

test

PlanType

string

No

The plan type. Valid:

  • NORMAL: General-purpose.

  • CAPACITY: High-capacity.

  • PREVIOUS: Previous generation.

  • MULTI_IP: Multiple public IP addresses.

  • INTERNATIONAL: International.

Note

For more information, see Instance families.

NORMAL

Response parameters

Parameter

Type

Description

Example

object

The information about the instances.

Instances

array<object>

An array that consists of the information about the server.

object

An array that consists of the information about the server.

Status

string

The status of the instance. Valid:

  • Pending: The instance is being prepared.

  • Starting: The instance is being started.

  • Running: The instance is running.

  • Stopping: The instance is being stopped.

  • Stopped: The instance is stopped.

  • Resetting: The instance is being reset.

  • Upgrading: The instance is being upgraded.

  • Disabled: The instance is unavailable.

Running

CreationTime

string

The time when the server was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-03-08T05:31:06Z

InnerIpAddress

string

The internal IP address.

172.26.XX.XX

ChargeType

string

The billing method.

PrePaid

InstanceId

string

The instance ID.

2ad1ae67295445f598017499dc****

PlanId

string

The plan ID.

swas.s2.c2m2s50b4t08

PublicIpAddress

string

The public IP address.

42.1.XX.XX

RegionId

string

The region ID.

cn-hangzhou

ExpiredTime

string

The time of expiration. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC.

2021-05-08T16:00:00Z

InstanceName

string

The server name.

test-InstanceName

BusinessStatus

string

The status of the server. Valid:

  • Normal: The server is normal.

  • Expired: The server has expired.

  • Overdue: The payment for the server is overdue.

Normal

DdosStatus

string

The DDoS protection status. Valid:

  • Normal: The instance is not under DDoS attacks.

  • BlackHole: Black Hole Activated.

  • Defense: Cleaning.

Normal

ImageId

string

The image ID.

fe9c66133a9d4688872869726b52****

DisableReason

string

The reason why the server is disabled. Valid:

  • FINANCIAL: The instance is locked due to an overdue payment.

  • SECURITY: The instance is locked for security reasons.

  • EXPIRED: The instance has expired.

EXPIRED

Combination

boolean

Indicates whether the server is a bundle.

false

CombinationInstanceId

string

The ID of the bundle.

com-f6c9a22****45b5b8de68ad608af1ba

Uuid

string

The UUID of the instance.

41f30524-5df7-49c9-9c6e-32****489001

ResourceSpec

object

The resource specifications.

DiskCategory

string

The disk type. Valid:

  • ESSD: an enhanced SSD (ESSD) at performance level (PL) 0.

  • SSD: a standard SSD.

  • CLOUD_EFFICIENCY: an ultra disk.

ESSD

Cpu

integer

The number of vCPUs.

2

Bandwidth

integer

The bandwidth. Unit: Mbit/s.

200

DiskSize

integer

The disk size. Unit: GiB.

60

Memory

number

The memory size. Unit: GiB.

2

Flow

number

The data transfer quota.

  • A value of 0 indicates that the instance is a bandwidth-based instance.

  • A non-zero value indicates that the instance is a data transfer plan-based instance.

818

Image

object

The description of the image.

OsType

string

The OS type.

windows

ImageName

string

The image name.

test-custom-1686536882356

ImageVersion

string

The image version.

V3.5

ImageType

string

The image type. Valid:

  • system: OS image.

  • app: application image.

  • custom: custom image.

system

ImageIconUrl

string

The URL of the image icon.

https://img.alicdn.com/imgextra/i3/O****1vdh9651ReKqWNMI2I_!!6000000002136****-24-24.svg

ImageContact

string

The image provider.

https://selfs****e.console.aliyun.com/ticket/createIndex

Tags

array<object>

The tags of the server.

object

A tag.

Key

string

The key of the tag.

TestKey

Value

string

The value of the tag.

TestValue

Disks

array<object>

An array that consists of the information about the disks of the Simple Application Server instance.

object

The disk information.

CreationTime

string

The time when the instance was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-02-24T02:20:10Z

Status

string

The disk status. Valid:

  • ReIniting: The disk is being initialized.

  • Creating: The disk is being created.

  • In_use: The disk is in use.

  • Available: The disk is to be mounted.

  • Attaching: The disk is being attached.

  • Detaching: The disk is being detached.

In_use

Device

string

The device name of the disk in the server.

/dev/xvda

Size

integer

The disk size. Unit: GiB.

50

DiskName

string

The disk name.

SystemDisk

DiskChargeType

string

The billing method of the disk.

PrePaid

DiskType

string

The disk type. Valid:

  • system: system disk.

  • data: data disk.

system

Category

string

The disk type. Valid:

  • ESSD: an enhanced SSD (ESSD) at performance level (PL) 0.

  • SSD: a standard SSD.

  • CLOUD_EFFICIENCY: an ultra disk.

ESSD

DiskId

string

The disk ID.

d-bp14wq0149cpp2x****

RegionId

string

The region ID.

cn-hangzhou

Remark

string

The remarks of the disk.

remark

DiskTags

array<object>

The tags of the disk.

object

The tag information.

Key

string

The tag key.

TestKey

Value

string

The tag value.

TestValue

ResourceGroupId

string

The ID of the resource group to which the disk belongs.

rg-aek2bti7cf7****

ResourceGroupId

string

The ID of the resource group to which the instance belongs.

rg-aekz7jmhg5s****

NetworkAttributes

array<object>

The network information.

object

The network information.

PublicIpAddress

string

The public IP address.

116.62.XX.XX

PrivateIpAddress

string

The private IP address.

72.25.XX.XX

PeakBandwidth

integer

The peak bandwidth of the public network. Unit: Mbit/s.

200

PublicIpDdosStatus

string

The DDoS protection status of the public IP address.

normal

PlanType

string

The plan type. Valid:

  • NORMAL: General-purpose.

  • CAPACITY: High-capacity.

  • PREVIOUS: Previous generation.

  • MULTI_IP: Multiple public IP addresses.

  • INTERNATIONAL: International.

Note

For more information, see Instance families.

NORMAL

TotalCount

integer

The total number of queried instances.

1

RequestId

string

The request ID.

20758A-585D-4A41-A9B2-28DA8F4F****

PageSize

integer

The number of entries returned per page.

10

PageNumber

integer

The page number of the list of Simple Application Server instances.

1

Examples

Success response

JSON format

{
  "Instances": [
    {
      "Status": "Running",
      "CreationTime": "2021-03-08T05:31:06Z",
      "InnerIpAddress": "172.26.XX.XX",
      "ChargeType": "PrePaid",
      "InstanceId": "2ad1ae67295445f598017499dc****",
      "PlanId": "swas.s2.c2m2s50b4t08",
      "PublicIpAddress": "42.1.XX.XX",
      "RegionId": "cn-hangzhou",
      "ExpiredTime": "2021-05-08T16:00:00Z",
      "InstanceName": "test-InstanceName",
      "BusinessStatus": "Normal",
      "DdosStatus": "Normal",
      "ImageId": "fe9c66133a9d4688872869726b52****",
      "DisableReason": "EXPIRED",
      "Combination": false,
      "CombinationInstanceId": "com-f6c9a22****45b5b8de68ad608af1ba",
      "Uuid": "41f30524-5df7-49c9-9c6e-32****489001",
      "ResourceSpec": {
        "DiskCategory": "ESSD",
        "Cpu": 2,
        "Bandwidth": 200,
        "DiskSize": 60,
        "Memory": 2,
        "Flow": 818
      },
      "Image": {
        "OsType": "windows",
        "ImageName": "test-custom-1686536882356",
        "ImageVersion": "V3.5",
        "ImageType": "system",
        "ImageIconUrl": "https://img.alicdn.com/imgextra/i3/O****1vdh9651ReKqWNMI2I_!!6000000002136****-24-24.svg",
        "ImageContact": "https://selfs****e.console.aliyun.com/ticket/createIndex"
      },
      "Tags": [
        {
          "Key": "TestKey",
          "Value": "TestValue"
        }
      ],
      "Disks": [
        {
          "CreationTime": "2023-02-24T02:20:10Z",
          "Status": "In_use",
          "Device": "/dev/xvda",
          "Size": 50,
          "DiskName": "SystemDisk",
          "DiskChargeType": "PrePaid",
          "DiskType": "system",
          "Category": "ESSD",
          "DiskId": "d-bp14wq0149cpp2x****",
          "RegionId": "cn-hangzhou",
          "Remark": "remark",
          "DiskTags": [
            {
              "Key": "TestKey",
              "Value": "TestValue"
            }
          ],
          "ResourceGroupId": "rg-aek2bti7cf7****\n"
        }
      ],
      "ResourceGroupId": "rg-aekz7jmhg5s****",
      "NetworkAttributes": [
        {
          "PublicIpAddress": "116.62.XX.XX",
          "PrivateIpAddress": "72.25.XX.XX",
          "PeakBandwidth": 200,
          "PublicIpDdosStatus": "normal"
        }
      ],
      "PlanType": "NORMAL"
    }
  ],
  "TotalCount": 1,
  "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F****",
  "PageSize": 10,
  "PageNumber": 1
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidChargeType.ValueNotSupported The specified parameter ChargeType is invalid.
400 InvalidPublicIpAddresses.ValueNotSupported The specified parameter PublicIpAddresses is invalid.
500 InternalError An error occurred while processing your request.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.