DescribeApplicationInstances

Updated at:

Queries a list of application instances.

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 supports 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

sae:DescribeApplicationInstances

get

*All Resource

*

None None

Request syntax

GET /pop/v1/sam/app/describeApplicationInstances HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The application ID.

d700e680-aa4d-4ec1-afc2-6566b5ff****

GroupId

string

Yes

The application group ID. You can call the DescribeApplicationGroups operation to obtain the ID.

b2a8a925-477a-4ed7-b825-d5e22500****

CurrentPage

integer

No

The current page number.

1

PageSize

integer

No

The paging Settings for the number of entries to return on each page in a paged query. Default value: 10. Valid values: (0, 1000000000).

10

Reverse

boolean

No

Specifies whether to sort application instances in reverse order based on their running status. If the statuses are the same, the instances are sorted by instance ID. Valid values:

  • true: Sorts the instances in descending order.

  • false: Sorts the instances in ascending order.

The ascending order of instance statuses is as follows:

  1. Error: An error occurred during instance startup.

  2. CrashLoopBackOff: The container failed to start, encountered an error during startup, and failed again after a restart.

  3. ErrImagePull: An error occurred while pulling the container image for the instance.

  4. ImagePullBackOff: The container image cannot be obtained.

  5. Pending: The instance is waiting to be scheduled.

  6. Unknown: An unknown exception occurred.

  7. Terminating: The instance is being terminated.

  8. NotFound: The instance cannot be found.

  9. PodInitializing: The instance is being initialized.

  10. Init:0/1: The instance is initializing.

  11. Running: The instance is running.

true

InstanceId

string

No

The application instance ID.

demo-faaca66c-5959-45cc-b3bf-d26093b2e9c0******

PipelineId

string

No

The batch ID. You can call the DescribeChangeOrder operation to obtain the ID.

85750d48-6cfc-4dbf-8ea0-840397******

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The request ID.

91F93257-7A4A-4BD3-9A7E-2F6EAE6D****

Message

string

The additional information about the call result.

success

TraceId

string

The trace ID, which is used to accurately query call information.

0a98a02315955564772843261e****

Data

object

The application instance information.

CurrentPage

integer

The current page number.

1

TotalSize

integer

The total number of instances.

10

PageSize

integer

The paging Settings for the number of entries returned on each page in a paged query.

10

Instances

array<object>

The list of application instances.

array<object>

The list of application instances.

CreateTimeStamp

integer

The timestamp when the instance started to be created. Unit: milliseconds.

1558442609000

VSwitchId

string

The zone where the instance resides.

vsw-***

InstanceContainerStatus

string

The running status of the instance. Valid values:

  • Error: An error occurred during instance startup.

  • CrashLoopBackOff: The container failed to start, encountered an error during startup, and failed again after a restart.

  • ErrImagePull: An error occurred while pulling the container image for the instance.

  • ImagePullBackOff: The container image cannot be obtained.

  • Pending: The instance is waiting to be scheduled.

  • Unknown: An unknown exception occurred.

  • Terminating: The instance is being terminated.

  • NotFound: The instance cannot be found.

  • PodInitializing: The instance is being initialized.

  • Init:0/1: The instance is initializing.

  • Running: The instance is running.

Running

InstanceHealthStatus

string

The health check configuration information. Valid values:

  • WithoutHealthCheckConfig: Neither liveness nor readiness health checks are configured.

  • WithoutLivenessConfig: The liveness health check is not configured.

  • WithoutReadinessConfig: The readiness health check is not configured.

  • NotCheckedYet: The instance is undergoing or waiting for a health check.

  • LivenessUnhealthy: The liveness health check failed, and the instance is unhealthy.

  • ReadinessUnhealthy: The readiness health check failed, and the instance is unhealthy.

  • Unhealthy: Both liveness and readiness health checks failed, and the instance is unhealthy.

  • Healthy: The health checks passed, and the instance is healthy.

