転送ルールの条件、アクション、名前などのプロパティを更新します。
操作説明
-
UpdateRuleAttribute は非同期操作です。リクエストを送信すると、システムはリクエスト ID を返し、バックグラウンドでタスクを実行します。ListRules 操作を呼び出して、転送ルールのステータスをクエリできます。
転送ルールが Configuring 状態の場合、そのプロパティは更新中です。
転送ルールが Available 状態の場合、そのプロパティは更新されています。
-
転送ルールに追加できる条件 (RuleConditions) とアクション (RuleActions) の最大数は次のとおりです。
条件: Basic Edition は 5 個、Standard Edition は 10 個、WAF-enabled Edition は 10 個。
アクション: Basic Edition は 3 個、Standard Edition は 5 個、WAF-enabled Edition は 5 個。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
alb:UpdateRuleAttribute |
update |
*LoadBalancer
*ServerGroup
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RuleId |
string |
必須 |
転送ルール ID。 |
rule-4dp5i6ea**** |
| ClientToken |
string |
任意 |
リクエストのべき等性を保証するために使用されるクライアントトークン。 クライアントからパラメーター値を生成して、異なるリクエスト間で値が一意になるようにします。クライアントトークンには ASCII 文字のみを含めることができます。 説明
このパラメーターを指定しない場合、システムは API リクエストの RequestId を ClientToken として自動的に使用します。RequestId は API リクエストごとに異なる場合があります。 |
5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
| DryRun |
boolean |
任意 |
ドライランを実行するかどうかを指定します。有効な値:
|
false |
| RuleConditions |
array<object> |
任意 |
転送ルールの条件。 |
|
|
array<object> |
任意 |
転送ルールの条件。 |
||
| CookieConfig |
object |
任意 |
Cookie の設定。 |
|
| Values |
array |
任意 |
Cookie。 |
|
|
object |
任意 |
Cookie の設定。 |
||
| Key |
string |
任意 |
Cookie のキー。キーの長さは 1〜100 文字で、小文字、印刷可能文字、アスタリスク (*)、および疑問符 (?) を含めることができます。スペースまたは次の特殊文字を含めることはできません: |
test |
| Value |
string |
任意 |
Cookie の値。値の長さは 1〜128 文字で、小文字、印刷可能文字、アスタリスク (*)、および疑問符 (?) を含めることができます。スペースまたは次の特殊文字を含めることはできません: |
test |
| HeaderConfig |
object |
任意 |
リクエストヘッダーの設定。 |
|
| Key |
string |
任意 |
リクエストヘッダーのキー。キーの長さは 1〜40 文字で、文字、数字、ハイフン (-)、およびアンダースコア (_) を含めることができます。Cookie と Host はサポートされていません。 |
Port |
| Values |
array |
任意 |
リクエストヘッダーの値。 |
|
|
string |
任意 |
リクエストヘッダーの値。同じリクエストヘッダーキーの値は、転送ルール条件内で同じにすることはできません。命名規則:
|
5006 |
|
| HostConfig |
object |
任意 |
ホストの設定。 |
|
| Values |
array |
任意 |
ホスト名のリスト。 |
|
|
string |
任意 |
ホスト名。命名規則:
|
www.example.com |
|
| MethodConfig |
object |
任意 |
リクエストメソッドの設定。 |
|
| Values |
array |
任意 |
リクエストメソッドのリスト。 |
|
|
string |
任意 |
リクエストメソッド。 有効な値: HEAD、GET、POST、OPTIONS、PUT、PATCH、および DELETE。 |
PUT |
|
| PathConfig |
object |
任意 |
パスの設定。 |
|
| Values |
array |
任意 |
転送パスのリスト。 |
|
|
string |
任意 |
転送パス。命名規則:
|
/test |
|
| QueryStringConfig |
object |
任意 |
クエリ文字列の設定。 |
|
| Values |
array |
任意 |
クエリ文字列のリスト。最大 20 個のクエリ文字列を追加できます。 |
|
|
object |
任意 |
クエリ文字列の構造。 |
||
| Key |
string |
任意 |
クエリ文字列のキー。キーの長さは 1〜100 文字で、小文字、印刷可能文字、アスタリスク (*)、および疑問符 (?) を含めることができます。スペースまたは次の特殊文字を含めることはできません: |
test |
| Value |
string |
任意 |
クエリ文字列の値。値の長さは 1〜128 文字で、小文字、印刷可能文字、アスタリスク (*)、および疑問符 (?) を含めることができます。スペースまたは次の特殊文字を含めることはできません: |
test |
| Type |
string |
任意 |
転送ルール条件のタイプ。最大 7 種類の転送ルール条件を追加できます。有効な値:
|
Host |
| ResponseStatusCodeConfig |
object |
任意 |
HTTP ステータスコードの設定。 |
|
| Values |
array |
任意 |
HTTP ステータスコードのリスト。 |
|
|
string |
任意 |
HTTP ステータスコード。 |
301 |
|
| ResponseHeaderConfig |
object |
任意 |
ヘッダー条件の設定。 |
|
| Key |
string |
任意 |
ヘッダーのキー。
|
test |
| Values |
array |
任意 |
ヘッダーの値。 |
|
|
string |
任意 |
ヘッダーの値。
|
50006 |
|
| SourceIpConfig |
object |
任意 |
ソース IP アドレスに基づいてサービストラフィックを照合します。最大 5 つのソース IP アドレスを追加できます。 |
|
| Values |
array |
任意 |
1 つ以上の IP アドレスまたは CIDR ブロック。 |
|
|
string |
任意 |
1 つ以上の IP アドレスまたは CIDR ブロック。 |
192.168.0.0/32 |
|
| RuleActions |
array<object> |
任意 |
転送ルールのアクション。 |
|
|
array<object> |
任意 |
転送ルールのアクション。 |
||
| FixedResponseConfig |
object |
任意 |
固定応答の設定。 |
|
| Content |
string |
任意 |
固定応答。応答の長さは最大 1 KB で、ASCII 文字のみを含めることができます。 |
dssacav |
| ContentType |
string |
任意 |
固定応答のフォーマット。 有効な値: text/plain、text/css、text/html、application/javascript、および application/json。 |
text/plain |
| HttpCode |
string |
任意 |
HTTP ステータスコード。値は数字で構成される文字列である必要があります。有効な値: 2xx、4xx、および 5xx。x は数字です。 |
200 |
| ForwardGroupConfig |
object |
任意 |
サーバーグループの設定。 |
|
| ServerGroupTuples |
array |
任意 |
宛先サーバーグループのリスト。 |
|
|
object |
任意 |
宛先サーバーグループ。 |
||
| ServerGroupId |
string |
任意 |
宛先サーバーグループの ID。 |
sg--atstuj3rtoptyui**** |
| Weight |
integer |
任意 |
重み。値が大きいほど、重みが高くなります。重みが大きいサーバーグループは、より多くのリクエストを受信します。有効な値: 0〜100。
|
30 |
| ServerGroupStickySession |
object |
任意 |
サーバーグループのセッション維持。 |
|
| Enabled |
boolean |
任意 |
セッション維持を有効にするかどうかを指定します。有効な値:
|
false |
| Timeout |
integer |
任意 |
タイムアウト期間。単位: 秒。有効な値: 1〜86400。 |
2 |
| InsertHeaderConfig |
object |
任意 |
リクエストヘッダーを挿入するための設定。 |
|
| CoverEnabled |
boolean |
任意 |
同じキーを持つリクエストヘッダーの値を上書きするかどうかを指定します。有効な値:
|
false |
| Key |
string |
任意 |
挿入するリクエストヘッダーのキー。キーの長さは 1〜40 文字で、小文字、数字、アンダースコア (_)、およびハイフン (-) を含めることができます。InsertHeaderConfig のキーは RemoveHeaderConfig のキーと同じにすることはできません。 説明
次のヘッダーキーはサポートされていません: |
key |
| Value |
string |
任意 |
挿入するヘッダーの値。
|
UserDefined |
| ValueType |
string |
任意 |
ヘッダー値のタイプ。有効な値:
|
UserDefined |
| Order |
integer |
任意 |
アクションの順序。有効な値: 1〜50000。値が小さいほど、優先度が高くなります。値は一意である必要があり、空にすることはできません。アクションには最大 20 個の順序を指定できます。 |
1 |
| RedirectConfig |
object |
任意 |
リダイレクト設定。最大 20 個のリダイレクトを追加できます。 |
|
| Host |
string |
任意 |
宛先ホスト名。有効な値:
|
www.example.com |
| HttpCode |
string |
任意 |
リダイレクトメソッド。有効な値: 301、302、303、307、および 308。 |
301 |
| Path |
string |
任意 |
宛先パス。有効な値:
|
/test |
| Port |
string |
任意 |
宛先ポート。有効な値:
|
10 |
| Protocol |
string |
任意 |
宛先プロトコル。有効な値:
説明
HTTPS リスナーは HTTPS のみをサポートします。 |
HTTP |
| Query |
string |
任意 |
宛先クエリ文字列。有効な値:
|
quert |
| RewriteConfig |
object |
任意 |
再書き込み設定。 |
|
| Host |
string |
任意 |
内部リダイレクトの宛先ホスト名。有効な値:
|
www.example.com |
| Path |
string |
任意 |
宛先パス。有効な値:
|
/tsdf |
| Query |
string |
任意 |
内部リダイレクトの宛先クエリ文字列。有効な値:
|
quedsa |
| Type |
string |
任意 |
アクションタイプ。最大 11 個のアクションタイプを追加できます。有効な値:
説明
転送ルールには、ForwardGroup、Redirect、または FixedResponse アクションを含める必要があります。これらのアクションを他のタイプのアクションと併用する場合は、これらのアクションが最後に実行されるようにする必要があります。 |
ForwardGroup |
| TrafficLimitConfig |
object |
任意 |
速度制限の設定。 |
|
| QPS |
integer |
任意 |
1 秒あたりのクエリ数 (QPS)。有効な値: 1〜1000000。 |
100 |
| PerIpQps |
integer |
任意 |
単一 IP アドレスの QPS。有効な値: 1〜1000000。 説明
QPS と PerIpQps の両方を指定する場合、PerIpQps の値は QPS の値より小さくする必要があります。 |
80 |
| TrafficMirrorConfig |
object |
任意 |
トラフィックミラーリングの設定。 |
|
| TargetType |
string |
任意 |
トラフィックがミラーリングされる宛先のタイプ。有効な値:
|
ForwardGroupMirror |
| MirrorGroupConfig |
object |
任意 |
トラフィックがミラーリングされるサーバーグループ。 |
|
| ServerGroupTuples |
array |
任意 |
トラフィックがミラーリングされるサーバーグループ。 |
|
|
object |
任意 |
トラフィックがミラーリングされるサーバーグループ。 |
||
| ServerGroupId |
string |
任意 |
サーバーグループの ID。 |
srg-00mkgijak0w4qgz9**** |
| RemoveHeaderConfig |
object |
任意 |
リクエストヘッダーを削除するための設定。 |
|
| Key |
string |
任意 |
削除するリクエストヘッダーのキー。キーの長さは 1〜40 文字で、小文字、数字、アンダースコア (_)、およびハイフン (-) を含めることができます。キーは RemoveHeaderConfig で複数回使用することはできません。
|
test |
| CorsConfig |
object |
任意 |
CORS の設定。 |
|
| AllowOrigin |
array |
任意 |
許可されたオリジンのリスト。
|
|
|
string |
任意 |
許可されたオリジン。 |
http://test.com |
|
| AllowMethods |
array |
任意 |
クロスオリジンリクエストで許可される HTTP メソッド。 |
|
|
string |
任意 |
クロスオリジンリクエストで許可される HTTP メソッド。有効な値:
|
GET |
|
| AllowHeaders |
array |
任意 |
クロスオリジンリクエストで許可されるヘッダーのリスト。 |
|
|
string |
任意 |
クロスオリジンリクエストで許可されるヘッダーのリスト。 |
test_123 |
|
| ExposeHeaders |
array |
任意 |
クライアントに公開できるヘッダーのリスト。 |
|
|
string |
任意 |
クライアントに公開できるヘッダーのリスト。 |
test_123 |
|
| AllowCredentials |
string |
任意 |
認証情報を許可するかどうかを指定します。有効な値:
|
on |
| MaxAge |
integer |
任意 |
ブラウザでのプリフライトリクエストの最大キャッシュ時間。単位: 秒。 有効な値: -1〜172800。 |
1000 |
| RuleName |
string |
任意 |
転送ルールの名前。名前は 2〜128 文字の長さで、文字、数字、ピリオド (.)、アンダースコア (_)、およびハイフン (-) を含めることができます。文字または漢字で始まる必要があります。 |
rule-instance-test |
| Priority |
integer |
任意 |
ルールの優先度。有効な値: 1〜10000。値が小さいほど、優先度が高くなります。 説明
同じリスナーに属するルールの優先度は一意である必要があります。 |
10 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
指定された転送ルールの属性を更新します。 |
||
| JobId |
string |
非同期タスクの ID。 |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
| RequestId |
string |
リクエスト ID。 |
365F5378-41F6-4AE4-92F8-7FF34B540710 |
例
成功レスポンス
JSONJSON
{
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****",
"RequestId": "365F5378-41F6-4AE4-92F8-7FF34B540710"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | IncorrectStatus.Rule | The status of %s [%s] is incorrect. | |
| 400 | OperationDenied.IpGroupCanNotUsedForMirrorAction | The operation is not allowed because of %s. | |
| 400 | OperationDenied.SameGroupForForwardAndMirrorAction | The operation is not allowed because of %s. | |
| 400 | OperationDenied.GRPCServerGroup | The operation is not allowed because of %s. | |
| 400 | Conflict.Priority | There is already %s having the same configuration with %s. | |
| 400 | ResourceQuotaExceeded.ServerGroupAttachedNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | ResourceQuotaExceeded.LoadBalancerServersNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | ResourceQuotaExceeded.ServerAddedNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | QuotaExceeded.RuleWildcardsNum | The quota of %s is exceeded, usage %s/%s. | |
| 400 | QuotaExceeded.RuleMatchEvaluationsNum | The quota of %s is exceeded, usage %s/%s. | |
| 400 | QuotaExceeded.RuleActionsNum | The quota of %s is exceeded, usage %s/%s. | |
| 400 | Mismatch.Protocol | The %s is mismatched for %s and %s. | |
| 400 | Mismatch.VpcId | The %s is mismatched for %s and %s. | |
| 400 | OperationDenied.RewriteMissingForwardGroup | The operation is not allowed because of RewriteMissingForwardGroup. | |
| 400 | ResourceInConfiguring.Listener | The specified listener is being configured, please try again later. | |
| 400 | OperationDenied.ProtocolMustSameForForwardGroupAction | The operation is not allowed because of ProtocolMustSameForForwardGroupAction. | |
| 403 | Forbidden.ServerGroup | Authentication has failed for ServerGroup. | |
| 403 | Forbidden.LoadBalancer | Authentication is failed for %s. | |
| 404 | ResourceNotFound.Rule | The specified resource %s is not found. | |
| 404 | ResourceNotFound.ServerGroup | The specified resource %s is not found. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。