All Products
Search
Document Center

Alibaba Cloud Service Mesh:DescribeIstioGatewayRouteDetail

Last Updated:Mar 05, 2024

Queries the detailed information about a routing rule of an Alibaba Cloud Service Mesh (ASM) gateway.

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
ServiceMeshIdstringYes

The ASM instance ID.

c08ba3fd1e6484b0f8cc1ad8fe10d****
IstioGatewayNamestringNo

The name of the ASM gateway.

ingressgateway
RouteNamestringNo

The name of the routing rule.

demo-route

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RouteDetailobject

The detailed information about the routing rule.

RouteNamestring

The name of the routing rule.

demo-route
RouteTypestring

The type of the traffic to be routed. Valid values: HTTP, TLS, and TCP.

HTTP
MatchRequestobject

The matching rules for traffic routing.

URIobject

The matching rule for URIs.

MatchingModestring

The matching mode. Valid values:

  • exact: exact match
  • prefix: match by prefix
  • regex: match by regular expression
prefix
MatchingContentstring

The content to be matched.

/ratings/v2/
Headersobject []

The request headers to be matched.

Namestring

The header key to be matched.

x-request-id
MatchingModestring

The matching mode for the header value. Valid values:

  • exact: exact match
  • prefix: match by prefix
  • regex: match by regular expression
exact
MatchingContentstring

The header value to be matched.

v1
TLSMatchAttributesobject []

The matching rules for Transport Layer Security (TLS) traffic.

TLSPortinteger

The TLS port.

443
SNIHostsarray

The Server Name Indication (SNI) values to be matched.

string

Wildcards can be used as the prefix of an SNI value. For example, the value *.com matches foo.example.com and example.com.

Note The SNI values must be a subset of the hostnames of the corresponding virtual hosts.
*.com
Portsarray

The ports.

integer

The ports of the specified hosts to which the traffic is routed.

443
HTTPAdvancedOptionsobject

The advanced settings for routing HTTP traffic.

HTTPRedirectobject

The HTTP redirection rule.

Uristring

The value to be used to overwrite the URL path during redirection.

/v1/getProductRatings
Authoritystring

The value to be used to overwrite the value of the Authority or Host header during redirection.

newratings.default.svc.cluster.local
RedirectCodeinteger

The HTTP status code to be used to indicate URL redirection. Default value: 301.

301
Delegateobject

The virtual service that defines traffic routing.

Namestring

The name of the virtual service.

reviews
Namespacestring

The namespace to which the virtual service belongs.

default
Rewriteobject

The configurations for rewriting the virtual service.

Uristring

The value to be used to overwrite the path or prefix of the URI.

/v1/getProductRatings
Authoritystring

The value to be used to overwrite the value of the Authority or Host header.

newratings.default.svc.cluster.local
Timeoutstring

The timeout period for requests.

5s
Retriesobject

The configurations of retries for failed requests.

Attemptsinteger

The number of retries that are allowed for a request.

3
PerTryTimeoutstring

The timeout period for each retry.

2s
RetryOnstring

The condition for retries. Example: connect-failure,refused-stream,503.

connect-failure,refused-stream,503
RetryRemoteLocalitiesobject

Specifies whether to allow retries to other localities.

Valueboolean

Specifies whether to allow retries to other localities. Valid values:

  • true
  • false

Default value: false.

false
Faultobject

The configurations of fault injection.

Delayobject

The duration to delay a request.

FixedDelaystring

The fixed duration for request delay.

5s
ExponentialDelaystring

The duration for request delay is expressed as 2 raised to the power of x. You must specify the value of x.

3
Percentageobject

The percentage of requests to which the delay fault is injected.

Valuefloat

The percentage of requests that are aborted with the specified error code, which is expressed as a decimal.

0.1
Abortobject

The configurations for aborting requests with specified error codes.

HttpStatusinteger

The HTTP status code.

400
Percentageobject

The percentage of requests that are aborted with the specified error code.

Valuefloat

The percentage of requests that are mirrored to another destination except for the original destination, which is expressed as a decimal.

0.1
Mirrorobject

The configurations for mirroring HTTP traffic to another destination in addition to forwarding requests to the specified destination.

Hoststring

The name of the service defined in the service registry.

reviews.default.svc.cluster.local
Subsetstring

The name of the service subset.

v1
MirrorPercentageobject

The percentage of requests that are aborted with the specified error code.

Valuefloat

The percentage of requests that are aborted with the specified error code, which is expressed as a decimal.

0.2
RouteDestinationsobject []

The endpoints of destination services for Layer 4 weighted routing.

Destinationobject

