Associates VPCs across accounts.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddUserVpcAuthorization

The operation that you want to perform. Set the value to AddUserVpcAuthorization.

AuthorizedUserId Long Yes 111222333

The ID of the Alibaba Cloud account to which the authorized resources belong.

AuthChannel String No AUTH_CODE

The authorization channel. Valid values:

  • AUTH_CODE: An authorization code is used to associate VPCs across accounts. The system checks whether the authorization code specified by AuthCode is correct.
  • RESOURCE_DIRECTORY: A resource directory is used to associate VPCs across accounts. The system checks whether the account that is specified by AuthorizedUserId and the current account are in the same resource directory.
  • If this parameter is empty, an authorization code is used to associate VPCs across accounts.
AuthCode String No 123456

The authorization code. If the AuthChannel parameter is set to AUTH_CODE or is empty, this parameter is required.

Response parameters

Parameter Type Example Description
RequestId String 46973D4C-E3E4-4ABA-9190-9A9DE406C7E

The ID of the request.

Examples

Sample requests

http(s)://pvtz.aliyuncs.com/?Action=AddUserVpcAuthorization
&AuthorizedUserId=111222333
&<Common request parameters>

Sample success responses

XML format

<RequestId>46973D4C-E3E4-4ABA-9190-9A9DE406C7E</RequestId>

JSON format

{
    "RequestId":"46973D4C-E3E4-4ABA-9190-9A9DE406C7E"
    }

Error codes

For a list of error codes, visit the API Error Center.