curl --request POST \
--url https://api.ppinfra.com/gpu-instance/openapi/v1/template/update \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"template": {
"Id": "<string>",
"name": "<string>",
"type": "<string>",
"channel": "<string>",
"readme": "<string>",
"image": "<string>",
"imageAuth": "<string>",
"startCommand": "<string>",
"entrypoint": "<string>",
"rootfsSize": 123,
"ports": [
{
"type": "<string>",
"ports": [
123
]
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"minCudaVersion": "<string>"
}
}
'{
"templateId": "<string>"
}curl --request POST \
--url https://api.ppinfra.com/gpu-instance/openapi/v1/template/update \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"template": {
"Id": "<string>",
"name": "<string>",
"type": "<string>",
"channel": "<string>",
"readme": "<string>",
"image": "<string>",
"imageAuth": "<string>",
"startCommand": "<string>",
"entrypoint": "<string>",
"rootfsSize": 123,
"ports": [
{
"type": "<string>",
"ports": [
123
]
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"minCudaVersion": "<string>"
}
}
'{
"templateId": "<string>"
}隐藏 properties
instanceprivatecurl --location --request POST 'https://api.ppinfra.com/gpu-instance/openapi/v1/template/update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{API 密钥}}' \
--data-raw '{
"template": {
"Id": "101036",
"name": "test",
"type": "instance",
"channel": "private",
"readme": "test create template",
"image": "nginx",
"imageAuth": "",
"startCommand": "echo test",
"entrypoint": "",
"rootfsSize": 60,
"ports": [
{"type": "http", "ports": [80, 443]},
{"type": "tcp", "ports": [90, 95]}
],
"envs": [
{"key": "test1", "value": "template1"},
{"key": "test2", "value": "test2"}
],
"minCudaVersion": "11.8"
}
}'
{
"templateId": "101036"
}