サイト配下のロードバランサーのリストを照会し、負荷分散情報を返します。ロードバランサー名でクエリを実行できます。ページングがサポートされています。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
esa:ListLoadBalancers |
list |
*サイト。
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| PageNumber |
integer |
任意 |
ページングクエリのページ番号設定。値は 1 以上である必要があります。 |
2 |
| PageSize |
integer |
任意 |
ページングクエリの 1 ページあたりのエントリ数。有効な値: 1~500。 |
20 |
| Name |
string |
任意 |
負荷分散の名前。名前でクエリを実行できます。 |
lb.example.com |
| MatchType |
string |
任意 |
名前でクエリを実行する際の名前一致戦略。有効な値:
|
fuzzy |
| OrderBy |
string |
任意 |
ソートフィールド。現在、ID によるソートのみがサポートされています。id は ID の昇順を示し、-id は ID の降順を示します。ID の値は作成時間と正の相関があります。このパラメーターが指定されていない場合、デフォルトのソート順序は ID の降順です。 |
id |
| SiteId |
integer |
必須 |
サイトの ID。 ListSites 操作を呼び出してサイト ID を取得できます。 |
21655860979**** |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
レスポンスのスキーマ。 |
||
| RequestId |
string |
リクエスト ID。 |
CB1A380B-09F0-41BB-A198-72F8FD6DA2FE |
| LoadBalancers |
array<object> |
配列フォーマットで返される負荷分散インスタンスのリスト。 |
|
|
array<object> |
負荷分散インスタンスの詳細。 |
||
| Id |
integer |
負荷分散インスタンスの一意な ID。 |
998676487607104 |
| Name |
string |
負荷分散インスタンスの名前。 |
lb.example.com |
| SiteId |
integer |
負荷分散インスタンスが属するサイトの ID。 |
1159101787**** |
| Enabled |
boolean |
負荷分散インスタンスが有効かどうかを示します。有効な値:
|
false |
| Ttl |
integer |
TTL 値。DNS レコードの生存時間を指定します。デフォルト値: 30。 |
30 |
| SessionAffinity |
string |
セッション維持モード。有効な値:
|
ip |
| FallbackPool |
integer |
フェールオーバーアドレスプールの ID。他のすべてのアドレスプールが使用できない場合、トラフィックはこのアドレスプールにリダイレクトされます。 |
96228666776**** |
| SteeringPolicy |
string |
負荷分散ポリシー。 |
order |
| Description |
string |
負荷分散インスタンスの説明。 |
test |
| AdaptiveRouting |
object |
クロスオリジンアドレスプールのバックツーオリジン構成。 |
|
| FailoverAcrossPools |
boolean |
プール間のフェールオーバーを有効にするかどうかを示します。
|
true |
| OriginLevelRetry |
boolean |
true |
|
| DefaultPools |
array |
デフォルトアドレスプール ID のリスト。 |
|
|
integer |
デフォルトアドレスプール。 |
96228666776**** |
|
| RandomSteering |
object |
重み付きラウンドロビン構成。異なるアドレスプール間のトラフィックディストリビューションの重みを制御します。 |
|
| DefaultWeight |
integer |
|
50 |
| PoolWeights |
object |
各バックエンドプールの重み設定です。 キーはプール ID、値は重みです。 |
|
|
integer |
プールの重み値です。 有効な値の範囲は 0~100 です。 値が 0 の場合、このプールにトラフィックはルーティングされません。 |
50 |
|
| Rules |
array<object> |
特定の条件下での動作を定義するルール構成のリスト。 |
|
|
array<object> |
ルールセット内のルール構成。 |
||
| FixedResponse |
object |
ルールが一致した場合に返される固定レスポンスの設定です。 |
|
| ContentType |
string |
|
application/json |
| Location |
string |
|
http://www.example.com/index.html |
| MessageBody |
string |
レスポンスボディのコンテンツです。 |
Hello World. |
| StatusCode |
integer |
ステータスコードです。 |
200 |
| Overrides |
any |
ルールが一致した場合に上書きされるロードバランサーの設定です。 このオブジェクトに含まれるフィールドは、ロードバランサーの対応する設定を上書きします。 |
{ "adaptive_routing": { "failover_across_pools": true }, "sub_region_pools": { "GB": [ 96228666776**** ], "US": [ 96228666776**** ] }, "default_pools": [ 96228666776****, 96228666776**** ], "fallback_pool": 96228666776****, "location_strategy": { "mode": "resolver_ip", "prefer_ecs": "always" }, "random_steering": { "default_weight": 30, "pool_weights": { "96228666776****": 70, "96228666776****": 80 } }, "region_pools": { "ENAM": [ 96228666776****, 92843536908**** ], "WNAM": [ 92843536908**** ] }, "session_affinity": "cookie", "session_affinity_attributes": { "drain_duration": 100, "headers": ["none"], "require_all_headers": false, "samesite": "Auto", "secure": "Auto", "zero_downtime_failover": "sticky" }, "session_affinity_ttl": 1800, "steering_policy": "dynamic_latency", "ttl": 30 } |
| Rule |
string |
ユーザーリクエストに一致するルール式です。 このパラメーターは、グローバル設定には必要ありません。 ユースケース:
|
http.request.uri.path contains "/testing" |
| RuleName |
string |
ルールの名前です。 このパラメーターは、グローバル設定には必要ありません。 |
r2 |
| RuleEnable |
string |
ルールが有効かどうかを示します。 このパラメーターは、グローバル設定には必要ありません。 有効な値:
|
on |
| Sequence |
integer |
ルールの実行優先度です。 値が大きいほど優先度が高くなります。 |
1 |
| Terminates |
boolean |
このルールが一致した後に後続のルールの実行を停止するかどうかを示します。
|
true |
| Monitor |
object |
モニターの構成。 |
|
| Type |
string |
ヘルスチェックのプロトコル ( |
HTTP |
| Method |
string |
ヘルスチェックに使用されるメソッドです。 |
GET |
| Port |
integer |
ヘルスチェックの宛先ポートです。 |
80 |
| Path |
string |
ヘルスチェックのためにリクエストするパスです。 |
/ |
| Interval |
integer |
ヘルスチェックの間隔 (秒単位) です。 |
60 |
| ExpectedCodes |
string |
ヘルスチェックの成功を示す、期待される HTTP ステータスコード ( |
200,202 |
| FollowRedirects |
boolean |
ヘルスチェックでリダイレクトをフォローするかどうかを示します。
|
true |
| ConsecutiveUp |
integer |
プールを正常と見なすのに必要な、連続したヘルスチェック成功回数です。 例: |
3 |
| ConsecutiveDown |
integer |
プールを異常と見なすのに必要な、連続したヘルスチェック失敗回数です。 例: |
5 |
| Header |
any |
ヘルスチェックプローブに含まれる HTTP ヘッダーです。 |
{ "host": [ "example1.com", "example2.com" ] } |
| Timeout |
integer |
1 回のヘルスチェックのタイムアウト (秒単位) です。 |
5 |
| MonitoringRegion |
string |
ヘルスチェックのプローブロケーションです。 デフォルトは
|
Global |
| Status |
string |
負荷分散インスタンスのステータス。 |
healthy |
| SubRegionPools |
any |
セカンダリリージョンにマッピングされたアドレスプール。複数のセカンダリリージョンが同じアドレスプールセットを共有する場合、セカンダリリージョン名をカンマで連結してキーとして使用できます。 |
{"AL,MO": [92298024898****],"CN-SH,CN-SX,CN-SC":[92304347804****,92843536908****]} |
| RegionPools |
any |
プライマリリージョンにマッピングされたアドレスプール。 |
{ "ENAM": [ 12345678**** ], "WNAM": [ 23456789****, 23456789**** ] } |
| PageNumber |
integer |
ページ番号。PageNumber リクエストパラメーターと同じ値です。 |
1 |
| PageSize |
integer |
1 ページあたりのエントリ数。 |
10 |
| TotalCount |
integer |
エントリの総数。 |
100 |
| TotalPage |
integer |
ページの総数。 |
10 |
例
成功レスポンス
JSONJSON
{
"RequestId": "CB1A380B-09F0-41BB-A198-72F8FD6DA2FE",
"LoadBalancers": [
{
"Id": 998676487607104,
"Name": "lb.example.com\n",
"SiteId": 0,
"Enabled": false,
"Ttl": 30,
"SessionAffinity": "ip",
"FallbackPool": 0,
"SteeringPolicy": "order",
"Description": "test",
"AdaptiveRouting": {
"FailoverAcrossPools": true,
"OriginLevelRetry": true
},
"DefaultPools": [
0
],
"RandomSteering": {
"DefaultWeight": 50,
"PoolWeights": {
"key": 50
}
},
"Rules": [
{
"FixedResponse": {
"ContentType": "application/json\n",
"Location": "http://www.example.com/index.html\n",
"MessageBody": "Hello World.\n",
"StatusCode": 200
},
"Overrides": "{\n \"adaptive_routing\": {\n \"failover_across_pools\": true\n },\n \"sub_region_pools\": {\n \"GB\": [\n 96228666776****\n ],\n \"US\": [\n 96228666776****\n ]\n },\n \"default_pools\": [\n 96228666776****,\n 96228666776****\n ],\n \"fallback_pool\": 96228666776****,\n \"location_strategy\": {\n \"mode\": \"resolver_ip\",\n \"prefer_ecs\": \"always\"\n },\n \"random_steering\": {\n \"default_weight\": 30,\n \"pool_weights\": {\n \"96228666776****\": 70,\n \"96228666776****\": 80\n }\n },\n \"region_pools\": {\n \"ENAM\": [\n 96228666776****,\n 92843536908****\n ],\n \"WNAM\": [\n 92843536908****\n ]\n },\n \"session_affinity\": \"cookie\",\n \"session_affinity_attributes\": {\n \"drain_duration\": 100,\n \"headers\": [\"none\"],\n \"require_all_headers\": false,\n \"samesite\": \"Auto\",\n \"secure\": \"Auto\",\n \"zero_downtime_failover\": \"sticky\"\n },\n \"session_affinity_ttl\": 1800,\n \"steering_policy\": \"dynamic_latency\",\n \"ttl\": 30\n }",
"Rule": "http.request.uri.path contains \"/testing\"\n",
"RuleName": "r2",
"RuleEnable": "on",
"Sequence": 1,
"Terminates": true
}
],
"Monitor": {
"Type": "HTTP\n",
"Method": "GET\n",
"Port": 80,
"Path": "/\n",
"Interval": 60,
"ExpectedCodes": "200,202\n",
"FollowRedirects": true,
"ConsecutiveUp": 3,
"ConsecutiveDown": 5,
"Header": "{\n \"host\": [\n \"example1.com\",\n \"example2.com\"\n ]\n }",
"Timeout": 5,
"MonitoringRegion": "Global"
},
"Status": "healthy",
"SubRegionPools": "{\"AL,MO\": [92298024898****],\"CN-SH,CN-SX,CN-SC\":[92304347804****,92843536908****]}",
"RegionPools": "{\n \"ENAM\": [\n 12345678****\n ],\n \"WNAM\": [\n 23456789****,\n 23456789****\n ]\n}"
}
],
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 100,
"TotalPage": 10
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | 入力パラメーターのフォーマット検証が失敗しました。有効な値を指定してください。 |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | サービスの呼び出しに失敗しました。後でもう一度お試しいただくか、詳細についてはカスタマーサポートにお問い合わせください。 |
| 404 | SiteNotFound | The website does not exist or does not belong to you. | サイトが存在しないか、またはサイトにアクセスする権限がありません。 |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。