Endpoint is the domain name of the service API. like
ecs.cn-hangzhou.aliyuncs.com
- 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>");
- 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();
-
Search endpoint from the endpoints.json endpoint data file in the Java SDK Core Internal operation, no additional configuration required.
-
Request Location Service API to get
Endpoint
from the remote end.
Requires product SDK with ServiceCode
.