Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 2.16 KB

10-Endpoint-EN.md

File metadata and controls

64 lines (43 loc) · 2.16 KB

← 异常 | Endpoint(中文) | 首页 →


Endpoint

Endpoint is the domain name of the service API. like ecs.cn-hangzhou.aliyuncs.com

Search Endpoint

Related source code

  1. User custom defined

User custom defined is the highest-priority logic to search endpoint and allows you to specify endpoint specifics directly.

// Global effect
DefaultProfile.addEndpoint("<RegionID>", "<Product>", "<Endpoint>");

// Only works for the current request
DescribeRegionsRequest request = new DescribeRegionsRequest();
request.setSysEndpoint("<Endpoint>");
  1. Endpoint Splicing Rules

Endpoint Splicing Rules does not take effect until the vpc network is enabled or the product SDK has an Endpoint data file. Endpoint Data File Example : (Ecs Endpoint Data File)

// Public network request(default)
request.productNetwork = "public"; // Since the default value of `productNetwork` is `public`, there is no need to configure `productNetwork` by default.

// Share-domain request
request.productNetwork = "share";

// Ipv6 network request
request.productNetwork = "ipv6";

// Proxy network request
request.productNetwork = "proxy";

// Internal network request
request.productNetwork = "inner";

// Ipv4/Ipv6 Dual Stack
request.productNetwork = "dualstack";

// Vpc network request
request.productNetwork = "vpc";
// Or access the vpc network by enabling the `enableUsingVpcEndpoint` configuration
DefaultProfile profile = DefaultProfile.getProfile("<RegionID>", "<AccessKeyId>", "<AccessKeySecret>");
profile.enableUsingVpcEndpoint();
  1. Search endpoint from the endpoints.json endpoint data file in the Java SDK Core Internal operation, no additional configuration required.

  2. Request Location Service API to get Endpoint from the remote end.

Requires product SDK with ServiceCode.


← 异常 | Endpoint(中文) | 首页 →