All Products
Search
Document Center

Edge Security Acceleration:CreateWafRuleset

Last Updated:Jun 11, 2026

Membuat ruleset WAF.

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

esa:CreateWafRuleset

create

*Site

acs:esa:{#regionId}:{#accountId}:site/{#SiteId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

SiteId

integer

Yes

ID situs. Untuk mendapatkan ID ini, panggil operasi ListSites.

1

SiteVersion

integer

No

Versi konfigurasi situs. Parameter ini hanya berlaku jika Pengendalian versi diaktifkan untuk situs. Nilai default adalah 0.

0

Phase

string

Yes

Fase eksekusi aturan WAF. Nilai valid:

  • http_whitelist

  • http_custom

  • http_managed

  • http_anti_scan

  • http_ratelimit

  • ip_access_rule

  • http_bot

  • http_security_level_rule.

http_custom

Name

string

No

Nama ruleset WAF.

example

Elemen respons

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

36af3fcc-43d0-441c-86b1-428951dc8225

Id

integer

The ruleset ID.

10000001

Contoh

Respons sukses

JSONformat

{
  "RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
  "Id": 10000001
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is invalid.
400 InternalException Failed to call the service. Try again later or contact technical support.
400 SpecifiedVersionReadOnly The specified version number is read-only and cannot be modified.
403 %s.NotSupport The specified resource type %s is not supported.
403 %s.OverQuota The quantity of %s exceeds the quota.
403 %s.WrongValueMatched The value of specified parameter %s can not pass the matching check.
403 Expression.Invalid The specified expression is invalid: %s.
403 Site.NotExist The specified website does not exist or is not recognized by the system.Check whether the specified website identifier is valid and matches a website that is active, defined, and recognized by the system.If you want to add a new website, make sure that the creation and registration process is complete to integrate the website to the system.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.