The unique endpoint of the destination service to which the specified requests are sent.

Hoststring

The name of the service defined in the service registry.

reviews
Subsetstring

The name of the service subset.

v1
Portobject

The ports of the specified hosts from which the traffic is routed.

Numberinteger

The ports of the specified hosts to which the traffic is routed.

443
Weightinteger

The traffic weight. Valid values: 1 to 100.

80
Headersobject

The list of the request headers to be matched.

Requestobject

The request header to be matched.

Setobject

The header key to be used to overwrite the original header key.

string

The header key that you specify.

key
Addobject

The values to be added to the header key.

key
Removearray

The header value to be deleted.

string

The key to be deleted.

key
Responseobject

The processing of the headers of the response that is to be returned.

Setobject

The header key to be used to overwrite the original header key.

key
Addobject

The values to be added to the header key.

key
Removearray

The header value to be deleted.

string

The key to be deleted.

key
Domainsarray

Domain list.

string

One Domain.

test.asm.aliyun.com
RawVSRoutestring

The original YAML file of the virtual service that is serialized into a JSON string.

{}
HasUnsafeFeaturesboolean

If the value is true, the original YAML file contains features that are not supported on the current interface.

true
RequestIdstring

The request ID.

31d3a0f0-07ed-4f6e-9004-1804498c****
Priorityinteger

The priority of the routing rule. The value of this parameter is an integer. A smaller value indicates a higher priority.

1
Statusinteger

The status of the routing rule. Valid values:

  • 0: The routing rule is valid.
  • 1: The routing rule is invalid.
  • 2: An error occurs during the creation or update of the routing rule.
1
Descriptionstring

The description of the routing rule.

demo route
Namespacestring

The namespace.

default

Examples

Sample success responses

JSONformat

{
  "RouteDetail": {
    "RouteName": "demo-route",
    "RouteType": "HTTP",
    "MatchRequest": {
      "URI": {
        "MatchingMode": "prefix",
        "MatchingContent": "/ratings/v2/"
      },
      "Headers": [
        {
          "Name": "x-request-id",
          "MatchingMode": "exact",
          "MatchingContent": "v1"
        }
      ],
      "TLSMatchAttributes": [
        {
          "TLSPort": 443,
          "SNIHosts": [
            "*.com"
          ]
        }
      ],
      "Ports": [
        443
      ]
    },
    "HTTPAdvancedOptions": {
      "HTTPRedirect": {
        "Uri": "/v1/getProductRatings",
        "Authority": "newratings.default.svc.cluster.local",
        "RedirectCode": 301
      },
      "Delegate": {
        "Name": "reviews",
        "Namespace": "default"
      },
      "Rewrite": {
        "Uri": "/v1/getProductRatings",
        "Authority": "newratings.default.svc.cluster.local"
      },
      "Timeout": "5s",
      "Retries": {
        "Attempts": 3,
        "PerTryTimeout": "2s",
        "RetryOn": "connect-failure,refused-stream,503",
        "RetryRemoteLocalities": {
          "Value": false
        }
      },
      "Fault": {
        "Delay": {
          "FixedDelay": "5s",
          "ExponentialDelay": "3",
          "Percentage": {
            "Value": 0.1
          }
        },
        "Abort": {
          "HttpStatus": 400,
          "Percentage": {
            "Value": 0.1
          }
        }
      },
      "Mirror": {
        "Host": "reviews.default.svc.cluster.local",
        "Subset": "v1"
      },
      "MirrorPercentage": {
        "Value": 0.2
      }
    },
    "RouteDestinations": [
      {
        "Destination": {
          "Host": "reviews",
          "Subset": "v1",
          "Port": {
            "Number": 443
          }
        },
        "Weight": 80,
        "Headers": {
          "Request": {
            "Set": {
              "key": "key"
            },
            "Add": {
              "test": "test",
              "test2": 1
            },
            "Remove": [
              "key"
            ]
          },
          "Response": {
            "Set": {
              "test": "test",
              "test2": 1
            },
            "Add": {
              "test": "test",
              "test2": 1
            },
            "Remove": [
              "key"
            ]
          }
        }
      }
    ],
    "Domains": [
      "test.asm.aliyun.com"
    ],
    "RawVSRoute": "{}",
    "HasUnsafeFeatures": true
  },
  "RequestId": "31d3a0f0-07ed-4f6e-9004-1804498c****",
  "Priority": 1,
  "Status": 1,
  "Description": "demo route",
  "Namespace": "default"
}

Error codes

HTTP status codeError codeError message
500ERR500An internal server error occurred.

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

Change history

Change timeSummary of changesOperation
2023-06-25The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.