All Products
Search
Document Center

Serverless App Engine:CreateNamespace

Last Updated:Jun 11, 2026

Membuat namespace.

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

create

*全部资源

*

None None

Sintaks permintaan

POST /pop/v1/paas/namespace HTTP/1.1

Parameter permintaan

Parameter

Type

Required

Description

Example

NamespaceId

string

No

ID namespace format panjang. Jika Anda menentukan parameter ini, NameSpaceShortId akan diabaikan. Parameter ini dipertahankan untuk kompatibilitas. Gunakan ID namespace format pendek sebagai gantinya. Formatnya adalah <RegionId>:<NamespaceId>. NamespaceId hanya dapat berisi huruf kecil dan digit, serta tidak boleh melebihi 32 karakter. Contoh: ap-southeast-1:test. Untuk informasi mengenai wilayah yang didukung SAE, lihat DescribeRegions.

cn-beijing:test

NamespaceName

string

Yes

Nama namespace. Nama tidak boleh melebihi 64 karakter.

name

NamespaceDescription

string

No

Deskripsi namespace. Deskripsi tidak boleh melebihi 100 karakter.

desc

NameSpaceShortId

string

No

ID namespace format pendek. Anda tidak perlu menentukan ID wilayah. Parameter ini direkomendasikan. ID tidak boleh melebihi 20 karakter dan hanya dapat berisi huruf kecil serta digit.

test

EnableMicroRegistration

boolean

No

Apakah akan mengaktifkan registrasi layanan bawaan SAE.

  • true

  • false

Nilai default: true. Jika Anda tidak menggunakan registrasi layanan bawaan, atur parameter ini menjadi false untuk mempercepat pembuatan namespace.

true

Elemen respons

Element

Type

Description

Example

object

The returned data.

RequestId

string

The request ID.

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

Message

string

The additional information returned.

success

TraceId

string

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

0a981dd515966966104121683d****

Data

object

The information about the namespace.

NamespaceDescription

string

The description of the namespace.

desc

NamespaceId

string

The ID of the namespace.

cn-beijing:test

NamespaceName

string

The name of the namespace.

name

RegionId

string

The region where the namespace resides.

cn-beijing

NameSpaceShortId

string

The short-format namespace ID.

test

EnableMicroRegistration

boolean

Indicates whether the built-in service registry of SAE is enabled.

  • true

  • false

true

ErrorCode

string

The error code.

  • If the request is successful, this parameter is not returned.

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

Code

string

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

  • 2xx: The request was successful.

  • 3xx: The request was redirected.

  • 4xx: A request error occurred.

  • 5xx: A server error occurred.

200

Success

boolean

Indicates whether the namespace was successfully created. Valid values:

  • true: The namespace was created.

  • false: The namespace failed to be created.

true

Contoh

Respons sukses

JSONformat

{
  "RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "Message": "success",
  "TraceId": "0a981dd515966966104121683d****",
  "Data": {
    "NamespaceDescription": "desc",
    "NamespaceId": "cn-beijing:test",
    "NamespaceName": "name",
    "RegionId": "cn-beijing",
    "NameSpaceShortId": "test",
    "EnableMicroRegistration": true
  },
  "ErrorCode": "",
  "Code": "200",
  "Success": true
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InstanceExist.NamespaceId The specified namespace ID already exists.
400 InvalidNamespace.WithUppercase This namespace does not support creating SAE apps because it contains uppercase letters.
400 InvalidNamespaceId.Format The specified NamespaceId is invalid.
400 InvalidNamespaceIdSuffix.Format The specified NamespaceId is invalid. NamespaceId can only contain alphabetical letters or numbers.
400 InvalidNamespaceName.Format The specified NamespaceName is invalid. The name of the namespace cannot exceed 63 characters in length.
400 InvalidOperation.NamespaceClusterNotDeleted The specified NamespaceId contains clusters.
400 Namespace.AppExists Please delete the application first.
400 System.Upgrading The system is being upgraded. Please try again later.
400 Exceed.Namespace Too many namespaces have been created.
500 OperationFailed.DauthHttpRequest request dauth failed.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.