AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS App Mesh CreateRoute API operation.

Syntax

New-AMSHRoute
-RouteName <String>
-RetryPolicy_GrpcRetryEvent <String[]>
-Spec_Http2Route_Match_Header <HttpRouteHeader[]>
-Spec_HttpRoute_Match_Header <HttpRouteHeader[]>
-Spec_GrpcRoute_RetryPolicy_HttpRetryEvent <String[]>
-Spec_Http2Route_RetryPolicy_HttpRetryEvent <String[]>
-Spec_HttpRoute_RetryPolicy_HttpRetryEvent <String[]>
-Spec_GrpcRoute_RetryPolicy_MaxRetry <Int64>
-Spec_Http2Route_RetryPolicy_MaxRetry <Int64>
-Spec_HttpRoute_RetryPolicy_MaxRetry <Int64>
-MeshName <String>
-Match_Metadata <GrpcRouteMetadata[]>
-Spec_Http2Route_Match_Method <HttpMethod>
-Spec_HttpRoute_Match_Method <HttpMethod>
-Spec_GrpcRoute_Match_MethodName <String>
-Spec_Http2Route_Match_Prefix <String>
-Spec_HttpRoute_Match_Prefix <String>
-Spec_Priority <Int32>
-Spec_Http2Route_Match_Scheme <HttpScheme>
-Spec_HttpRoute_Match_Scheme <HttpScheme>
-Match_ServiceName <String>
-Tag <TagRef[]>
-Spec_GrpcRoute_RetryPolicy_TcpRetryEvent <String[]>
-Spec_Http2Route_RetryPolicy_TcpRetryEvent <String[]>
-Spec_HttpRoute_RetryPolicy_TcpRetryEvent <String[]>
-Spec_GrpcRoute_RetryPolicy_PerRetryTimeout_Unit <DurationUnit>
-Spec_Http2Route_RetryPolicy_PerRetryTimeout_Unit <DurationUnit>
-Spec_HttpRoute_RetryPolicy_PerRetryTimeout_Unit <DurationUnit>
-Spec_GrpcRoute_RetryPolicy_PerRetryTimeout_Value <Int64>
-Spec_Http2Route_RetryPolicy_PerRetryTimeout_Value <Int64>
-Spec_HttpRoute_RetryPolicy_PerRetryTimeout_Value <Int64>
-VirtualRouterName <String>
-Spec_GrpcRoute_Action_WeightedTarget <WeightedTarget[]>
-Spec_Http2Route_Action_WeightedTarget <WeightedTarget[]>
-Spec_HttpRoute_Action_WeightedTarget <WeightedTarget[]>
-Spec_TcpRoute_Action_WeightedTarget <WeightedTarget[]>
-ClientToken <String>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>

Description

Creates a route that is associated with a virtual router. 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.

Parameters

