Grants a virtual border router (VBR) permissions to connect to a virtual private cloud (VPC) that belongs to another Alibaba Cloud account.
Usage notes
When you connect a VBR to a VPC that belongs to another Alibaba Cloud account, the VBR must acquire the required permissions from the VPC.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GrantInstanceToVbr | The operation that you want to perform. Set the value to GrantInstanceToVbr. |
RegionId | String | Yes | cn-hangzhou | The ID of the region where the VPC is deployed. You can call the DescribeRegions operation to query the most recent region list. |
VbrOwnerUid | Long | Yes | 1210123456123456 | The ID of the Alibaba Cloud account to which the VBR belongs. |
VbrInstanceIds | Array of String | No | vbr-m5ex0xf63xk8s5bob****,vbr-bp1h6efd7a5g66xxd**** | The VBR that needs to acquire permissions on the VPC. You can specify multiple VBRs and separate them with commas (,).
|
InstanceId | String | Yes | vpc-bp1lqhq93q8evjpky**** | The ID of the VPC. |
GrantType | String | Yes | All | The VBRs that need to acquire permissions on the VPC. Valid values:
|
VbrRegionNo | String | Yes | cn-hangzhou | The ID of the region where the VBR is deployed. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | F99F13AE-D733-5856-AB97-80CC88B1D5A8 | The request ID. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=GrantInstanceToVbr
&RegionId=cn-hangzhou
&VbrOwnerUid=1210123456123456
&VbrInstanceIds=["vbr-m5ex0xf63xk8s5bob****,vbr-bp1h6efd7a5g66xxd****"]
&InstanceId=vpc-bp1lqhq93q8evjpky****
&GrantType=All
&VbrRegionNo=cn-hangzhou
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GrantInstanceToVbrResponse>
<RequestId>F99F13AE-D733-5856-AB97-80CC88B1D5A8</RequestId>
</GrantInstanceToVbrResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "F99F13AE-D733-5856-AB97-80CC88B1D5A8"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParam.NotNull | The parameter must not be null. | The error message returned because a parameter is not set. |
400 | Parameter.Illegal | The parameter is illegal. | The error message returned because a parameter is set to an invalid value. |
400 | Instance.StatusError | The status of instance error. | The error message returned because the instance is in an invalid state. |
404 | Instance.NotExist | The instance not exist. | The error message returned because the instance does not exist. |
For a list of error codes, visit the API Error Center.