Bir uygulama dağıtım şablonu oluşturur.
Hata Ayıklama
İstek sözdizimi
POST /templates HTTP/1.1
Content-Type:application/json
{
"name" : "String",
"template" : "String",
"tags" : "String",
"description" : "String",
"template_type" : "String"
}
İstek parametreleri
| Parametre | Tür | Gerekli | Örnek | Açıklama |
| name | String | Evet | service-account-template | Şablonun adı. Ad 1 ila 63 karakter uzunluğunda olmalı; rakam, harf ve tire (-) içerebilir. Tire (-) ile başlayamaz. |
| template | String | Evet | apiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: test-sa | YAML biçimindeki şablon içeriği. |
| tags | String | Hayır | test | Şablonun etiketi. |
| description | String | Hayır | this is test | Şablonun açıklaması. |
| template_type | String | Hayır | kubernetes | Şablonun türü. Parametreyi özel bir değere ayarlayabilirsiniz.
Parametreyi Varsayılan değer: |
Yanıt sözdizimi
HTTP/1.1 200
Content-Type:application/json
{
"template_id" : "String"
}
Yanıt parametreleri
| Parametre | Tür | Örnek | Açıklama |
| template_id | String | ba1fe77b-b01e-4640-b77e-8f1b80e3e3cf |
|
Örnekler
Örnek istekler
POST /templates HTTP/1.1
Content-Type:application/json
{
"name" : "service-account-template",
"template" : "apiVersion: v1\\nkind: ServiceAccount\\nmetadata:\\n name: test-sa",
"tags" : "test",
"description" : "this is test",
"template_type" : "kubernetes"
}
Örnek başarılı yanıtlar
XML biçimi
HTTP/1.1 200 OK
Content-Type:application/xml
<template_id>ba1fe77b-b01e-4640-b77e-8f1b80e3e3cf</template_id>
JSON biçimi
HTTP/1.1 200 OK
Content-Type:application/json
{
"template_id" : "ba1fe77b-b01e-4640-b77e-8f1b80e3e3cf"
}
Hata kodları
Hata kodlarının listesi için API Hata Merkezi adresini ziyaret edin.