AssociateHaVip 操作を呼び出して、仮想非公開クラウド (VPC) 内の ECS インスタンスまたはネットワークインターフェイスコントローラー (NIC) に HaVip をアタッチします。
操作説明
この操作を呼び出して HaVip を関連付ける際は、以下の項目に注意してください:
-
HaVip はアタッチ後すぐに効果を発揮し、ECS インスタンスを再起動する必要はありません。ただし、ECS インスタンスの Elastic ネットワークインターフェイス (ENI) で HaVip を設定する必要があります。
-
HaVip と関連付ける ECS インスタンスは、同じ vSwitch に属している必要があります。
-
HaVip は、最大 10 個の ECS インスタンスまたは最大 10 個のネットワークインターフェイスコントローラー (NIC) に同時にアタッチできます。ただし、HaVip を ECS インスタンスとネットワークインターフェイスコントローラー (NIC) に同時に関連付けることはできません。
-
関連付ける ECS インスタンスは、Running または Stopped 状態である必要があります。
-
HaVip インスタンスは、Available または InUse 状態である必要があります。
-
AssociateHaVip 操作は非同期です。リクエストを送信すると、システムはリクエスト ID を返しますが、HaVip の関連付けはまだ完了していません。関連付けタスクはバックグラウンドで実行中です。 DescribeHaVips を呼び出して、HaVip の関連付けステータスをクエリできます:
HaVip が Associating 状態の場合、HaVip は関連付け中です。
HaVip が InUse 状態の場合、HaVip は関連付け済みです。
-
AssociateHaVip 操作は、同じ HaVip の同時関連付けをサポートしていません。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
vpc:AssociateHaVip |
create |
*Instance
*HaVip
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ClientToken |
string |
任意 |
リクエストのべき等性を確保するために使用されるクライアントトークン。 クライアントを使用してトークンを生成できますが、異なるリクエスト間でトークンが一意であることを確認する必要があります。ClientToken の値には ASCII 文字のみを含めることができます。 説明
このパラメーターを指定しない場合、システムは API リクエストの RequestId を ClientToken として自動的に使用します。各 API リクエストの RequestId は異なる場合があります。 |
0c593ea1-3bea-11e9-b96b-88e9fe63**** |
| RegionId |
string |
必須 |
HaVip のリージョン ID。 DescribeRegions 操作を呼び出して、最新のリージョンリストをクエリできます。 |
cn-shanghai |
| HaVipId |
string |
必須 |
関連付ける HaVip の ID。 |
havip-2zeo05qre24nhrqpy**** |
| InstanceId |
string |
必須 |
HaVip にアタッチする ECS インスタンスのインスタンス ID。 |
i-faf344422ffsfad**** |
| InstanceType |
string |
任意 |
HaVip にアタッチするインスタンスのタイプ。有効な値:
|
EcsInstance |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID。 |
C44F62BE-9CE7-4277-B117-69243F3988BF |
例
成功レスポンス
JSONJSON
{
"RequestId": "C44F62BE-9CE7-4277-B117-69243F3988BF"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | OperationUnsupported.BindOnFreeNetworkInterface | The network interface must be attached to an ECS instance. | |
| 400 | OperationUnsupported.BindMultipleType | You cannot bind HaVip to multiple instance types. | |
| 400 | OperationUnsupported.BindOnMultipleVswitch | The bound instance and HaVip must be on the same vSwitch. | |
| 400 | InvalidVip.Status | vip invalid status | |
| 400 | IncorrectHaVipStatus | HaVip can be operated by this action only when it's status is Available or InUse. | |
| 400 | IncorrectInstanceStatus | ECS instance can be operated by this action only when it?s status is Running or Stopped. | |
| 400 | CountLimitExceed.HaVipOnInstance | The amount of HaVip associated with the specified Instance reach its limits. | |
| 400 | CountLimitExceeded.HaVipOnECSInstance | The amount of Instance associated with the specified HaVip reach its limits. | |
| 400 | OperationFailed.DistibuteLock | Distibute lock fail. | |
| 400 | InvalidNetworkInterfaceId.NotFound | The network interface is not found. | |
| 400 | OperationFailed.QueryNetworkInterfaceInfo | Failed to query network interface information. | |
| 400 | IllegalParam.InstanceType | The specified instance type is invalid. Only ECS instances and network interface are allowed. | |
| 400 | OperationUnsupported.BindOnSameEcs | You cannot bind two network interfaces on the same ECS instance. | |
| 400 | OperationUnsupported.HavipBindType | You cannot bind HAVIP to network interface in the specified region. | |
| 400 | InvalidInstance.NotExist | InvalidInstance.NotExist : The specified Instance does not exist in the specified region. i-bp136w25mhx503ptilrh\r\nRequestId : A961CC27-D797-4E16-B1B3-19B9ECBA1495 | |
| 400 | OperationDenied.BindOnSameEcs | The operation is not allowed because networkinterface bind on same instance. | |
| 400 | Forbidden.HaVip | No permissions to perform operations on HAVIPs. Please apply for privilege--vpc_privilege_allow_buy_havip_instance. | |
| 400 | InvalidInstanceId.NotFound | The specified Instance does not exist in the specified region. | |
| 400 | ResourceNotFound.EcsInstance | The specified resource of ECS instance is not found. | |
| 400 | InvalidStatus.NotAllow | Bind instance status invalid | |
| 400 | InvalidHaVip.Exist | haVip already bind exist. | |
| 400 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | |
| 400 | QuotaExceeded.HaVipBindInstance | The amount of instance associated with the specified haVip reach its limits. | |
| 404 | InvalidHaVipId.NotFound | The specified HaVip does not exist in the specified region. | |
| 404 | InvalidInstanceId.NotFound | The specified Instance does not exist in the specified region. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。