WithoutHealthCheckConfig

InstanceContainerRestarts

integer

The number of times the instance has been restarted.

0

GroupId

string

The ID of the group to which the instance belongs.

b2a8a925-477a-4ed7-b825-d5e22500****

InstanceContainerIp

string

The internal IP address of the instance.

192.168.X.X

InstanceId

string

The instance ID.

b2a8a925-477a-4ed7-b825-d5e22500****

ImageUrl

string

The image repository address.

Note

If you deploy the application by using a JAR package or a WAR package, the image generated by the Serverless App Engine platform is not available for public download.

registry-vpc.cn-beijing.aliyuncs.com/sae-demo-image/cartservice:1.0

PackageVersion

string

The version information.

1609939496200

Timestamp

integer

The timestamp.

1750061980000

Eip

string

The elastic IP address.

8.129.XX.XXX

FinishTimeStamp

integer

The timestamp when the instance creation was completed. Unit: milliseconds.

1642757283000

DebugStatus

boolean

Indicates whether the instance is being debugged. Valid values:

  • True: Yes.

  • False: No.

False

SidecarContainersStatus

array<object>

The sidecar container status information.

object

The sidecar container status information.

ContainerId

string

The sidecar container ID.

sidecar-test-01

ContainerStatus

string

The container status.

Running

ImageUrl

string

The image address.

registry.cn-beijing.aliyuncs.com/sae-dev-test/******

MainContainerStatus

string

The main container status.

Running

UnhealthyMessage

string

The specific cause or error message returned when the health check of the application instance fails. If the health check passes, this field returns no information.

TrafficStatus

string

The traffic status.

suspend

Tags

array<object>

The tag information.

object

Key

string

The tag key.

k1

Value

string

The tag value.

v1

ErrorCode

string

The error code. Valid values:

  • If the request is successful, the ErrorCode field is not returned.

  • If the request fails, the ErrorCode field is returned. For more information, see the Error codes section in this topic.

Code

string

The API status code or POP error code. Valid values:

  • 2xx: Success.

  • 3xx: Redirect.

  • 4xx: Request error.

  • 5xx: Server error.

200

Success

boolean

Indicates whether the application instance list was successfully obtained. Valid values:

  • true: The list was successfully obtained.

  • false: The list failed to be obtained.

true

Examples

Success response

JSON format

{
  "RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "Message": "success",
  "TraceId": "0a98a02315955564772843261e****",
  "Data": {
    "CurrentPage": 1,
    "TotalSize": 10,
    "PageSize": 10,
    "Instances": [
      {
        "CreateTimeStamp": 1558442609000,
        "VSwitchId": "vsw-***",
        "InstanceContainerStatus": "Running",
        "InstanceHealthStatus": "WithoutHealthCheckConfig",
        "InstanceContainerRestarts": 0,
        "GroupId": "b2a8a925-477a-4ed7-b825-d5e22500****",
        "InstanceContainerIp": "192.168.X.X",
        "InstanceId": "b2a8a925-477a-4ed7-b825-d5e22500****",
        "ImageUrl": "registry-vpc.cn-beijing.aliyuncs.com/sae-demo-image/cartservice:1.0",
        "PackageVersion": "1609939496200",
        "Timestamp": 1750061980000,
        "Eip": "8.129.XX.XXX",
        "FinishTimeStamp": 1642757283000,
        "DebugStatus": true,
        "SidecarContainersStatus": [
          {
            "ContainerId": "sidecar-test-01",
            "ContainerStatus": "Running",
            "ImageUrl": "registry.cn-beijing.aliyuncs.com/sae-dev-test/******"
          }
        ],
        "MainContainerStatus": "Running",
        "UnhealthyMessage": "",
        "TrafficStatus": "suspend",
        "Tags": [
          {
            "Key": "k1",
            "Value": "v1"
          }
        ]
      }
    ]
  },
  "ErrorCode": "",
  "Code": "200",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.