ListApplications

更新时间:
复制 MD 格式

Get a list of applications.

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:ListApplications

get

*All Resource

*

None None

Request syntax

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

Request parameters

Parameter

Type

Required

Description

Example

CurrentPage

integer

No

The current page number.

1

PageSize

integer

No

The number of entries to return per page. Valid values: 0 to 10000.

20

AppName

string

No

The application name.

demo-app

NamespaceId

string

No

The namespace ID.

cn-beijing:demo

Tags

string

No

Filters applications by tags. The tags are specified as a JSON string that contains an array of key-value pairs.

  • key: The tag key, which can be 1 to 128 characters in length.

  • value: The tag value, which can be 1 to 128 characters in length.

This parameter is case-sensitive. An application is returned only if it matches all specified tags. On a resource, a tag key can have only one tag value.

The tag key and tag value cannot start with aliyun or acs: and cannot contain http:// or https://.

[{"key":"key","value":"value"}]

OrderBy

string

No

The field to sort the applications by. Valid values:

  • runnings: Sorts the applications by the current instance count.

  • instances: Sorts the applications by the target instance count.

runnings

Reverse

boolean

No

The sort order. Valid values:

  • true: Sorts the results in ascending order.

  • false: Sorts the results in descending order.

true

FieldType

string

No

The field to filter applications by. Valid values:

  • appName: The application name.

  • appIds: The application ID.

  • slbIps: The SLB IP address.

  • instanceIps: The instance IP address.

appName

FieldValue

string

No

The value for the field specified by FieldType. This can be an application name, application ID, SLB IP address, or instance IP address.

demo-app

AppSource

string

No

The type of the SAE application.

  • micro_service

  • web

  • job

micro_service

IsStateful

string

No

Filters applications by whether they are stateful. Set this parameter to true to return only stateful applications, or to false to return only stateless applications.

NewSaeVersion

string

No

The edition of the application:

  • lite: Lite

  • std: Standard

  • pro: Pro

Response elements

Element

Type

Description

Example

object

The response data.

Message

string

Additional information about the call result.

success

RequestId

string

The unique ID of the request.

B4D805CA-926D-41B1-8E63-7AD0C1ED****

Data

object

The object that contains pagination details and the array of applications.

CurrentPage

integer

The current page number.

1

TotalSize

integer

The total number of applications.

2

PageSize

integer

The number of entries returned per page.

20

Applications

array<object>

An array of application objects.

array<object>

The details of an application.

AppName

string

The application name.

demo-app

NamespaceId

string

The ID of the namespace.

cn-beijing:demo

AppDeletingStatus

boolean

Indicates whether the application is being deleted. Valid values:

  • true: The application is being deleted.

  • false: The application is not being deleted.

false

AppId

string

The ID of the application.

f7730764-d88f-4b9a-8d8e-cd8efbfe****

Tags

array<object>

An array of tags assigned to the application.

object

The details of a tag.

Key

string

The tag key.

key

Value

string

The tag value.

value

RunningInstances

integer

The number of running instances.

2

Instances

integer

The configured number of application instances.

2

RegionId

string

The ID of the region where the application is deployed.

cn-beijing

AppDescription

string

The description of the application.

description

Cpu

integer

The CPU allocated to each instance, measured in millicores. This value cannot be 0. Valid values:

  • 500

  • 1000

  • 2000

  • 4000

  • 8000

  • 16000

  • 32000

1000

Mem

integer

The memory allocated to each instance, measured in megabytes (MB). This value cannot be 0 and must be compatible with the CPU allocation. The following options are available:

  • 1024: For a CPU allocation of 500 or 1,000 millicores.

  • 2048: For a CPU allocation of 500, 1,000, or 2,000 millicores.

  • 4096: For a CPU allocation of 1,000, 2,000, or 4,000 millicores.

  • 8192: For a CPU allocation of 2,000, 4,000, or 8,000 millicores.

  • 12288: For a CPU allocation of 12,000 millicores.

  • 16384: For a CPU allocation of 4,000, 8,000, or 16,000 millicores.

  • 24576: For a CPU allocation of 12,000 millicores.

  • 32768: For a CPU allocation of 16,000 millicores.

  • 65536: For a CPU allocation of 8,000, 16,000, or 32,000 millicores.

  • 131072: For a CPU allocation of 32,000 millicores.

1024

MseEnabled

boolean

Indicates whether Microservices Engine (MSE) is enabled for the application.

true

MseNamespaceId

string

The ID of the MSE namespace. This value determines the service edition.

  • default: Free edition

  • sae-pro: Professional edition

  • sae-ent: Enterprise edition

sae-ent

BaseAppId

string

The ID of the base application. This parameter is returned only for canary release applications.

xxx-xxx-xx-xxx

ProgrammingLanguage

string

The programming language of the application.

java

Children

array<object>

An array of canary release applications associated with this application.

array<object>

The details of a canary release application.

AppName

string

The name of the canary release application.

app1

NamespaceId

string

The namespace ID.

cn-beijing:demo

AppDeletingStatus

boolean

Indicates whether the canary release application is being deleted.

false

AppId

string

The ID of the canary release application.

xxx-xxx-xxx-xxx

ScaleRuleEnabled

boolean

Indicates whether an auto scaling policy is enabled.

false

ScaleRuleType

string

The type of the auto scaling policy.

timing

Tags

array<object>

An array of tags assigned to the canary release application.

