すべてのプロダクト
Search
ドキュメントセンター

Microservices Engine:UpdateGatewayRouteWafStatus

最終更新日:Dec 16, 2025

ルートの WAF ステータスを更新します。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

mse:UpdateGatewayRouteWafStatus

update

*Gateway

acs:mse:{#regionId}:{#accountId}:instance/{#GatewayUniqueId}

なし なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

RouteId

integer

必須

ルートの ID。

645

GatewayUniqueId

string

必須

ゲートウェイの一意の ID。

gw-86575c0bc9f04ecfbacb92b8e392****

AcceptLanguage

string

任意

レスポンスの言語。有効な値:

  • zh:中国語

  • en:英語

zh

EnableWaf

boolean

必須

Web Application Firewall (WAF) を有効にするかどうかを指定します。

true

レスポンスフィールド

フィールド

説明

object

レスポンスパラメーター。

RequestId

string

リクエスト ID。

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

HttpStatusCode

integer

返される HTTP ステータスコード。

200

Message

string

返されたメッセージ。

success

Code

integer

返される状態コード。値が 200 の場合、リクエストは成功です。

200

Success

boolean

リクエストが成功したかどうかを示します。有効な値:

  • true:リクエストは成功しました。

  • false:リクエストは失敗しました。

true

Data

object

返されたデータ。

Id

integer

ルートの ID。

12

Name

string

ルート名。

test

GatewayUniqueId

string

ゲートウェイの一意の ID。

gw-7ea3da97b96543e19f6c597cd4a9****

GatewayId

integer

ゲートウェイの ID。

102

DefaultServiceId

integer

デフォルトのサービス ID。

1

DefaultServiceName

string

デフォルトのサービス名。

test

Status

integer

ルートのステータス。

1

GmtCreate

string

作成時間。

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

GmtModified

string

変更時間。

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

RouteOrder

integer

ルートのシーケンス番号。

1

Predicates

string

一致ルール。

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

RoutePredicates

object

ルート一致に関する情報。

PathPredicates

object

ルート一致に関する情報。

Path

string

パス。

/zookeeper/mmgw/unlogined/common.getBu

Type

string

一致タイプ。

PRE

IgnoreCase

boolean

大文字と小文字を区別しないかどうかを示します。

true

MethodPredicates

array

メソッド一致に関する情報。

string

メソッド。

GET

HeaderPredicates

array<object>

リクエストヘッダーに基づく一致に関する情報。

object

リクエストヘッダー。

Key

string

リクエストヘッダーのキー。

alibo

Value

string

リクエストヘッダーの値。

200

Type

string

一致タイプ。

PRE

QueryPredicates

array<object>

パラメーター一致ルール。

object

パラメーター。

Key

string

パラメーター名。

instanceId

Value

string

パラメーター値。

test

Type

string

タイプ。

PRE

DomainId

integer

ドメイン ID。

235

DomainName

string

ドメイン名。

nbhamster.com

Services

string

サービスに関する情報。

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

RouteServices

array<object>

サービスに関する情報。

object

サービスに関する情報。

ServiceId

integer

サービス ID。

547

ServiceName

string

サービス名。

b-service

Percent

integer

重み。

80

Version

string

サービスのバージョン。

v1

Name

string

サービス名。

test-aixue-gray

SourceType

string

サービスのソースタイプ。

K8s

Namespace

string

名前空間。

default

GroupName

string

サービスが属するグループの名前。

DEFAULT_GROUP

HTTPRewrite

object

書き換えポリシーに関する情報。

Status

string

HTTP ステータス。

off

Path

string

HTTP リクエストパス。

/test/client

Host

string

ドメイン名。

aliyuncs.com

PathType

string

HTTP リクエストのパスタイプ。

PRE

Pattern

string

一致パターン。

/test

Substitution

string

置換。

test

HeaderOp

object

ヘッダー設定。

Status

string

ステータス。

off

HeaderOpItems

array<object>

ポリシー。

object

ポリシー。

DirectionType

string

リクエストまたはレスポンス。

Response

OpType

string

操作タイプ。

Add

Key

string

ヘッダーキー。

debug

Value

string

ヘッダー値。

test

DestinationType

string

宛先サービスタイプ。

Single

DirectResponse

object

サービスモックに関する情報。

Code

integer

戻り値。

200

Body

string

モック戻り値。

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

Cors

object

オリジン間リソース共有 (CORS) の設定。

Status

string

ステータス。

off

AllowOrigins

string

許可されるオリジン。

*

AllowMethods

string

許可されるメソッド。

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

AllowHeaders

string

許可されるヘッダー。

*

ExposeHeaders

string

レスポンスヘッダー。

*

TimeUnit

string

時間単位。

s

UnitNum

integer

単位数。

1

AllowCredentials

boolean

許可される認証情報。

true

Timeout

object

タイムアウト設定。

UnitNum

integer

単位数。

10

TimeUnit

string

時間単位。

s

Status

string

ステータス。

off

Retry

object

リトライ設定。

Attempts

integer

リクエストに許可されるリトライ回数。

1

RetryOn

array

リトライ条件。

string

リトライ条件。

5xx

HttpCodes

array

HTTP ステータスコード。

string

HTTP ステータスコード。

500

Status

string

リトライステータス。

on

DomainIdList

array

ドメイン ID のリスト。

integer

ドメイン ID のリスト。

1

DomainNameList

array

ドメイン名。

string

ドメイン名。

test.com

Redirect

object

リダイレクトの設定。

Code

integer

返されるレスポンスコード。

200

Host

string

ホスト名。

ww.al.c

Path

string

パス。

/

EnableWaf

boolean

WAF が有効化されているかどうかを示します。

0

成功レスポンス

JSONJSON

{
  "RequestId": "7466566F-F30F-4A29-965D-3E0AF21D****",
  "HttpStatusCode": 200,
  "Message": "success",
  "Code": 200,
  "Success": true,
  "Data": {
    "Id": 12,
    "Name": "test",
    "GatewayUniqueId": "gw-7ea3da97b96543e19f6c597cd4a9****",
    "GatewayId": 102,
    "DefaultServiceId": 1,
    "DefaultServiceName": "test",
    "Status": 1,
    "GmtCreate": "2022-01-26T09:52:41.000+0000",
    "GmtModified": "2022-02-24T06:08:29.230+0000",
    "RouteOrder": 1,
    "Predicates": "{\\\"PathPredicates\\\":{\\\"Path\\\":\\\"/metas\\\",\\\"Type\\\":\\\"PRE\\\",\\\"IgnoreCase\\\":false}}",
    "RoutePredicates": {
      "PathPredicates": {
        "Path": "/zookeeper/mmgw/unlogined/common.getBu",
        "Type": "PRE",
        "IgnoreCase": true
      },
      "MethodPredicates": [
        "GET"
      ],
      "HeaderPredicates": [
        {
          "Key": "alibo",
          "Value": "200",
          "Type": "PRE"
        }
      ],
      "QueryPredicates": [
        {
          "Key": "instanceId",
          "Value": "test",
          "Type": "PRE"
        }
      ]
    },
    "DomainId": 235,
    "DomainName": "nbhamster.com",
    "Services": "[{\\\"Percent\\\":100,\\\"ServiceId\\\":126}]",
    "RouteServices": [
      {
        "ServiceId": 547,
        "ServiceName": "b-service",
        "Percent": 80,
        "Version": "v1",
        "Name": "test-aixue-gray",
        "SourceType": "K8s",
        "Namespace": "default",
        "GroupName": "DEFAULT_GROUP"
      }
    ],
    "HTTPRewrite": {
      "Status": "off",
      "Path": "/test/client",
      "Host": "aliyuncs.com",
      "PathType": "PRE",
      "Pattern": "/test",
      "Substitution": "test"
    },
    "HeaderOp": {
      "Status": "off",
      "HeaderOpItems": [
        {
          "DirectionType": "Response",
          "OpType": "Add",
          "Key": "debug",
          "Value": "test"
        }
      ]
    },
    "DestinationType": "Single",
    "DirectResponse": {
      "Code": 200,
      "Body": "[{\\\"key\\\":\\\"h68d13466.sqa.eu95\\\",\\\"dims\\\":\\\"groupName=All}]"
    },
    "Cors": {
      "Status": "off",
      "AllowOrigins": "*",
      "AllowMethods": "GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH",
      "AllowHeaders": "*",
      "ExposeHeaders": "*",
      "TimeUnit": "s",
      "UnitNum": 1,
      "AllowCredentials": true
    },
    "Timeout": {
      "UnitNum": 10,
      "TimeUnit": "s",
      "Status": "off"
    },
    "Retry": {
      "Attempts": 1,
      "RetryOn": [
        "5xx"
      ],
      "HttpCodes": [
        "500"
      ],
      "Status": "on"
    },
    "DomainIdList": [
      1
    ],
    "DomainNameList": [
      "test.com"
    ],
    "Redirect": {
      "Code": 200,
      "Host": "ww.al.c",
      "Path": "/"
    },
    "EnableWaf": true
  }
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 IllegalRequest Invalid request:%s
400 InvalidParameter Parameter error:%s
500 InternalError Console error. Try again later:%s
403 NoPermission You are not authorized to perform this operation:%s
404 NotFound Not found:%s

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。