-ClientToken <String>
Unique, case-sensitive identifier that you provide to ensure the idempotency of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Match_Metadata <GrpcRouteMetadata[]>
An object that represents the data to match from the request.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_GrpcRoute_Match_Metadata
-Match_ServiceName <String>
The fully qualified domain name for the service to match from the request.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_GrpcRoute_Match_ServiceName
-MeshName <String>
The name of the service mesh to create the route in.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the RouteName parameter. The -PassThru parameter is deprecated, use -Select '^RouteName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RetryPolicy_GrpcRetryEvent <String[]>
Specify at least one of the valid values.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_GrpcRoute_RetryPolicy_GrpcRetryEvents
-RouteName <String>
The name to use for the route.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'Route'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.AppMesh.Model.CreateRouteResponse). Specifying the name of a property of type Amazon.AppMesh.Model.CreateRouteResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_GrpcRoute_Action_WeightedTarget <WeightedTarget[]>
An object that represents the targets that traffic is routed to when a request matches the route.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_GrpcRoute_Action_WeightedTargets
-Spec_GrpcRoute_Match_MethodName <String>
The method name to match from the request. If you specify a name, you must also specify a serviceName.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_GrpcRoute_RetryPolicy_HttpRetryEvent <String[]>
Specify at least one of the following values.
  • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511
  • gateway-error – HTTP status codes 502, 503, and 504
  • client-error – HTTP status code 409
  • stream-error – Retry on refused stream
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_GrpcRoute_RetryPolicy_HttpRetryEvents
-Spec_GrpcRoute_RetryPolicy_MaxRetry <Int64>
The maximum number of retry attempts.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_GrpcRoute_RetryPolicy_MaxRetries
-Spec_GrpcRoute_RetryPolicy_PerRetryTimeout_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_GrpcRoute_RetryPolicy_PerRetryTimeout_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_GrpcRoute_RetryPolicy_TcpRetryEvent <String[]>
Specify a valid value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_GrpcRoute_RetryPolicy_TcpRetryEvents
-Spec_Http2Route_Action_WeightedTarget <WeightedTarget[]>
An object that represents the targets that traffic is routed to when a request matches the route.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_Http2Route_Action_WeightedTargets
-Spec_Http2Route_Match_Header <HttpRouteHeader[]>
An object that represents the client request headers to match on.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_Http2Route_Match_Headers
-Spec_Http2Route_Match_Method <HttpMethod>
The client request method to match on. Specify only one.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_Match_Prefix <String>
Specifies the path to match requests with. This parameter must always start with /, which by itself matches all requests to the virtual service name. You can also match 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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_Match_Scheme <HttpScheme>
The client request scheme to match on. Specify only one.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_RetryPolicy_HttpRetryEvent <String[]>
Specify at least one of the following values.
  • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511
  • gateway-error – HTTP status codes 502, 503, and 504
  • client-error – HTTP status code 409
  • stream-error – Retry on refused stream
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_Http2Route_RetryPolicy_HttpRetryEvents
-Spec_Http2Route_RetryPolicy_MaxRetry <Int64>
The maximum number of retry attempts.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_Http2Route_RetryPolicy_MaxRetries
-Spec_Http2Route_RetryPolicy_PerRetryTimeout_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_RetryPolicy_PerRetryTimeout_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_RetryPolicy_TcpRetryEvent <String[]>
Specify a valid value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_Http2Route_RetryPolicy_TcpRetryEvents
-Spec_HttpRoute_Action_WeightedTarget <WeightedTarget[]>
An object that represents the targets that traffic is routed to when a request matches the route.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAction_WeightedTarget, Spec_HttpRoute_Action_WeightedTargets
-Spec_HttpRoute_Match_Header <HttpRouteHeader[]>
An object that represents the client request headers to match on.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMatch_Header, Spec_HttpRoute_Match_Headers
-Spec_HttpRoute_Match_Method <HttpMethod>
The client request method to match on. Specify only one.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMatch_Method
-Spec_HttpRoute_Match_Prefix <String>
Specifies the path to match requests with. This parameter must always start with /, which by itself matches all requests to the virtual service name. You can also match 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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMatch_Prefix
-Spec_HttpRoute_Match_Scheme <HttpScheme>
The client request scheme to match on. Specify only one.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMatch_Scheme
-Spec_HttpRoute_RetryPolicy_HttpRetryEvent <String[]>
Specify at least one of the following values.
  • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511
  • gateway-error – HTTP status codes 502, 503, and 504
  • client-error – HTTP status code 409
  • stream-error – Retry on refused stream
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetryPolicy_HttpRetryEvent, Spec_HttpRoute_RetryPolicy_HttpRetryEvents
-Spec_HttpRoute_RetryPolicy_MaxRetry <Int64>
The maximum number of retry attempts.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetryPolicy_MaxRetry, Spec_HttpRoute_RetryPolicy_MaxRetries
-Spec_HttpRoute_RetryPolicy_PerRetryTimeout_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPerRetryTimeout_Unit
-Spec_HttpRoute_RetryPolicy_PerRetryTimeout_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPerRetryTimeout_Value
-Spec_HttpRoute_RetryPolicy_TcpRetryEvent <String[]>
Specify a valid value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetryPolicy_TcpRetryEvent, Spec_HttpRoute_RetryPolicy_TcpRetryEvents
-Spec_Priority <Int32>
The priority for the route. Routes are matched based on the specified value, where 0 is the highest priority.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_TcpRoute_Action_WeightedTarget <WeightedTarget[]>
An object that represents the targets that traffic is routed to when a request matches the route.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_TcpRoute_Action_WeightedTargets
-Tag <TagRef[]>
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?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-VirtualRouterName <String>
The name of the virtual router in which to create the route.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.AppMesh.Model.RouteData object. The service call response (type Amazon.AppMesh.Model.CreateRouteResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z