object

The details of a tag object.

Key

string

The tag key.

key

Value

string

The tag value.

value

RunningInstances

integer

The number of running instances.

2

Instances

integer

The configured number of instances for the canary release application.

2

RegionId

string

The region ID.

cn-beijing

AppDescription

string

The application description.

Test application

Cpu

integer

The CPU specification.

2000

Mem

integer

The memory specification.

2048

MseEnabled

boolean

Indicates whether Microservices Engine (MSE) is enabled for the application.

true

BaseAppId

string

The ID of the base application.

ee99cce6-1c8e-4bfa-96c3-3e2fa9******

ProgrammingLanguage

string

The programming language of the application.

java

AppType

string

The application's deployment method.

Image

NamespaceName

string

The name of the namespace.

demo

IsStateful

boolean

Indicates whether the canary release application is stateful.

NewSaeVersion

string

The edition of the application:

  • lite: Lite

  • std: Standard

  • pro: Pro

pro

ResourceType

string

The resource type.

EnableIdle

string

Indicates if the application is configured to stop automatically when idle.

ImageUrl

string

The URL of the container image.

registry.cn-hangzhou.aliyuncs.com/sae-serverless-demo/sae-demo:microservice-java-provider-v1.0

PackageUrl

string

The URL of the application's deployment package.

https://sae-oss-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/apps/K8S_APP_ID/1421801774382676/adf2624a-66fd-4a2b-8caa-6921da******/hello-sae.jar

AppType

string

The application's deployment method.

Image

NamespaceName

string

The name of the namespace.

demo

IsStateful

boolean

Indicates whether the application is stateful.

NewSaeVersion

string

The edition of the application:

  • lite: Lite

  • std: Standard

  • pro: Pro

pro

EnableIdle

string

Indicates if the application is configured to stop automatically when idle.

false

DiskSize

integer

The disk size in GB.

20

VpcId

string

The ID of the VPC.

ResourceType

string

The resource type.

Labels

object

The labels of the application.

string

ErrorCode

string

The error code. This parameter is returned only if the request fails. For more information, see the Error codes section of this topic.

  • A successful request does not return the ErrorCode field.

  • A failed request returns the ErrorCode field. For more information, see the Error codes section in this topic.

Code

string

The HTTP status code. Valid values:

  • 2xx: The request was successful.

  • 3xx: The request was redirected.

  • 4xx: The request was invalid.

  • 5xx: A server error occurred.

200

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

CurrentPage

integer

Current page number.

1

TotalSize

integer

Total number of applications.

2

PageSize

integer

Page size.

20

Examples

Success response

JSON format

{
  "Message": "success",
  "RequestId": "B4D805CA-926D-41B1-8E63-7AD0C1ED****",
  "Data": {
    "CurrentPage": 1,
    "TotalSize": 2,
    "PageSize": 20,
    "Applications": [
      {
        "AppName": "demo-app",
        "NamespaceId": "cn-beijing:demo",
        "AppDeletingStatus": false,
        "AppId": "f7730764-d88f-4b9a-8d8e-cd8efbfe****",
        "Tags": [
          {
            "Key": "key",
            "Value": "value"
          }
        ],
        "RunningInstances": 2,
        "Instances": 2,
        "RegionId": "cn-beijing",
        "AppDescription": "description",
        "Cpu": 1000,
        "Mem": 1024,
        "MseEnabled": true,
        "MseNamespaceId": "sae-ent",
        "BaseAppId": "xxx-xxx-xx-xxx",
        "ProgrammingLanguage": "java",
        "Children": [
          {
            "AppName": "app1",
            "NamespaceId": "cn-beijing:demo",
            "AppDeletingStatus": false,
            "AppId": "xxx-xxx-xxx-xxx",
            "ScaleRuleEnabled": false,
            "ScaleRuleType": "timing",
            "Tags": [
              {
                "Key": "key",
                "Value": "value"
              }
            ],
            "RunningInstances": 2,
            "Instances": 2,
            "RegionId": "cn-beijing",
            "AppDescription": "Test application",
            "Cpu": 2000,
            "Mem": 2048,
            "MseEnabled": true,
            "BaseAppId": " ee99cce6-1c8e-4bfa-96c3-3e2fa9******",
            "ProgrammingLanguage": "java",
            "AppType": "Image",
            "NamespaceName": "demo",
            "IsStateful": false,
            "NewSaeVersion": "pro",
            "ResourceType": "",
            "EnableIdle": ""
          }
        ],
        "ImageUrl": "registry.cn-hangzhou.aliyuncs.com/sae-serverless-demo/sae-demo:microservice-java-provider-v1.0",
        "PackageUrl": "https://sae-oss-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/apps/K8S_APP_ID/1421801774382676/adf2624a-66fd-4a2b-8caa-6921da******/hello-sae.jar",
        "AppType": "Image",
        "NamespaceName": "demo",
        "IsStateful": false,
        "NewSaeVersion": "pro",
        "EnableIdle": "false",
        "DiskSize": 20,
        "VpcId": "",
        "ResourceType": "",
        "Labels": {
          "key": ""
        }
      }
    ]
  },
  "ErrorCode": "",
  "Code": "200",
  "Success": true,
  "CurrentPage": 1,
  "TotalSize": 2,
  "PageSize": 20
}

Error codes

HTTP status code

Error code

Error message

Description

400 Illegal.argument Illegal argument

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.