Creates an endpoint.

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 AddResolverEndpoint

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

Lang String Yes en

The language.

Name String Yes endpoint-test-name

The name of the endpoint.

VpcRegionId String Yes cn-hangzhou

The region ID of the virtual private cloud (VPC) where the endpoint resides.

VpcId String Yes vpc-129343jslslsks

The ID of the VPC.

SecurityGroupId String Yes kqlqlqjqqkq

The ID of the security group.

IpConfig.N.VSwitchId String Yes sjqkql

The ID of the vSwitch.

IpConfig.N.CidrBlock String Yes 172.16.0.0/24

The subnet mask of the IPv4 CIDR block of the vSwitch.

IpConfig.N.AzId String Yes cn-hangzhou-a

The ID of the zone.

IpConfig.N.Ip String No 172.16.xx.xx

The source IP address for the outbound traffic. The IP address must be within the specified CIDR block.

Response parameters

Parameter Type Example Description
RequestId String 32436208-E1AF-4DAB-B3B8-24F5F25B0950

The ID of the request.

EndpointId String hra0**

The ID of the endpoint.

Examples

Sample request

http(s)://pvtz.aliyuncs.com/?Action=AddResolverEndpoint
&Lang=en
&Name=endpoint-test-name
&VpcRegionId=cn-hangzhou
&VpcId=vpc-129343jslslsks
&SecurityGroupId=kqlqlqjqqkq
&IpConfig=[{"VSwitchId":"sjqkql","CidrBlock":"172.16.0.0/24","AzId":"cn-hangzhou-a","Ip":"172.16.xx.xx"}]
&<Common request parameters>

Sample success responses

XML format

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

<AddResolverEndpointResponse>
    <RequestId>32436208-E1AF-4DAB-B3B8-24F5F25B0950</RequestId>
    <EndpointId>hra0**</EndpointId>
</AddResolverEndpointResponse>

JSON format

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

{
  "RequestId" : "32436208-E1AF-4DAB-B3B8-24F5F25B0950",
  "EndpointId" : "hra0**"
}

Error codes

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