Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.94 KB

11-Endpoint-EN.md

File metadata and controls

65 lines (43 loc) · 1.94 KB

← Package Management | Endpoint(中文) | Home →


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
endpoints.AddEndpointMapping("<RegionID>", "<Product>", "<Endpoint>")

// Only works for the current request
request := ecs.CreateDescribeRegionsRequest()
request.Domain = "<Endpoint>"

// Only works for the current client
client, _ := ecs.NewClientWithAccessKey("<RegionID>", "<AccessKeyID>", "<AccessKeySecret>")
client.Domain = "<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)
client.Network = "public"; // Since the default value of `productNetwork` is `public`, there is no need to configure `productNetwork` by default.

// Share-domain request
client.Network = "share";

// Ipv6 network request
client.Network = "ipv6";

// Proxy network request
client.Network = "proxy";

// Internal network request
client.Network = "inner";

// Ipv4/Ipv6 Dual Stack
client.Network = "dualstack";

// Vpc network request
client.Network = "vpc";
  1. Search endpoint from the endpoints_config.go endpoint data file in the Go 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.


← Package Management | Endpoint(中文) | Home →