创建vpcep客户端
功能介绍
创建vpcep客户端。VPC打通APIG,使用户可以通过内网域名调用到fabric接口。此接口为同步接口,无配套使用接口和特殊场景。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
POST https://localhost.com/v1/access-clients
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
name |
否 |
String |
|
vpc_id |
否 |
String |
|
subnet_id |
否 |
String |
|
subnet_ids |
否 |
Array of strings |
|
access_connections |
否 |
Array of AccessConnectionRequestBody objects |
接入连接列表,当接入模式为CUSTOM模式时生效。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
vpcep_id |
否 |
String |
|
vpcep_service_name |
否 |
String |
|
domain |
否 |
String |
|
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
|
name |
String |
参数解释:名称。 约束限制:不涉及。 取值范围:长度为[1,64]的中文、字母、数字、下划线(_)、中划线(-)、点(.)、空格的组合。 默认取值:不涉及。 |
status |
String |
|
vpc_id |
String |
|
subnet_ids |
Array of strings |
|
access_connections |
Array of AccessConnectionInfo objects |
|
create_time |
String |
|
参数 |
参数类型 |
描述 |
---|---|---|
vpcep_id |
String |
|
subnet_id |
String |
|
domain |
String |
|
ip |
String |
|
owner |
String |
|
状态码:400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
状态码:401
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
状态码:404
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
状态码:408
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
状态码:500
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
请求示例
创建vpcep客户端。具体请求配置如样例所示。
POST https://{endpoint}/v1/access-clients
{
"name" : "zzh_test001",
"vpc_id" : "050e154d-9954-4929-b6d3-12af7c9213ac",
"subnet_id" : "string",
"subnet_ids" : [ "0d86d58d-d864-47ce-8dbd-5487ff1d59ba" ],
"access_connections" : [ {
"vpcep_id" : "string",
"vpcep_service_name" : "string",
"domain" : "string"
} ]
}
响应示例
状态码:200
创建接入客户端的响应体。
{
"id" : "f7670aea-36a1-4bdf-ae99-963c33324370",
"name" : "name",
"status" : "RUNNING",
"vpc_id" : "f18a378a-f26b-461d-985f-3f904e4cc544",
"subnet_ids" : [ "1e9a3f25-0f1f-40c4-8ef9-e4a8dd4d1e53" ],
"access_connections" : [ {
"vpcep_id" : "1851896e-3731-4072-8b4a-33e38ed2207b",
"domain" : "1e9a3f25-0f1f-40c4-8ef9-e4a8dd4d1e53",
"ip" : "192.168.0.57",
"owner" : "0676610f3a0a4c2c80c50bea7ddf18c1"
} ],
"create_time" : "2025-01-08T01:53:30.000+00:00"
}
状态码:400
BadRequest
{
"error_code" : "common.01000001",
"error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException"
}
状态码:401
Unauthorized
{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed"
}
状态码:403
Forbidden
{
"error" : {
"code" : "403",
"message" : "X-Auth-Token is invalid in the request",
"title" : "Forbidden"
},
"error_code" : 403,
"error_msg" : "X-Auth-Token is invalid in the request",
"title" : "Forbidden"
}
状态码:404
NotFound
{
"error_code" : "common.01000001",
"error_msg" : "response status exception, code: 404"
}
状态码:408
Request Time-out
{
"error_code" : "common.00000408",
"error_msg" : "timeout exception occurred"
}
状态码:500
InternalServerError
{
"error_code" : "common.00000500",
"error_msg" : "internal error"
}
状态码
状态码 |
描述 |
---|---|
200 |
创建接入客户端的响应体。 |
400 |
BadRequest |
401 |
Unauthorized |
403 |
Forbidden |
404 |
NotFound |
408 |
Request Time-out |
500 |
InternalServerError |
错误码
请参见错误码。