开始使用
实例
网络
创建 VPC 网络
POST
/
gpu-instance
/
openapi
/
v1
/
network
/
create
curl --request POST \
--url https://api.ppinfra.com/gpu-instance/openapi/v1/network/create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '{
"clusterId": "<string>",
"name": "<string>"
}'
{
"network": [
{
"Id": "<string>",
"user": "<string>",
"name": "<string>",
"state": [
{
"state": "<string>",
"error": "<string>"
}
],
"segment": "<string>",
"clusterId": "<string>",
"Addresses": [
{
"Id": "<string>",
"Ip": "<string>"
}
],
"createTime": "<string>"
}
]
}
请求头
枚举值:application/json。
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
请求体
VPC 网络的名称。自定义设置。字符串,长度限制:0-30 字符。
响应参数
VPC 网络信息。
VPC 网络的ID。
用户账号 ID。
VPC 网络的名称。
VPC 网络的网段。
集群 ID。
VPC 网络的创建时间。
curl --request POST \
--url https://api.ppinfra.com/gpu-instance/openapi/v1/network/create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '{
"clusterId": "<string>",
"name": "<string>"
}'
{
"network": [
{
"Id": "<string>",
"user": "<string>",
"name": "<string>",
"state": [
{
"state": "<string>",
"error": "<string>"
}
],
"segment": "<string>",
"clusterId": "<string>",
"Addresses": [
{
"Id": "<string>",
"Ip": "<string>"
}
],
"createTime": "<string>"
}
]
}