All Products
Search
Document Center

Virtual Private Cloud:GrantInstanceToVbr

Last Updated:Mar 22, 2024

Grants a virtual border router (VBR) the permissions to connect to a virtual private cloud (VPC) that belongs to another Alibaba Cloud account.

Operation description

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:GrantInstanceToVbrWrite
  • VPC
    acs:vpc:{#regionId}:{#AccountId}:vpc/{#VpcId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the VPC is deployed.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
VbrOwnerUidlongYes

The ID of the Alibaba Cloud account to which the VBR belongs.

1210123456123456
VbrInstanceIdsarrayNo

The information about the VBRs.

stringNo

The VBR that needs to acquire permissions on the VPC. You can specify multiple VBRs and separate them with commas (,).

  • When GrantType is set to All, permissions on the VPC are granted to all VBRs that belong to the specified region and Alibaba Cloud account. In this case, you can leave this parameter empty.
  • If you set GrantType to Specify, you must set VbrInstanceIds to specify the VBRs to which the permissions are granted.
vbr-m5ex0xf63xk8s5bob****,vbr-bp1h6efd7a5g66xxd****
InstanceIdstringYes

The ID of the VPC.

vpc-bp1lqhq93q8evjpky****
GrantTypestringYes

The VBRs that need to acquire permissions on the VPC. Valid values:

  • All: Permissions on the VPC are granted to all VBRs that belong to the specified region and Alibaba Cloud account. In this case, you can leave VbrInstanceIds empty.
  • Specify: Permissions on the VPC are granted to the specified VBRs. VbrInstanceIds must be assigned a value.
All
VbrRegionNostringYes

The ID of the region where the VBR is deployed.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The request ID.

F99F13AE-D733-5856-AB97-80CC88B1D5A8

Examples

Sample success responses

JSONformat

{
  "RequestId": "F99F13AE-D733-5856-AB97-80CC88B1D5A8"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParam.NotNullThe parameter must not be null.A required parameter is not specified.
400Parameter.IllegalThe parameter is illegal.The parameter is invalid.
400Instance.StatusErrorThe status of instance error.The status of the instance is invalid.
404Instance.NotExistThe instance not exist.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-21API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404