All Products
Search
Document Center

Key Management Service:UpdateKmsInstanceBindVpc

Last Updated:Oct 11, 2023

Updates the virtual private cloud (VPC) that is associated with a Key Management Service (KMS) instance.

Usage notes

If your own applications are deployed in multiple VPCs in the same region, you can associate the VPCs except the VPC in which the KMS instance resides with the KMS instance. This topic describes how to configure the VPCs.

The VPCs can belong to the same Alibaba Cloud account or different Alibaba Cloud accounts. After the configuration is complete, the applications in these VPCs can access the KMS instance.

Note If the VPCs belong to different Alibaba Cloud accounts, you must first configure resource sharing to share the vSwitches of other Alibaba Cloud accounts with the Alibaba Cloud account to which the KMS instance belongs. For more information, see Access a KMS instance from multiple VPCs in the same region.

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 UpdateKmsInstanceBindVpc

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

KmsInstanceId String Yes kst-phzz64f722a1buamw0****

The ID of the KMS instance.

BindVpcs String Yes [{"VpcId":"vpc-bp1go9qvmj78j4f4c****","VSwitchId":"vsw-bp16c5pvvcf0fp5b9****","RegionId":"cn-hangzhou","VpcOwnerId":120708975881****},{"VpcId":"vpc-bp14c07ucxg6h1xjm****","VSwitchId":"vsw-bp1wujtnspi1l3gvu****","RegionId":"cn-hangzhou","VpcOwnerId":119285303511****}]

The VPC configuration. The configuration of each VPC contains the following content:

  • VpcId: the ID of the VPC.
  • VSwitchId: the vSwitch in the VPC.
  • RegionID: the ID of the region to which the VPC belongs.
  • VpcOwnerId: the Alibaba Cloud account to which the VPC belongs.

Format: [{"VpcId":"${VpcId}","VSwitchId":"${VSwitchId}","RegionId":"${RegionId}","VpcOwnerId":${VpcOwnerId}},..].

Response parameters

Parameter

Type

Example

Description

RequestId String d3eca5c8-a856-4347-8eb6-e1898c3fda2e

The ID of the request, which is used to locate and troubleshoot issues.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateKmsInstanceBindVpc
&KmsInstanceId=kst-phzz64f722a1buamw0****
&BindVpcs=[{\"VpcId\":\"vpc-bp1go9qvmj78j4f4c****\",\"VSwitchId\":\"vsw-bp16c5pvvcf0fp5b9****\",\"RegionId\":\"cn-hangzhou\",\"VpcOwnerId\":120708975881****},{\"VpcId\":\"vpc-bp14c07ucxg6h1xjm****\",\"VSwitchId\":\"vsw-bp1wujtnspi1l3gvu****\",\"RegionId\":\"cn-hangzhou\",\"VpcOwnerId\":119285303511****}]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateKmsInstanceBindVpcResponse>
    <RequestId>d3eca5c8-a856-4347-8eb6-e1898c3fda2e</RequestId>
</UpdateKmsInstanceBindVpcResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "d3eca5c8-a856-4347-8eb6-e1898c3fda2e"
}

Error codes

For a list of error codes, see Service error codes.