All Products
Search
Document Center

Serverless App Engine:ListAppServices

Last Updated:Jun 11, 2026

Menampilkan daftar layanan mikro.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

sae:ListAppServices

list

*全部资源

*

None None

Sintaks permintaan

GET /pop/v1/sam/service/listAppServices HTTP/1.1

Parameter permintaan

Parameter

Type

Required

Description

Example

AppId

string

No

ID aplikasi. Tentukan tepat satu dari parameter berikut: VpcId, NamespaceId, atau AppId.

017f39b8-dfa4-4e16-a84b-1dcee4b1****

ServiceType

string

No

Tipe layanan. Nilai valid:

  • dubbo

  • springCloud

  • hsf

  • k8sService.

springCloud

RegistryType

string

No

Tipe registrasi layanan. Nilai valid:

  • 0: SAE Pusat Registrasi Nacos

  • 1: registrasi layanan mandiri

  • 2: MSE Pusat Registrasi Nacos

  • 9: SAE K8s Service.

0

NacosInstanceId

string

No

ID instans MSE Pusat Registrasi Nacos. Parameter ini wajib diisi jika registrasi layanan adalah MSE Pusat Registrasi Nacos.

mse-cn-sco3r0u****

NacosNamespaceId

string

No

ID namespace MSE Pusat Registrasi Nacos. Parameter ini wajib diisi jika registrasi layanan adalah MSE Pusat Registrasi Nacos.

mse-test

PageNumber

integer

No

Nomor halaman.

1

PageSize

integer

No

Jumlah entri per halaman.

10

VpcId

string

No

ID VPC. Tentukan tepat satu dari parameter berikut: VpcId, NamespaceId, atau AppId.

vpc-2ze0i263cnn311nvj****

NamespaceId

string

No

ID namespace. Tentukan tepat satu dari parameter berikut: VpcId, NamespaceId, atau AppId.

cn-beijing:test

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

Message

string

The response message.

  • If the request is successful, success is returned.

  • If the request fails, an error message is returned.

success

TraceId

string

The trace ID. You can use this ID to query the details of a call.

0a98a02315955564772843261e****

Data

array<object>

The list of services.

array<object>

The details of a service.

ServiceName

string

The name of the service.

frontend

ServiceGroup

string

The service group.

DEFAULT_GROUP

ServiceVersion

string

The version of the service.

1.0.0

InstanceCount

string

The number of instances of the service.

1

ServiceType

string

The type of the service. Valid values:

  • dubbo

  • springCloud

  • hsf

  • k8sService

springCloud

ServiceProtocol

string

The protocol used by the service.

HTTP

ServicePorts

array

A list of ports.

integer

The port number.

8000

ServicePortAndProtocol

object

A map of ports and protocols.

string

A port and protocol pair.

8000:TCP

RegistryType

string

The type of the service registry. Valid values:

  • 0: SAE Nacos

  • 1: self-managed registry

  • 2: MSE Nacos

  • 9: SAE K8s Service

0

NamespaceId

string

The ID of the namespace that contains the app.

cn-beijing:test

NamespaceName

string

The name of the namespace.

Test namespace

AppId

string

The app ID.

0099b7be-5f5b-4512-a7fc-56049ef1****

AppName

string

The name of the app.

demo-app

SecurityGroupId

string

The security group ID.

sg-wz969ngg2e49q5i4****

ErrorCode

string

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

  • Successful requests do not return the ErrorCode field.

  • Failed requests return the ErrorCode field. For more information, see the error code list in this topic.

Code

string

The HTTP status code or a POP error code. Valid values:

  • 2xx: The request is successful.

  • 3xx: The request is redirected.

  • 4xx: The request is invalid.

  • 5xx: A server error occurred.

200

Success

boolean

Indicates whether the call was successful. Valid values:

  • true: The call was successful.

  • false: The call failed.

true

Contoh

Respons sukses

JSONformat

{
  "RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "Message": "success",
  "TraceId": "0a98a02315955564772843261e****",
  "Data": [
    {
      "ServiceName": "frontend",
      "ServiceGroup": "DEFAULT_GROUP",
      "ServiceVersion": "1.0.0",
      "InstanceCount": "1",
      "ServiceType": "springCloud",
      "ServiceProtocol": "HTTP",
      "ServicePorts": [
        8000
      ],
      "ServicePortAndProtocol": {
        "key": "8000:TCP"
      },
      "RegistryType": "0",
      "NamespaceId": "cn-beijing:test",
      "NamespaceName": "Test namespace",
      "AppId": "0099b7be-5f5b-4512-a7fc-56049ef1****",
      "AppName": "demo-app",
      "SecurityGroupId": "sg-wz969ngg2e49q5i4****"
    }
  ],
  "ErrorCode": "",
  "Code": "200",
  "Success": true
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 Micro.Service.NotFound The micro service not found {%s}.
400 InvalidParameter.Obviously The specified parameter is invalid {%s}.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.