All Products
Search
Document Center

UpdateGatewayRouteWafStatus

Last Updated: Jul 01, 2022

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RouteIdLongNo

The ID of the route.

GatewayUniqueIdstringNo

The unique ID of the gateway.

AcceptLanguagestringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English
zh
EnableWafbooleanNo

Specifies whether to enable Web Application Firewall (WAF).

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

7466566F-F30F-4A29-965D-3E0AF21D****
HttpStatusCodeinteger

The HTTP status code returned.

200
Messagestring

The message returned.

success
Codeinteger

The status code returned. A value of 200 indicates that the request is successful.

200
Successboolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.
true
Dataobject

The returned data.

IdLong

The ID of the route.

12
Namestring

The name of the route.

test
GatewayUniqueIdstring

The unique ID of the gateway.

gw-7ea3da97b96543e19f6c597cd4a9****
GatewayIdLong

The ID of the gateway.

102
DefaultServiceIdLong

The ID of the default service.

1
DefaultServiceNamestring

The name of the default service.

test
Statusinteger

The status of the route.

1
GmtCreatestring

The time when the route was created.

2022-01-26T09:52:41.000+0000
GmtModifiedstring

The time when the route was last modified.

2022-02-24T06:08:29.230+0000
RouteOrderinteger

The sequence number of the route.

1
Predicatesstring

The information about matching rules.

{\"PathPredicates\":{\"Path\":\"/metas\",\"Type\":\"PRE\",\"IgnoreCase\":false}}
RoutePredicatesobject

The matching rules of the route.

PathPredicatesobject

The information about route matching.

Pathstring

The path.

/zookeeper/mmgw/unlogined/common.getBu
Typestring

The matching mode.

PRE
IgnoreCaseboolean

Indicates whether case sensitivity is ignored.

true
MethodPredicatesarray

The information about method matching.

string

The method.

GET
HeaderPredicatesarray

The information about header matching.

object
Keystring

The key of the request header.

alibo
Valuestring

The value of the request header.

200
Typestring

The matching mode.

PRE
QueryPredicatesarray

The information about URL parameter matching.

object
Keystring

The name of the parameter.

instanceId
Valuestring

The value of the parameter.

test
Typestring

The matching mode.

PRE
DomainIdLong

The ID of the domain name.

235
DomainNamestring

The domain name.

nbhamster.com
Servicesstring

The configurations of services.

[{\"Percent\":100,\"ServiceId\":126}]
RouteServicesarray

The information about services.

object

The information about a service.

ServiceIdLong

The ID of the service.

547
ServiceNamestring

The name of the service.

b-service
Percentinteger

The weight.

80
Versionstring

The version of the service.

v1
Namestring

The name of the service.

test-aixue-gray
SourceTypestring

The source type of the service.

K8S
Namespacestring

The name of the namespace.

default
GroupNamestring

The name of the group to which the service belongs.

DEFAULT_GROUP
HTTPRewriteobject

The information about the rewrite policy.

Statusstring

The status of the policy.

off
Pathstring

The HTTP request path.

/test/client
Hoststring

The domain name.

aliyuncs.com
PathTypestring

The type of the HTTP request path.

PRE
Patternstring

The matching pattern.

/test
Substitutionstring

The substitute for the matching pattern.

test
HeaderOpobject

The information about the header configuration policy.

Statusstring

The status of the policy.

off
HeaderOpItemsarray

The information about headers.

object

The header configuration policy.

DirectionTypestring

The type of the header. Valid values: Request and Response.

Response
OpTypestring

The type of the operation.

Add
Keystring

header key

debug
Valuestring

The value of the header.

test
DestinationTypestring

The type of the destination service.

Single
DirectResponseobject

The information about service mocking.

Codeinteger

The status code returned.

200
Bodystring

The return value for service mocking.

[{\"key\":\"h68d13466.sqa.eu95\",\"dims\":\"groupName=All
Corsobject

The information about the cross-origin resource sharing (CORS) policy.

Statusstring

The status of the policy.

off
AllowOriginsstring

The origins from which access is allowed.

*
AllowMethodsstring

The HTTP methods allowed.

GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH
AllowHeadersstring

The request headers allowed.

*
ExposeHeadersstring

The response headers allowed.

*
TimeUnitstring

The unit of time.

s
UnitNumLong

The value of time.

1
AllowCredentialsboolean

The credentials allowed.

true
Timeoutobject

The information about the timeout policy.

UnitNuminteger

The value of time.

10
TimeUnitstring

The unit of time.

s
Statusstring

The status of the policy.

off
Retryobject

The information about the retry policy.

Attemptsinteger

The number of retries allowed.

1
RetryOnarray

The retry conditions.

string

The retry condition.

5xx
HttpCodesarray

The HTTP status codes returned.

string

The HTTP status code returned.

500
Statusstring

The status of the policy.

on
DomainIdListarray

The IDs of domain names.

Long

The ID of the domain name.

1
DomainNameListarray

The domain names.

string

The domain name.

test.com
Redirectobject

The configuration of the redirect action.

Codeinteger

The status code returned.

200
Hoststring

The hostname.

ww.al.c
Pathstring

The path.

/
EnableWafboolean

Indicates whether WAF is enabled.

0

Error codes

For a list of error codes, visit the API error center.