All Products
Search
Document Center

Simple Application Server:ListInstances

Last Updated:Apr 17, 2024

Queries the information about simple application servers in a region.

Operation description

You can call this operation to query the details of simple application servers in a specified region, including the names, public IP addresses, internal IP addresses, creation time, and expiration time of the servers.

QPS limit

You can call this API operation up to 10 times per minute per account. Requests that exceed this limit are dropped and you may experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the simple application servers.

cn-hangzhou
InstanceIdsstringNo

The IDs of the simple application servers. The value can be a JSON array that consists of up to 100 simple application server IDs. Separate multiple server IDs with commas (,).

Note If you specify both InstanceIds and PublicIpAddresses, make sure that the specified IDs and the specified public IP addresses belong to the same simple application servers. Otherwise, an empty result is returned.
["2ad1ae67295445f598017499dc****", "2ad1ae67295445f598017123dc****"]
ChargeTypestringNo

The billing method of the simple application servers. Set the value to PrePaid, which indicates the subscription billing method.

Default value: PrePaid.

PrePaid
PublicIpAddressesstringNo

The public IP addresses of the simple application servers. The value can be a JSON array that consists of up to 100 IP addresses. Separate multiple IP addresses with commas (,).

Note If you specify both InstanceIds and PublicIpAddresses, make sure that the specified IDs and the specified public IP addresses belong to the same simple application servers. Otherwise, an empty result is returned.
["42.1.**.**", "42.2.**.**"]
PageNumberintegerNo

The page number.

Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Maximum value: 100.

Default value: 10.

10
StatusstringNo

The status of the simple application server. Valid values:

  • Pending
  • Starting
  • Running
  • Stopping
  • Stopped
  • Resetting
  • Upgrading
  • Disabled
Running
Tagobject []No

The tag.

You can add at most 20 tags to an instance.

KeystringNo

The tag key. The tag key can be up to 128 characters in length, and cannot start with acs: or aliyun. It cannot contain http:// or https://.

test
ValuestringNo

The tag value.

01

Response parameters

ParameterTypeDescriptionExample
object

Schema of response.

Instancesobject []

Details about the simple application servers.

Statusstring

The status of the simple application server. Valid values:

  • Pending
  • Starting
  • Running
  • Stopping
  • Stopped
  • Resetting
  • Upgrading
  • Disabled
Running
CreationTimestring

The time when the simple application 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
InnerIpAddressstring

The internal IP address of the simple application server.

172.26.XX.XX
ChargeTypestring

The billing method of the simple application server.

PrePaid
InstanceIdstring

The ID of the simple application server.

2ad1ae67295445f598017499dc****
PlanIdstring

The plan ID.

swas.s2.c2m2s50b4t08
PublicIpAddressstring

The public IP address of the server.

42.1.XX.XX
RegionIdstring

The region ID of the servers.

cn-hangzhou
ExpiredTimestring

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

2021-05-08T16:00:00Z
InstanceNamestring

The name of the server.

test-InstanceName
BusinessStatusstring

The status of the server. Valid values:

  • Normal: The server is normal.
  • Expired: The server expires.
  • Overdue: The payment of the server is overdue.
Normal
DdosStatusstring

The DDoS protection status of the server. Valid values:

  • Normal: The DDoS protection status of the server is normal.
  • BlackHole: The server is in blackhole filtering.
  • Defense: The server is being scrubbed.
Normal
ImageIdstring

The ID of an image.

fe9c66133a9d4688872869726b52****
DisableReasonstring

The reason why the server is disabled. Valid values:

  • FINANCIAL: The server is locked due to overdue payments.
  • SECURITY: The server is locked due to security reasons.
  • EXPIRED: The server has expired.
EXPIRED
Combinationboolean

Indicates whether the plan is a bundle plan.

false
CombinationInstanceIdstring

The ID of the bundle plan.

com-f6c9a22****45b5b8de68ad608af1ba
Uuidstring

The universally unique identifier (UUID) of the server.

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

The specifications of the resource.

DiskCategorystring

The category of the disk. Valid values:

  • ESSD: an enhanced SSD (ESSD) at performance level 0 (PL0).
  • SSD: a standard SSD.
  • CLOUD_EFFICIENCY: an ultra disk.
cloud_efficiency
Cpuinteger

The number of vCPUs.

2
Bandwidthinteger

The bandwidth of the server.

5
DiskSizeinteger

The disk size.

60
Memorydouble

The memory size.

2
Flowdouble

The amount of the traffic.

  • A value of 0 indicates that the server is a bandwidth-based server.
  • A value of none-zero indicates that the server is a data transfer plan-based server.
818
Imageobject

The description of the image.

OsTypestring

The OS.

windows
ImageNamestring

The image name.

test-custom-1686536882356
ImageVersionstring

The image tag.

V3.5
ImageTypestring

The image type. Valid values:

  • system
  • app
  • custom
system
ImageIconUrlstring

The URL of the image icon.

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

The image provider.

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

The tags.

Keystring

The key of tag N to be added to the simple application server. Valid values of N: 1 to 20.

TestKey
Valuestring

The value of tag N to be added to the simple application server. Valid values of N: 1 to 20.

TestValue
Disksobject []

Details about the disks.

CreationTimestring

The time when the Disk 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
Statusstring

The status of the disk. Valid values:

  • ReIniting: The disk is being initialized.
  • Creating: The disk is being created.
  • In_Use: The disk is being used.
  • Available: The disk can be attached.
  • Attaching: The disk is being attached.
  • Detaching: The disk is being detached.
In_use
Devicestring

The device name of the disk on the simple application server.

/dev/xvda
Sizeinteger

The size of the disk. Unit: GB.

50
DiskNamestring

The name of the disk.

SystemDisk
DiskChargeTypestring

The billing method of the disk.

PrePaid
DiskTypestring

The type of the disk. Valid values:

  • System: system disk.
  • Data: data disk.
System
Categorystring

The category of the disk. Valid values:

  • ESSD: an enhanced SSD (ESSD) at performance level 0 (PL0).
  • SSD: a standard SSD.
  • CLOUD_EFFICIENCY:an ultra disk.
ESSD
DiskIdstring

The ID of the disk.

d-bp14wq0149cpp2x****
RegionIdstring

The region ID of the disks.

cn-hangzhou
Remarkstring

Description about the disk.

remark
DiskTagsobject []

The tags of the disk.

Keystring

The key of tag N to be added to the disk. Valid values of N: 1 to 20.

TestKey
Valuestring

The value of tag N to be added to the disk. Valid values of N: 1 to 20.

TestValue
TotalCountinteger

The total number of entries returned.

1
RequestIdstring

The request ID.

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

The number of entries per page.

10
PageNumberinteger

The page number.

1

Examples

Sample success responses

JSONformat

{
  "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": "cloud_efficiency",
        "Cpu": 2,
        "Bandwidth": 5,
        "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"
            }
          ]
        }
      ]
    }
  ],
  "TotalCount": 1,
  "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F****",
  "PageSize": 10,
  "PageNumber": 1
}

Error codes

HTTP status codeError codeError message
400InvalidChargeType.ValueNotSupportedThe specified parameter ChargeType is invalid.
400InvalidPublicIpAddresses.ValueNotSupportedThe specified parameter PublicIpAddresses is invalid.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.
500InternalErrorAn error occurred while processing your request.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-20The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.
2024-01-17The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Tag
2023-09-18API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 500
2023-07-19The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Status
2023-05-25The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.