TCP リスナーを作成します。
操作説明
新しく作成されたリスナーは停止状態です。リスナーを作成した後、StartLoadBalancerListener 操作を呼び出して、リスナーがネットワークトラフィックを転送できるようにする必要があります。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
slb:CreateLoadBalancerTCPListener |
create |
AccessControlList
*LoadBalancer
|
|
なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
任意 |
Classic Load Balancer (CLB) インスタンスがデプロイされているリージョンの ID。 最新のリージョンリストについては、「リージョンとゾーン」をご参照いただくか、DescribeRegions 操作を呼び出して情報を取得してください。 |
cn-hangzhou |
| LoadBalancerId |
string |
必須 |
CLB インスタンスの ID。 |
lb-bp1b6c719dfa08ex**** |
| ListenerPort |
integer |
必須 |
CLB インスタンスが使用するフロントエンドポート。 有効値:1~65535。 |
80 |
| BackendServerPort |
integer |
任意 |
CLB インスタンスが使用するバックエンドポート。 有効値:1~65535。 VServerGroupId パラメーターが設定されていない場合、このパラメーターは必須です。 |
80 |
| Tag |
array<object> |
任意 |
タグ。 |
|
|
object |
任意 |
|||
| Key |
string |
任意 |
タグのキー。最大 20 個のタグキーを指定できます。タグキーは空の文字列にすることはできません。 タグキーは 1~64 文字である必要があり、 |
TestKey |
| Value |
string |
任意 |
タグの値。最大 20 個のタグ値を指定できます。タグ値は空の文字列にすることができます。 タグ値は最大 128 文字で、 |
TestValue |
| Bandwidth |
integer |
必須 |
リスナーの最大帯域幅。単位:Mbit/s。有効値:
|
-1 |
| Scheduler |
string |
任意 |
スケジューリングアルゴリズム。有効値:
説明
パフォーマンス専有型の CLB インスタンスのみが sch および tch の一貫性ハッシュアルゴリズムをサポートします。 |
wrr |
| PersistenceTimeout |
integer |
任意 |
セッション維持のタイムアウト期間。単位:秒 有効値:0~3600 デフォルト値:0。デフォルト値を使用する場合、システムはセッション維持を無効にします。 |
0 |
| EstablishedTimeout |
integer |
任意 |
接続のタイムアウト期間。単位:秒 有効値:10~900。 |
500 |
| HealthyThreshold |
integer |
任意 |
異常なバックエンドサーバーが正常と判断されるまでに連続してヘルスチェックに合格する必要がある回数。この場合、ヘルスステータスはfailからsuccessに変わります。 有効値:2~10 |
4 |
| UnhealthyThreshold |
integer |
任意 |
正常なバックエンドサーバーが異常と判断されるまでに連続してヘルスチェックに失敗する必要がある回数。この場合、ヘルスステータスはsuccessからfailに変わります。 有効値:2~10 |
4 |
| HealthCheckConnectTimeout |
integer |
任意 |
ヘルスチェック応答の最大タイムアウト期間。単位:秒 有効値:1~300 デフォルト値:5 |
100 |
| HealthCheckConnectPort |
integer |
任意 |
ヘルスチェックに使用されるポート。 有効値:1~65535。 このパラメーターが設定されていない場合、BackendServerPort で指定されたバックエンドポートがヘルスチェックに使用されます。 |
80 |
| healthCheckInterval |
integer |
任意 |
2 つの連続するヘルスチェックの間隔。単位:秒。 有効値:1~50。 |
3 |
| HealthCheckDomain |
string |
任意 |
ヘルスチェックに使用するドメイン名。有効値:
|
172.XX.XX.6 |
| HealthCheckURI |
string |
任意 |
ヘルスチェックに使用される URI。URI は 1~80 文字で、数字、文字、ハイフン (-)、スラッシュ (/)、ピリオド (.)、パーセント記号 (%)、番号記号 (#)、アンパサンド (&) のみを含めることができます。URI はスラッシュ (/) で始まる必要がありますが、単一のスラッシュ (/) にすることはできません。 TCP リスナーが HTTP ヘルスチェックを必要とする場合にこのパラメーターを設定できます。このパラメーターを設定しない場合、TCP ヘルスチェックが実行されます。 |
/test/index.html |
| HealthCheckHttpCode |
string |
任意 |
正常なヘルスチェックの HTTP ステータスコード。複数の HTTP ステータスコードはコンマ (,) で区切ります。有効値:
|
http_2xx,http_3xx |
| HealthCheckType |
string |
任意 |
ヘルスチェックのタイプ。有効値:
|
tcp |
| VServerGroupId |
string |
任意 |
vServer グループの ID。 |
rsp-cige6j**** |
| MasterSlaveServerGroupId |
string |
任意 |
プライマリ/セカンダリサーバーグループの ID。 説明
VServerGroupId と MasterSlaveServerGroupId の両方を設定することはできません。 |
rsp-0bfucw**** |
| AclId |
string |
任意 |
リスナーに関連付けられているネットワーク ACL の ID。 説明
AclStatus が on に設定されている場合、このパラメーターは必須です。 |
acl-uf60jwfiv6****** |
| AclType |
string |
任意 |
ACL のタイプ。有効値:
説明
AclStatus が on に設定されている場合、このパラメーターは必須です。 |
black |
| AclStatus |
string |
任意 |
アクセス制御を有効にするかどうかを指定します。有効値:
|
off |
| Description |
string |
任意 |
リスナーの名前。 名前は 1~256 文字で、文字、数字、ハイフン (-)、スラッシュ (/)、ピリオド (.)、アンダースコア (_) を含めることができます。 |
tcp_80 |
| ConnectionDrain |
string |
任意 |
接続ドレインを有効にするかどうかを指定します。有効値:
|
off |
| ConnectionDrainTimeout |
integer |
任意 |
接続ドレインのタイムアウト期間。単位:秒。 有効値:10~900。 説明
このパラメーターは、ConnectionDrain が on に設定されている場合に必須です。 |
300 |
| ProxyProtocolV2Enabled |
boolean |
任意 |
Proxy Protocol を使用してクライアント IP アドレスをバックエンドサーバーに渡すかどうかを指定します。有効値:
|
false |
| HealthCheckSwitch |
string |
任意 |
ヘルスチェック機能を有効にするかどうかを指定します。有効値:
|
on |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID。 |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
例
成功レスポンス
JSONJSON
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidParameterValue.SpecNotSupport | The loadBalancer of shared spec does not support the parameter value, %s. | |
| 400 | OperationNotSupport.Acl | The cloud box instance does not support acl. | |
| 400 | InvalidParameterValue.RegionNotSupport | The region does not support the parameter value, %s. | |
| 400 | Abs.VServerGroupIdAndMasterSlaveServerGroupId.MissMatch | The parameters VServerGroupId or MasterSlaveServerGroupId miss match. | |
| 400 | IpVersionConflict | The ip version of this LoadBalancer and the Acl is conflict. | |
| 400 | InvalidParameterValue.ZoneNotSupport | The zone does not support the parameter value, %s. | |
| 400 | ListenerProcessing | A previous configuration of the listener is pending, please try again later. | |
| 400 | AclNotExist | Acl does not exist. | |
| 400 | InvalidParameter.ListenerPortConflict | There is conflict listener port exists. | |
| 400 | InvalidParameter.ZoneNotSupport | The zone does not support the parameter %s. | |
| 400 | InvalidParam.VServerGroupId | The specified VServerGroupId is invalid. | |
| 400 | MissingParam.HealthCheckConnectPort | The parameter HealthCheckConnectPort is required. | |
| 400 | InvalidParam.ListenerPort | The specified ListenerPort is invalid. | |
| 400 | InvalidParam.StartPort | The specified StartPort is invalid. | |
| 400 | InvalidParamSize.PortRange | The size of param PortRange is invalid. | |
| 400 | InvalidParam.EndPort | The specified EndPort is invalid. | |
| 400 | Duplicated.AclEntry | %s. | |
| 400 | OperationUnsupported.SetAccessControl | The singleTunnel/anyTunnel loadbalancer does not support config AccessControlList. | |
| 400 | InvalidParam.PortRange | The specified PortRange is invalid. | |
| 400 | InvalidParameter.RegionNotSupport | The region does not support the parameter: %s. | |
| 400 | LbNotSupportTcpssl | You cannot create a TCP SSL type listener for the specified load balancer. | |
| 400 | LbSupportTcpsslOnly | The specified load balancer supports TCP SSL type listener only. | |
| 400 | ListenerNotSupportRule | You cannot create a rule for the specified listener. | |
| 400 | ListenerPortConflict | The specified ListenerPort is conflict with other listener. | |
| 400 | ResourceNotFound.VServerGroup | %s. | |
| 400 | IllegalParam.FailoverThreshold | The parameter FailoverThreshold is illegal. | |
| 400 | IllegalParam.FailoverStrategy | The parameter FailoverStrategy is illegal. | |
| 400 | MasterSlaveServerConflict | The servers are conflict for MasterSlaveGroup. | |
| 400 | OperationDenied.HealthCheckClosedForMasterSlaveMode | The operation is denied because of HealthCheckClosedForMasterSlaveMode. | |
| 400 | IllegalParam.HealthCheck | The param of HelathCheck is illegal. | |
| 400 | Mismatch.SlbSpecTypeAndListenerProtocol | The SlbSpecType and ListenerProtocol are mismatched. | |
| 400 | OperationDenied.FullNatModeNotAllowed | The operation is not allowed because of FullNatModeNotAllowed. | |
| 400 | OperationDenied.OnlyIpv4SlbSupport | The operation is not allowed because of OnlyIpv4SlbSupport. | |
| 400 | SpecNotSupportParameter | The instance with share spec does not support FullNatEnabled parameter. | |
| 400 | InvalidParam.TagValue | %s. | |
| 400 | InvalidParam.TagKey | %s. | |
| 400 | SizeLimitExceeded.Tag | %s. | |
| 400 | MissingParam.TagKey | The param MissingParam.TagKey is missing. | |
| 400 | MissingParameter | The BackendServerPort or VServerGroupId is required at lease one. | |
| 400 | AclListenerOverLimit | This acl has reached the limit of binding to listeners. | |
| 400 | QuotaLimitExceeds.AclAttachedToListener | The number of Acl bound listeners has reached the quota limit | |
| 400 | QuotaLimitExceeds.TotalAclEntry | The number of Acl entries has reached the quota limit. | |
| 400 | QuotaLimitExceeds.AclListenerOverLimit | This acl has reached the limit of binding to listeners. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。