Creates a route that is associated with a virtual router.
appmesh_create_route(clientToken, meshName, routeName, spec, tags,
virtualRouterName)Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.
[required] The name of the service mesh to create the route in.
[required] The name to use for the route.
[required] The route specification to apply.
Optional metadata that you can apply to the route to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
[required] The name of the virtual router in which to create the route.
svc$create_route(
clientToken = "string",
meshName = "string",
routeName = "string",
spec = list(
grpcRoute = list(
action = list(
weightedTargets = list(
list(
virtualNode = "string",
weight = 123
)
)
),
match = list(
metadata = list(
list(
invert = TRUE|FALSE,
match = list(
exact = "string",
prefix = "string",
range = list(
end = 123,
start = 123
),
regex = "string",
suffix = "string"
),
name = "string"
)
),
methodName = "string",
serviceName = "string"
),
retryPolicy = list(
grpcRetryEvents = list(
"cancelled"|"deadline-exceeded"|"internal"|"resource-exhausted"|"unavailable"
),
httpRetryEvents = list(
"string"
),
maxRetries = 123,
perRetryTimeout = list(
unit = "ms"|"s",
value = 123
),
tcpRetryEvents = list(
"connection-error"
)
)
),
http2Route = list(
action = list(
weightedTargets = list(
list(
virtualNode = "string",
weight = 123
)
)
),
match = list(
headers = list(
list(
invert = TRUE|FALSE,
match = list(
exact = "string",
prefix = "string",
range = list(
end = 123,
start = 123
),
regex = "string",
suffix = "string"
),
name = "string"
)
),
method = "CONNECT"|"DELETE"|"GET"|"HEAD"|"OPTIONS"|"PATCH"|"POST"|"PUT"|"TRACE",
prefix = "string",
scheme = "http"|"https"
),
retryPolicy = list(
httpRetryEvents = list(
"string"
),
maxRetries = 123,
perRetryTimeout = list(
unit = "ms"|"s",
value = 123
),
tcpRetryEvents = list(
"connection-error"
)
)
),
httpRoute = list(
action = list(
weightedTargets = list(
list(
virtualNode = "string",
weight = 123
)
)
),
match = list(
headers = list(
list(
invert = TRUE|FALSE,
match = list(
exact = "string",
prefix = "string",
range = list(
end = 123,
start = 123
),
regex = "string",
suffix = "string"
),
name = "string"
)
),
method = "CONNECT"|"DELETE"|"GET"|"HEAD"|"OPTIONS"|"PATCH"|"POST"|"PUT"|"TRACE",
prefix = "string",
scheme = "http"|"https"
),
retryPolicy = list(
httpRetryEvents = list(
"string"
),
maxRetries = 123,
perRetryTimeout = list(
unit = "ms"|"s",
value = 123
),
tcpRetryEvents = list(
"connection-error"
)
)
),
priority = 123,
tcpRoute = list(
action = list(
weightedTargets = list(
list(
virtualNode = "string",
weight = 123
)
)
)
)
),
tags = list(
list(
key = "string",
value = "string"
)
),
virtualRouterName = "string"
)
You can use the prefix parameter in your route specification for
path-based routing of requests. For example, if your virtual service
name is my-service.local and you want the route to match requests to
my-service.local/metrics, your prefix should be /metrics.
If your route matches a request, you can distribute traffic to one or more target virtual nodes with relative weighting.