VPC ピアリング接続を作成します。
操作説明
VPC ピアリング接続を作成する前に、以下の点にご注意ください。
-
CreateVpcPeerConnection は非同期操作です。システムは インスタンス ID を返しますが、IPsec 接続はまだ作成されておらず、バックグラウンドでタスクを実行します。GetVpcPeerConnectionAttribute を呼び出して、タスクのステータスをクエリします。
VPC ピアリング接続が 作成中 状態の場合、VPC ピアリング接続は作成中です。
VPC ピアリング接続が 有効 状態の場合、VPC ピアリング接続は作成されています。
VPC ピアリング接続が 承認待ち 状態の場合、これはクロスアカウント接続です。受信側で接続を承認する必要があります。
-
指定された期間内に CreateVpcPeerConnection を繰り返し呼び出すことはできません。
VPC ピアリング接続を作成すると、システムは自動的に Cloud Data Transfer (CDT) を有効化します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
vpc:CreateVpcPeerConnection |
create |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
VPC ピアリング接続を作成するリージョンの ID です。 DescribeRegions 操作を呼び出して、最新のリージョンリストをクエリします。 |
cn-hangzhou |
| VpcId |
string |
必須 |
リクエスト元 VPC の ID です。 |
vpc-bp1gsk7h12ew7oegk**** |
| AcceptingAliUid |
integer |
必須 |
リクエスト先 VPC が属する Alibaba Cloud アカウントの ID です。
説明
受信側が RAM ユーザーの場合、AcceptingAliUid に RAM ユーザーを作成した Alibaba Cloud アカウントの ID を設定します。 |
1210123456123456 |
| AcceptingRegionId |
string |
必須 |
作成する VPC ピアリング接続のリクエスト先 VPC のリージョン ID です。
|
cn-hangzhou |
| AcceptingVpcId |
string |
必須 |
リクエスト先 VPC の ID です。 |
vpc-bp1vzjkp2q1xgnind**** |
| Name |
string |
任意 |
VPC ピアリング接続の名前です。 名前は 2 ~ 128 文字で、数字、アンダースコア (_)、ハイフン (-) を使用できます。文字で始める必要があります。 |
vpcpeer |
| Description |
string |
任意 |
VPC ピアリング接続の説明です。 説明は 2 ~ 256 文字である必要があります。説明は文字で始める必要がありますが、 |
description |
| DryRun |
boolean |
任意 |
実際にリクエストを実行せずに、ドライランのみを実行するかどうかを指定します。有効な値:
|
false |
| ClientToken |
string |
任意 |
リクエストのべき等性を確保するために使用されるクライアントトークンです。 クライアントを使用してトークンを生成できますが、異なるリクエスト間でトークンが一意であることを確認する必要があります。トークンには ASCII 文字のみを含めることができ、長さは 64 文字を超えることはできません。 説明
このパラメーターを指定しない場合、システムは自動的に リクエスト ID を クライアントトークン として使用します。リクエスト ID はリクエストごとに異なる場合があります。 |
02fb3da4-130e-11e9-8e44-001**** |
| ResourceGroupId |
string |
任意 |
リソースグループの ID です。 リソースグループの詳細については、「リソースグループ」をご参照ください。 |
rg-acfmxazb4ph6aiy**** |
| Bandwidth |
integer |
任意 |
VPC ピアリング接続の帯域幅です。単位:Mbit/s。値は 0 より大きい整数である必要があります。このパラメーターを指定する前に、リージョン間 VPC ピアリング接続を作成していることを確認してください。 |
100 |
| LinkType |
string |
任意 |
作成する VPC ピアリング接続のリンクタイプです。有効な値:
説明
|
Gold |
| Tag |
array<object> |
任意 |
タグです。 |
|
|
object |
任意 |
タグです。 |
||
| Key |
string |
任意 |
タグキーです。少なくとも 1 つのタグキーを指定する必要があり、最大 20 個のタグキーを指定できます。タグキーは空の文字列にすることはできません。 タグキーの長さは最大 128 文字です。 |
FinanceDept |
| Value |
string |
任意 |
タグ値です。少なくとも 1 つのタグ値を指定する必要があり、最大 20 個のタグ値を指定できます。タグ値は空の文字列にすることができます。 タグ値の長さは最大 128 文字です。 |
FinanceJoshua |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
リクエスト ID です。 |
||
| RequestId |
string |
リクエスト ID です。 |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
| InstanceId |
string |
VPC ピアリング接続が作成されるインスタンスの ID です。 |
pcc-lnk0m24khwvtkm**** |
例
成功レスポンス
JSONJSON
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
"InstanceId": "pcc-lnk0m24khwvtkm****"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | OperationFailed.CdtNotOpened | The operation failed because the Cdt service is not opened. | |
| 400 | OperationFailed.CrossBorderCdtNotOpened | The operation failed because the CrossBorderCdt service is not opened. | |
| 400 | IncorrectStatus.Vpc | The status of %s [%s] is incorrect. | |
| 400 | IncorrectStatus.AcceptingVpc | The status of %s [%s] is incorrect. | |
| 400 | ResourceAlreadyExist.RouterInterface | The specified resource of %s already exists. | |
| 400 | ResourceAlreadyExist.VpcPeer | The specified resource of %s already exists. | |
| 400 | OperationDenied.CloudBoxExistsInVpc | The operation is not allowed because the CloudBox device exists in vpc. | |
| 400 | OperationDenied.CloudBoxExistsInAcceptingVpc | The operation is not allowed because the CloudBox device exists in accepting vpc. | |
| 400 | QuotaExceeded.VpcPeerCountPerVpc | The quota of %s is exceeded, usage %s/%s. | |
| 400 | UnsupportedRegion | The feature of %s is not supported in the region of %s. | |
| 400 | QuotaExceeded.VpcPeerCountPerUserPerRegion | The quota of %s is exceeded, usage %s/%s. | |
| 400 | IncorrectBusinessStatus.VpcPeer | The business status of %s [%s] is incorrect. | |
| 400 | OperationFailed.NotExist.ResourceGroup | The operation failed because the resource group does not exist. | |
| 400 | OperationFailed.AcceptUserCdtNotOpened | The operation failed because the Cdt service of accept user is not opened. | |
| 400 | OperationFailed.AcceptUserCrossBorderCdtNotOpened | The operation failed because the CrossBorderCdt service of accept user is not opened. | |
| 400 | IncorrectBusinessStatus.AcceptUserVpcPeer | The business status of %s [%s] is incorrect. | |
| 400 | OperationFailed.ViolativeVpcPeer | The creation operation fails because it is not allowed to create a vpc peer instance between the originating region and the receiving region. | |
| 400 | QuotaExceeded.CrossRegionVpcPeerCountPerVpc | The quota of %s is exceeded, usage %s/%s. | |
| 400 | QuotaExceeded.IntraRegionVpcPeerCountPerVpc | The quota of %s is exceeded, usage %s/%s. | |
| 400 | OperationDenied.OperateShareResource | The operation is not allowed because of operating shared resource. | |
| 400 | IncorrectBusinessStatus.AcceptVpcPeer | The business status of peer account is incorrect. | |
| 400 | OperationFailed.InterRegionLinkTypeNotSupported | The same region not supported link type feature. | |
| 400 | OperationFailed.RegionIdNotSupportLinkType | The feature link type is not supported in the region. | |
| 400 | OperationFailed.SpecificLinkTypeNotSupported | The operation failed because the special link type of user is not opened. | |
| 400 | OperationFailed.CrossBusinessNotAllowed | Operation failed because receiver and accepter belong to different business site. | |
| 400 | OperationFailed.ChargeTypeNotSupported | Operation failed because the CDT charge type of receiver or accepter does not support the Underlay link type. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。