All Products
Search
Document Center

Web Application Firewall:InitializeWafOperationRole

Last Updated:Oct 30, 2025

Initializes a service-linked role for WAF.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the WAF instance.

Note

Call DescribeInstance to query the ID of your WAF instance.

waf_v2_public_cn-***

RegionId

string

No

The region where the WAF instance resides. Valid values:

  • cn-hangzhou: the Chinese mainland.

  • ap-southeast-1: outside the Chinese mainland.

cn-hangzhou

ResourceManagerResourceGroupId

string

No

The ID of the Alibaba Cloud resource group.

rg-acfm***q

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

4EC9EA6C-F80A-5D25-A8F7-***

Examples

Success response

JSON format

{
  "RequestId": "4EC9EA6C-F80A-5D25-A8F7-***"
}

Error codes

HTTP status code

Error code

Error message

Description

400 RoleAlreadyExists Service Linked Role Already Exists. The role already exists.
400 NoPermissonCreatesServiceLinkedRole No Permisson Create Service Linked Role. You do not have the permissions to create the service-linked role.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.