接続する仮想プライベートクラウド (VPC) を転送ルーターにアタッチします。 同じ転送ルーターに VPC をアタッチすると、VPC は相互に通信できます。
操作説明
-
Enterprise Edition 転送ルーターから VPC 接続を作成するには、次の方法を使用できます。
VpcIdZoneMappings.N.VSwitchIdZoneMappings.N.ZoneId一部のプラグインリージョン IDVPC 接続を作成するリージョンに Enterprise Edition 転送ルーターがすでに作成されている場合は、、、、、および パラメーターを構成します。
VpcIdヒント:ZoneMappings.N.ZoneId注意:注意:VPC 接続を作成するリージョンに Enterprise Edition 転送ルーターが作成されていない場合は、、、、、および パラメーターを構成します。 その後、システムは指定されたリージョンに Enterprise Edition 転送ルーターを自動的に作成します。
-
CreateTransitRouterVpcAttachment は非同期操作です。リクエストが送信されると、システムはリクエスト ID を返し、バックグラウンドでタスクを実行します。ListTransitRouterVpcAttachments 操作を呼び出して、VPC 接続のステータスをクエリできます。
VPC 接続が [アタッチ中] 状態の場合、VPC 接続は作成中です。VPC 接続をクエリすることはできますが、他の操作は実行できません。
VPC 接続が [接続済み] 状態の場合、VPC 接続が作成されます。
-
デフォルトでは、ルート学習と関連付けられた転送は、転送ルーターのルートテーブルと VPC 接続の間で無効になっています。
前提条件
この操作を呼び出す前に、次の要件が満たされていることを確認してください。
Enterprise Edition 転送ルーターのゾーン内の VPC には、少なくとも 1 つの vSwitch が含まれています。 各 vSwitch には、少なくとも 1 つのアイドル IP アドレスが必要です。 詳細については、「Enterprise Edition 転送ルーターでサポートされているリージョンとゾーン」をご参照ください。
別の Alibaba Cloud アカウントに属するネットワークインスタンスに接続するには、最初にそのアカウントから権限を取得する必要があります。 詳細については、「別のアカウントに属するネットワークインスタンスに接続するための権限を取得する」をご参照ください。
VPC 接続には料金が発生します。 VPC 接続を作成する前に、VPC 接続の課金ルールを理解していることを確認してください。 詳細については、「課金」をご参照ください。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
cen:CreateTransitRouterVpcAttachment |
create |
CenInstance
TransitRouter
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ClientToken |
string |
任意 |
リクエストのべき等性を確保するために使用されるクライアントトークン。 クライアントを使用してトークンを生成できますが、異なるリクエスト間でトークンが一意であることを確認する必要があります。 トークンには ASCII 文字のみを含めることができます。 説明
このパラメーターを指定しない場合、システムはリクエスト ID をクライアントトークンとして自動的に使用します。 リクエスト ID はリクエストごとに異なる場合があります。 |
02fb3da4-130e-11e9-8e44-001**** |
| CenId |
string |
任意 |
クラウドエンタープライズネットワーク (CEN) インスタンスの ID。 |
cen-j3jzhw1zpau2km**** |
| TransitRouterId |
string |
任意 |
Enterprise Edition 転送ルーターの ID。 |
tr-bp1su1ytdxtataupl**** |
| RegionId |
string |
任意 |
VPC がデプロイされているリージョンの ID。 DescribeChildInstanceRegions 操作を呼び出して、最新のリージョンリストをクエリできます。 |
cn-hangzhou |
| TransitRouterAttachmentName |
string |
任意 |
VPC 接続の名前。 名前は 1 ~ 128 文字で、http:// または https:// で始めることはできません。 このパラメーターを空のままにすることもできます。 |
testname |
| TransitRouterAttachmentDescription |
string |
任意 |
VPC 接続の説明。 説明は 1 ~ 256 文字で、http:// または https:// で始めることはできません。 このパラメーターを空のままにすることもできます。 |
testname |
| VpcId |
string |
必須 |
VPC ID。 |
vpc-bp1kbjcre9vtsebo1**** |
| VpcOwnerId |
integer |
任意 |
VPC が属する Alibaba Cloud アカウントの ID。 デフォルト値は現在の Alibaba Cloud アカウントの ID です。 説明
ネットワークインスタンスと CEN インスタンスが異なる Alibaba Cloud アカウントに属している場合、このパラメーターは必須です。 |
1250123456123456 |
| ChargeType |
string |
任意 |
課金方法。 デフォルト値は POSTPAY で、従量課金制を指定します。 |
POSTPAY |
| DryRun |
boolean |
任意 |
ドライランを実行するかどうかを指定します。 有効な値:
|
false |
| ZoneMappings |
array<object> |
必須 |
Enterprise Edition 転送ルーターをサポートするゾーン。 最大 10 ゾーンを指定できます。 |
|
|
object |
任意 |
Enterprise Edition 転送ルーターをサポートするゾーンと、そのゾーンの vSwitch に関する情報。 |
||
| VSwitchId |
string |
必須 |
Enterprise Edition 転送ルーターをサポートするゾーンにデプロイされている vSwitch。 呼び出しごとに最大 10 ゾーンの vSwitch を指定できます。 |
vsw-bp1a214sbus8z3b54**** |
| ZoneId |
string |
必須 |
Enterprise Edition 転送ルーターをサポートするゾーンの ID。 DescribeZones 操作を呼び出して、最新のゾーンリストをクエリできます。 呼び出しごとに最大 10 ゾーンを指定できます。 |
cn-hangzhou-h |
| AutoPublishRouteEnabled |
boolean |
任意 |
Enterprise Edition 転送ルーターが VPC にルートを自動的にアドバタイズするのを有効にするかどうかを指定します。 有効な値:
|
true |
| TransitRouterVPCAttachmentOptions |
object |
任意 |
VPC 接続の機能構成。 |
|
|
string |
任意 |
VPC 接続の機能。 ipv6Support: IPv6 を有効にするかどうかを指定します。
説明
VPC 接続で IPv6 を有効にする前に、VPC と VPC の vSwitch で IPv6 が有効になっていることを確認してください。 詳細については、「AllocateVpcIpv6Cidr」および「CreateVSwitchCidrReservation」をご参照ください。 |
disable |
|
| Tag |
array<object> |
任意 |
タグに関する情報。 呼び出しごとに最大 20 タグを指定できます。 |
|
|
object |
任意 |
|||
| Key |
string |
任意 |
タグキー。 タグキーは空の文字列にすることはできません。 タグキーは最大 64 文字で、 最大 20 個のタグキーを指定できます。 |
tagtest |
| Value |
string |
任意 |
タグ値。 タグ値は 0 ~ 128 文字で、 各タグキーには一意のタグ値が必要です。 呼び出しごとに最大 20 個のタグ値を指定できます。 |
tagtest |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
レスポンス。 |
||
| TransitRouterAttachmentId |
string |
VPC 接続の ID。 |
tr-attach-ia340z7xis7t5s**** |
| RequestId |
string |
リクエストの ID。 |
C087A369-82B9-43EF-91F4-4B63A9C6E6B6 |
例
成功レスポンス
JSONJSON
{
"TransitRouterAttachmentId": "tr-attach-ia340z7xis7t5s****",
"RequestId": "C087A369-82B9-43EF-91F4-4B63A9C6E6B6"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | OperationUnsupported.TransitRouterRegionId | The specified TransitRouterRegion does not support the operation. | |
| 400 | NoPermission.AliyunServiceRoleForCEN | You are not authorized to create the service linked role. Role Name: AliyunServiceRoleForCEN. Service Name: cen.aliyuncs.com. Make sure that the user has been granted the ram:CreateServiceLinkedRole permission. | |
| 400 | IllegalParam.RegionId | The Specified Parameter RegionId is illegal | |
| 400 | MissingParam.CenIdOrRegionId | Either CenId or RegionId must be specified. | |
| 400 | IllegalParam.ZoneId | The specified ZoneId is illegal. | |
| 400 | IllegalParam.ChargeType | The specified ChargeType is illegal. | |
| 400 | InvalidTransitRouterId.NotFound | The specified TransitRouterId is not found. | |
| 400 | IncorrectStatus.VpcResource | The resource is not in a valid state for the attachment operation. | |
| 400 | IncorrectStatus.Vpc | The resource is not in a valid state for the attachment operation. | |
| 400 | IncorrectStatus.VpcOrVswitch | The Vpc Or Vswith is not in a valid state for the attachment operation. | |
| 400 | OperationNotSupport.VpcAutoRoutesPublish | Auto publish vpc routes is not supported in this region. | |
| 400 | InvalidOperation.VpnAssociated | The operation is not supported because the VPC is associated with VPN. | |
| 400 | Forbbiden.TransitRouterServiceNotOpen | The user has not open transit router service. | |
| 400 | IllegalParam.ZoneMappings | The Specified Parameter ZoneMappings is illegal | |
| 400 | OperationUnsupported.TransitRouterType | The specified TransitRouterType does not support the operation. | |
| 400 | InvalidCenId.NotFound | CenId is not found. | |
| 400 | IllegalParam.VSwitchId | VSwitchId is illegal. | |
| 400 | IncorrectStatus.TransitRouterInstance | The status of TransitRouter is incorrect. | |
| 400 | OperationUnsupported.CenFullLevel | CEN full level does not support TransitRouter | |
| 400 | IllegalParam.ServiceMode | ServiceMode is illegal. | |
| 400 | QuotaFull.ChildInstanceRelatedCen | The childinstance has exceed the quota of the times that a childinstance can be attached as an attachment. | |
| 400 | OperationUnsupported.CloudBoxVswNotSupport | Cloud Box vsw does not support. | |
| 400 | IncorrectStatus.TransitRouter | The status of TransitRouter is incorrect. | |
| 400 | Duplicated.ZoneMapping | The parameter ZoneMapping is duplicated. | |
| 400 | QuotaExceeded.CenQuotaVpcAttachPerTransitRouter | The maximum number of VPC attachment per Transit Router is exceeded. | |
| 400 | IncorrectStatus.VpcRouteTable | The VPC route table is not in a desired state. | |
| 400 | InvalidStatus.VpcAttachedFullModeCen | The VPC has been attached to another CEN instance whose protection level is FULL. | |
| 400 | Forbbiden.AttachChildInstanceAcrossBid | VPCs that belong to another BID cannot be associated. You need to apply for cross-BID attaching. | |
| 400 | InvalidOperation.VpcAutoRoutesPublishInOtherCEN | The specified VPC already has its routes synchronized with another CEN instance. | |
| 400 | QuotaExceeded.VpcAutoRoutesPublishPerTransitRouter | The number of VPCs that have route synchronization enabled has reached the upper limit. | |
| 400 | InsufficientIpAddr.vsw | Insufficient available IP addresses in the vSwitch. | |
| 400 | Forbidden.ResourceOwnerTransitRouterServiceNotOpen | The resource owner user has not opened transit router service. | |
| 400 | IllegalParam.TransitRouterRegionId | TransitRouterRegionId is illegal. | |
| 400 | InvalidTransitRouterMode.NeedUpgrade | TransitRouter need to upgrade. | |
| 400 | IllegalParam.Ipv6Support | Ipv6Support is illegal. Valid Values are [enable, disable]. | |
| 400 | OperationFailed.VSwitchNotFound | The specified vswitch not found. | |
| 400 | OperationFailed.VSwitchIpv6CidrNotAllocated | The specified vswitch does not have IPv6 address allocated. | |
| 400 | Forbidden.ResourceOwnerTransitRouterServiceExpired | The transit router service of the account to which the resource belongs has been suspended due to arrears. Please notify the other party to renew the service and try again. | |
| 400 | Forbidden.TransitRouterServiceExpired | The transit router service is out of service. | |
| 400 | InvalidParameter | Invalid parameter. | |
| 400 | Unauthorized | The AccessKeyId is unauthorized. | |
| 400 | InvalidParameter.ResourceType | The specified parameter ResourceType is invalid. | |
| 400 | ParamExclusive.TransitRouterVPCAttachmentOptionsAndOptions | When creating or modifying a VPC attachment, the input parameter TransitRouterVPCAttachmentOptions and Options cannot be used at the same time. | |
| 400 | InvalidParameter.ApplianceModeSupport | The specified parameter ApplianceModeSupport is invalid. | |
| 400 | InvalidParameter.Ipv6Support | The specified parameter Ipv6Support is invalid. | |
| 400 | INVALID_OPERATION_RESOURCE_NOT_SUPPORT_APPLIANCE_MODE | Only VPC attachment support appliance mode. | |
| 404 | InvalidVSwitchId.NotFound | The specified VSwitchId is not found. | |
| 409 | InvalidOperation.CenInstanceStatus | The CEN instance is not in a valid state for the operation. | |
| 409 | IncorrectStatus.VpcSwitch | The resource is not in a valid state for the attachment operation. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。