Queries the common YAML templates for a specified type of Istio resource in Alibaba Cloud Service Mesh (ASM).
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeCrTemplates |
The operation that you want to perform. Set the value to DescribeCrTemplates. |
IstioVersion | String | Yes | v1.9.7.31-g24cdcb43-aliyun |
The Istio version used in ASM. |
Kind | String | Yes | VirtualService |
The type of Istio resource whose common YAML templates you want to query. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 74E97AE2-2900-55C1-A069-C3C1EA***** |
The ID of the request. |
Templates | Array of Templates |
The common YAML templates for the specified type of Istio resource. |
|
ChineseName | String | HTTP基础路由 |
The Chinese name of the YAML template. |
EnglishName | String | HTTP basic routing |
The English name of the YAML template. |
Yaml | String | 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" |
The content in the YAML template. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeCrTemplates
&IstioVersion=v1.9.7.31-g24cdcb43-aliyun
&Kind=VirtualService
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeCrTemplatesResponse>
<RequestId>74E97AE2-2900-55C1-A069-C3C1EA*****</RequestId>
<Templates>
<ChineseName>HTTP基础路由</ChineseName>
<EnglishName>HTTP basic routing</EnglishName>
<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"</Yaml>
</Templates>
</DescribeCrTemplatesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/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\""
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | ERR404 | Not found | The error message returned because the requested resource does not exist. |
For a list of error codes, visit the API Error Center.