調用DescribeCrTemplates查詢服務網格中常見使用情境下的Istio資源YAML模板。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
servicemesh:DescribeCrTemplates |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| IstioVersion |
string |
是 |
服務網格使用的 Istio 版本。 |
v1.18.0.160-gcc1f41cd-aliyun |
| Kind |
string |
是 |
需要擷取常見模板的 istio 資源類型,可用取值包括:
|
VirtualService |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回參數。 |
||
| RequestId |
string |
請求 ID。 |
74E97AE2-2900-55C1-A069-C3C1EA***** |
| Templates |
array<object> |
指定 Istio 資源類型的資源常用 YAML 模板。 |
|
|
object |
指定 Istio 資源類型的資源常用 YAML 模板。 |
||
| ChineseName |
string |
YAML 模板的中文名稱。 |
HTTP基礎路由 |
| EnglishName |
string |
YAML 模板的英文名稱。 |
HTTP basic routing |
| Yaml |
string |
YAML 模板的具體內容。 |
apiVersion: networking.istio.io/v1beta1\nkind: VirtualService\nmetadata:\n name: reviews-route # Name for this VirtualService.\nspec:\n hosts:\n - reviews.prod.svc.cluster.local # Service that this VirtualSerivce belongs to. \n http:\n - name: \"reviews-route\" # Name for the route.\n route:\n - destination: # Uniquely identifies the instances of a service to which all traffic should be forwarded to.\n host: reviews.prod.svc.cluster.local # The name of a service from the service registry or ServiceEntry.\n port:\n number: 8080" |
樣本
正常返回樣本
JSON格式
{
"RequestId": "74E97AE2-2900-55C1-A069-C3C1EA*****",
"Templates": [
{
"ChineseName": "HTTP基礎路由",
"EnglishName": "HTTP basic routing",
"Yaml": "apiVersion: networking.istio.io/v1beta1\\nkind: VirtualService\\nmetadata:\\n name: reviews-route # Name for this VirtualService.\\nspec:\\n hosts:\\n - reviews.prod.svc.cluster.local # Service that this VirtualSerivce belongs to. \\n http:\\n - name: \\\"reviews-route\\\" # Name for the route.\\n route:\\n - destination: # Uniquely identifies the instances of a service to which all traffic should be forwarded to.\\n host: reviews.prod.svc.cluster.local # The name of a service from the service registry or ServiceEntry.\\n port:\\n number: 8080\""
}
]
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 404 | ERR404 | Not found | 不存在 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。