All Products
Search
Document Center

Web Application Firewall:ModifyCloudResource

Last Updated:Jun 09, 2026

Mengubah konfigurasi sumber daya cloud yang terhubung ke 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

yundun-waf:ModifyCloudResource

update

*DefenseResource

acs:yundun-waf:{#regionId}:{#accountId}:defenseresource/{#Resource}

DefenseResource

acs:yundun-waf:{#regionId}:{#accountId}:defenseresource/{#ResourceInstanceId}-{#Port}-{#Product}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

ID instans WAF.

Catatan

Panggil DescribeInstance untuk mengkueri ID instans WAF.

waf_v3prepaid_public_cn-***

ResourceManagerResourceGroupId

string

No

ID kelompok sumber daya.

rg-acfm***q

Listen

object

Yes

Konfigurasi pendengar.

TLSVersion

string

No

The Transport Layer Security (TLS) version. This parameter applies only when you use the HTTPS protocol. Valid values:

  • tlsv1

  • tlsv1.1

  • tlsv1.2

tlsv1.2

EnableTLSv3

boolean

No

Indicates whether TLS 1.3 is supported. This parameter applies only when you use the HTTPS protocol. Valid values:

  • true: TLS 1.3 is supported.

  • false: TLS 1.3 is not supported.

true

CipherSuite

integer

No

The type of the cipher suite to add. This parameter applies only when you use the HTTPS protocol. Valid values:

  • 1: adds all cipher suites.

  • 2: adds strong cipher suites. This value is available only when TLSVersion is set to tlsv1.2.

  • 99: adds custom cipher suites.

1

CustomCiphers

array

No

The custom cipher suites.

string

No

The custom cipher suites to add. This parameter is used only when CipherSuite is set to 99.

ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384

ResourceProduct deprecated

string

No

The type of the cloud service. Valid values:

  • clb4: Layer 4 Classic Load Balancer (CLB).

  • clb7: Layer 7 CLB.

  • ecs: Elastic Compute Service (ECS).

  • nlb: Network Load Balancer (NLB).

clb7

ResourceInstanceId deprecated

string

No

The ID of the cloud service instance.

lb-***

Port deprecated

integer

No

The listening port of the cloud service instance that is added to WAF.

80

Protocol

string

Yes

The protocol type. Valid values:

  • http: HTTP.

  • https: HTTPS.

http

Certificates

array<object>

No

The certificate information.

object

No

The certificate information.

CertificateId

string

No

The ID of the certificate.

123-cn-hangzhou

AppliedType

string

No

The type of the certificate for the HTTPS protocol. Valid values:

  • default: a default certificate.

  • extension: an extension certificate.

default

Http2Enabled

boolean

No

Indicates whether HTTP/2 is enabled. This parameter applies only when you use the HTTPS protocol. Valid values:

  • true: enables HTTP/2.

  • false (default): disables HTTP/2.

true

Redirect

object

No

Konfigurasi penerusan.

RequestHeaders

array<object>

No

The custom header fields used to mark traffic that is processed by WAF.

object

No

The value of this parameter is in the [{"k":"key","v":"value"}] format. key specifies the custom request header field, and value specifies the value of the field.

Catatan

If the custom header field already exists in the request, the original value is overwritten with the specified value.

Key

string

No

The custom request header field.

key1

Value

string

No

The value of the custom request header field.

value1

XffHeaderMode

integer

No

The method that WAF uses to obtain the real IP address of a client. Valid values:

  • 0: WAF obtains the real IP address of the client from the request. Use this value when no Layer 7 proxy resides before WAF.

  • 1: WAF reads the first value of the X-Forwarded-For (XFF) header as the client IP address.

  • 2: WAF reads the value of a custom header field as the client IP address.

0

XffHeaders

array

No

The custom header fields that are used to obtain the client IP address.

Catatan

This parameter is required only when XffHeaderMode is set to 2.

string

No

The name of the custom header field.

Catatan

This parameter is required only when XffHeaderMode is set to 2.

header1

ReadTimeout

integer

No

The read timeout period. Unit: seconds. Valid values: 1 to 3600.

1

WriteTimeout

integer

No

The write timeout period. Unit: seconds. Valid values: 1 to 3600.

1

Keepalive

boolean

No

Indicates whether persistent connections are enabled. Valid values:

  • true (default): enables persistent connections.

  • false: disables persistent connections.

true

KeepaliveRequests

integer

No

The maximum number of requests that can be served through one persistent connection. Valid values: 60 to 1000.

1000

KeepaliveTimeout

integer

No

The timeout period for an idle persistent connection. Valid values: 10 to 3600. Default value: 3600. Unit: seconds.

15

XffProto

boolean

No

Indicates whether the X-Forwarded-Proto header is used to pass the protocol used by WAF. Valid values:

  • true (default): passes the protocol.

  • false: does not pass the protocol.

true

MaxBodySize

integer

No

The maximum size of a request body. Valid values: 2 to 10. Default value: 2. Unit: GB.

2

RegionId

string

Yes

Wilayah instans WAF. Nilai valid:

  • cn-hangzhou: Tiongkok daratan.

  • ap-southeast-1: di luar Tiongkok daratan.

cn-hangzhou

CloudResourceId

string

No

ID sumber daya cloud yang ditambahkan ke WAF.

Catatan

Panggil CreateCloudResource untuk menambahkan sumber daya cloud. ID sumber daya disertakan dalam tanggapan.

lb-***-80-clb7

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The request ID.

D7861F61-5B61-46CE-A47C-***

CloudResource

string

The ID of the cloud resource that is added to WAF.

lb-xxx-80-clb7

Contoh

Respons sukses

JSONformat

{
  "RequestId": "D7861F61-5B61-46CE-A47C-***",
  "CloudResource": "lb-xxx-80-clb7"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 Waf.Pullin.CertExpired Certificate expired, certificate ID:%s .
400 Waf.Pullin.CertNotExist Certificate does not exist in SSL Certificate Center, certificate type:%s, certificate ID:%s.
400 Waf.Pullin.OnlyBeOneDefaultCert There can be only one default certificate.
400 Waf.Control.CloudProductInfoNotMartch The value of the cloud product, port, instance, and input parameter to which the resource ID of the cloud product is connected to WAF does not match.
400 Waf.Control.CloudProductInfoEmpty The resource Id of the cloud product accessing WAF is null or null values exist in the three input parameters of the cloud product name, port, and cloud product instance.
400 Waf.Control.DefenseResourceEmpty CloudResourceId parameter is illegal.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.