全部產品
Search
文件中心

Alibaba Cloud Service Mesh:DescribeCrTemplates - 查詢Istio資源YAML模板

更新時間:Nov 24, 2025

調用DescribeCrTemplates查詢服務網格中常見使用情境下的Istio資源YAML模板。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

servicemesh:DescribeCrTemplates

get

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

IstioVersion

string

服務網格使用的 Istio 版本。

v1.18.0.160-gcc1f41cd-aliyun

Kind

string

需要擷取常見模板的 istio 資源類型,可用取值包括:

  • AuthorizationPolicy

  • RequestAuthentication

  • PeerAuthentication

  • WorkloadGroup

  • WorkloadEntry

  • Sidecar

  • EnvoyFilter

  • ServiceEntry

  • Gateway

  • DestinationRule

  • VirtualService

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 不存在

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情