← Credentials | Endpoint Configuration (中文) | Transport →
Default
When no Endpoint is specified, Automatic Endpoint Addressing is used.
By directly specifying host in the client configuration, you can force the SDK to send all requests to that address. This is the highest priority configuration.
const client = new ECSClient({
host: "open.volcengineapi.com",
region: "cn-beijing",
});const client = new ECSClient({
region: "cn-beijing",
});Default
Automatic addressing is supported by default, no need to manually specify Endpoint.
The SDK automatically constructs a reasonable access address based on service name, region, and other information, and supports DualStack.
-
Whether to auto-address Region The SDK only performs auto-addressing for regions in the built-in bootstrap region list; other regions return
open.volcengineapi.comby default.Built-in bootstrap region list (source: packages/sdk-core/src/utils/endpoint.ts):
cn-beijing-autodrivingap-southeast-2ap-southeast-3cn-shanghai-autodrivingcn-beijing-selfdrive
Extend via
VOLC_BOOTSTRAP_REGION_LIST_CONFenv var (file path) orcustomBootstrapRegion(Record<string, any>) in code. -
DualStack Support (IPv6) Enable via
useDualStack: trueorVOLC_ENABLE_DUALSTACKenv var. Priority:useDualStack>VOLC_ENABLE_DUALSTACK. When enabled, the domain suffix switches fromvolcengineapi.comtovolcengine-api.com. -
Auto-construct Endpoint address
- Global Services (e.g., CDN, IAM):
<ServiceName>.volcengineapi.com - Regional Services (e.g., ECS, RDS):
<ServiceName>.<RegionName>.volcengineapi.com - Unregistered Services: If the service is not in the SDK's built-in service list,
open.volcengineapi.comis returned even if the region is in the bootstrap list
Service names are standardized when constructing the domain: uppercase → lowercase, underscore
_→ hyphen-. For example,rds_mysql→rds-mysql.cn-beijing.volcengineapi.com - Global Services (e.g., CDN, IAM):
import { ECSClient } from "@volcengine/ecs";
// SDK auto-resolves Endpoint for bootstrap regions to: ecs.cn-beijing-autodriving.volcengineapi.com
const client = new ECSClient({
region: "cn-beijing-autodriving",
});const client = new ECSClient({
region: "cn-beijing-autodriving",
useDualStack: true,
});
// Generated Endpoint: ecs.cn-beijing-autodriving.volcengine-api.comIf the region is not in the SDK's bootstrap region list, the SDK defaults to open.volcengineapi.com.
For example, with the default configuration, cn-beijing is not in the built-in bootstrap region list, so ECS auto endpoint resolution falls back to open.volcengineapi.com. To generate ecs.cn-beijing.volcengineapi.com, add cn-beijing to the bootstrap region list via customBootstrapRegion or VOLC_BOOTSTRAP_REGION_LIST_CONF.
Extend via VOLC_BOOTSTRAP_REGION_LIST_CONF env var pointing to a file (one region per line), or via customBootstrapRegion parameter:
import { ECSClient } from "@volcengine/ecs";
const client = new ECSClient({
region: "my-private-region",
customBootstrapRegion: {
"my-private-region": {},
},
});
// Generated Endpoint: ecs.my-private-region.volcengineapi.com| Global Service | DualStack | Format |
|---|---|---|
| Yes | Yes | {Service}.volcengine-api.com |
| Yes | No | {Service}.volcengineapi.com |
| No | Yes | {Service}.{region}.volcengine-api.com |
| No | No | {Service}.{region}.volcengineapi.com |
← Credentials | Endpoint Configuration (中文) | Transport →