All Products
Search
Document Center

Alibaba Cloud Service Mesh:DescribeCrTemplates

Last Updated:Apr 10, 2024

Queries the common YAML templates of Istio resources used by Service Mesh (ASM) instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
IstioVersionstringYes

The version of Istio used by the ASM instance.

v1.9.7.31-g24cdcb43-aliyun
KindstringYes

The type of Istio resource whose common YAML templates you want to query. Valid values:

  • AuthorizationPolicy
  • RequestAuthentication
  • PeerAuthentication
  • WorkloadGroup
  • WorkloadEntry
  • Sidecar
  • EnvoyFilter
  • ServiceEntry
  • Gateway
  • DestinationRule
  • VirtualService
VirtualService

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

74E97AE2-2900-55C1-A069-C3C1EA*****
Templatesobject []

The common YAML templates for the specified type of Istio resource.

ChineseNamestring

The Chinese name of the YAML template.

EnglishNamestring

The English name of the YAML template.

HTTP basic routing
Yamlstring

The content in the YAML template.

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"

Examples

Sample success responses

JSONformat

{
  "RequestId": "74E97AE2-2900-55C1-A069-C3C1EA*****",
  "Templates": [
    {
      "ChineseName": "",
      "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\""
    }
  ]
}

Error codes

HTTP status codeError codeError message
404ERR404Not found

For a list of error codes, visit the Service error codes.