Connects an on-premises network to cloud services.

Background information

Cloud services refer to the Alibaba Cloud services that use the 100.64.0.0/10 CIDR block to provide services. These cloud services include Object Storage Service (OSS), Log Service, and Data Transmission Service (DTS). If your on-premises network needs to access a cloud service, you must attach the virtual border router (VBR) or Cloud Connect Network (CCN) instance that is connected to your on-premises network to a Cloud Enterprise Network (CEN) instance. In addition, you must attach a virtual private cloud (VPC) that is deployed in the same region as the cloud service to the CEN instance. This way, your on-premises network can connect to the VPC that is deployed in the same region as the cloud service and access the cloud service through the VPC.

Usage notes

  • An on-premises network associated with a VBR can use CEN to access only a cloud service that is deployed in the same region.

    For example, if cloud services are deployed in the China (Beijing) region, only on-premises networks connected to VBRs in the China (Beijing) region can access the cloud services.

  • ResolveAndRouteServiceInCen is an asynchronous operation. After you send a request, the request ID is returned but the operation is still being performed in the system background. You can call DescribeRouteServicesInCen to query the status of a cloud service.
    • If a cloud service is in the Creating state, the connection to the cloud service is being created. In this case, you can query the cloud service but cannot perform other operations.
    • If a cloud service is in the Active state, the connection to the cloud service is created.
    • If a cloud service is in the Failed state, the connection to the cloud service failed.

Prerequisites

Before you call this operation, make sure that the following conditions are met:

  • The VBR or CCN instance to which your on-premises network is connected is attached to a CEN instance.
  • A VPC that is deployed in the same region as the cloud service is also attached to the CEN instance. For more information, see AttachCenChildInstance.

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 ResolveAndRouteServiceInCen

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

ClientToken String No 02fb3da4****

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among different requests. ClientToken can contain only ASCII characters.

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId may be different for each API request.
CenId String Yes cen-ckwa2hhmuislse****

The ID of the CEN instance.

Host String Yes 100.118.28.0/24

The IP addresses or CIDR blocks of the cloud service.

Note In most cases, multiple IP addresses or CIDR blocks are attached to the cloud service. We recommend that you call this operation multiple times to add all IP addresses and CIDR blocks of the cloud service.
HostRegionId String Yes cn-hangzhou

The ID of the region in which the cloud service is deployed.

HostVpcId String Yes vpc-o6woh5s494zueq40v****

The ID of the VPC that is associated with the cloud service.

Description String No descname

The description of the cloud service.

The description can be empty or 2 to 256 characters in length. It must start with a letter, and can contain digits, hyphens (-), periods (.), and underscores (_). It cannot start with http:// or https://.

AccessRegionIds.N String Yes cn-hangzhou

The ID of the region in which the network instance of the cloud service that you want to access is deployed.

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

Response parameters

Parameter Type Example Description
RequestId String C0245BEF-52AC-44A8-A776-EF96FD26A5CA

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ResolveAndRouteServiceInCen
&ClientToken=02fb3da4****
&CenId=cen-ckwa2hhmuislse****
&Host=100.118.28.0/24
&HostRegionId=cn-hangzhou
&HostVpcId=vpc-o6woh5s494zueq40v****
&Description=descname
&<Common request parameters>

Sample success responses

XML format

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

<ResolveAndRouteServiceInCenResponse>
       <RequestId>C0245BEF-52AC-44A8-A776-EF96FD26A5CA</RequestId>
</ResolveAndRouteServiceInCenResponse>

JSON format

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

{
  "RequestId" : "C0245BEF-52AC-44A8-A776-EF96FD26A5CA"
}

Error codes

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