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>
-Spec_Http2Route_Match_Path_Exact <String>
-Spec_HttpRoute_Match_Path_Exact <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>
-MeshOwner <String>
-Match_Metadata <GrpcRouteMetadata[]>
-Spec_Http2Route_Match_Method <HttpMethod>
-Spec_HttpRoute_Match_Method <HttpMethod>
-Spec_GrpcRoute_Match_MethodName <String>
-Spec_GrpcRoute_Match_Port <Int32>
-Spec_Http2Route_Match_Port <Int32>
-Spec_HttpRoute_Match_Port <Int32>
-Match_Port <Int32>
-Spec_Http2Route_Match_Prefix <String>
-Spec_HttpRoute_Match_Prefix <String>
-Spec_Priority <Int32>
-Spec_Http2Route_Match_QueryParameters <HttpQueryParameter[]>
-Spec_HttpRoute_Match_QueryParameters <HttpQueryParameter[]>
-Spec_Http2Route_Match_Path_Regex <String>
-Spec_HttpRoute_Match_Path_Regex <String>
-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_GrpcRoute_Timeout_Idle_Unit <DurationUnit>
-Spec_GrpcRoute_Timeout_PerRequest_Unit <DurationUnit>
-Spec_Http2Route_RetryPolicy_PerRetryTimeout_Unit <DurationUnit>
-Spec_Http2Route_Timeout_Idle_Unit <DurationUnit>
-Spec_Http2Route_Timeout_PerRequest_Unit <DurationUnit>
-Spec_HttpRoute_RetryPolicy_PerRetryTimeout_Unit <DurationUnit>
-Spec_HttpRoute_Timeout_Idle_Unit <DurationUnit>
-Spec_HttpRoute_Timeout_PerRequest_Unit <DurationUnit>
-Spec_TcpRoute_Timeout_Idle_Unit <DurationUnit>
-Spec_GrpcRoute_RetryPolicy_PerRetryTimeout_Value <Int64>
-Spec_GrpcRoute_Timeout_Idle_Value <Int64>
-Spec_GrpcRoute_Timeout_PerRequest_Value <Int64>
-Spec_Http2Route_RetryPolicy_PerRetryTimeout_Value <Int64>
-Spec_Http2Route_Timeout_Idle_Value <Int64>
-Spec_Http2Route_Timeout_PerRequest_Value <Int64>
-Spec_HttpRoute_RetryPolicy_PerRetryTimeout_Value <Int64>
-Spec_HttpRoute_Timeout_Idle_Value <Int64>
-Spec_HttpRoute_Timeout_PerRequest_Value <Int64>
-Spec_TcpRoute_Timeout_Idle_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>
-ClientConfig <AmazonAppMeshConfig>

Description

Creates a route that is associated with a virtual router. You can route several different protocols and define a retry policy for a route. Traffic can be routed to one or more virtual nodes. For more information about routes, see Routes.

Parameters

-ClientConfig <AmazonAppMeshConfig>
Amazon.PowerShell.Cmdlets.AMSH.AmazonAppMeshClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientToken <String>
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?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_Port <Int32>
The port number to match on.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_TcpRoute_Match_Port
-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)
-MeshOwner <String>
The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.
Required?False
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_Match_Port <Int32>
The port number to match on.
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. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_GrpcRoute_RetryPolicy_TcpRetryEvents
-Spec_GrpcRoute_Timeout_Idle_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_GrpcRoute_Timeout_Idle_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_GrpcRoute_Timeout_PerRequest_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_GrpcRoute_Timeout_PerRequest_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-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[]>
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_Path_Exact <String>
The exact path to match on.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_Match_Path_Regex <String>
The regex used to match the path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_Match_Port <Int32>
The port number to match on.
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_QueryParameters <HttpQueryParameter[]>
The client request query parameters to match on.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_Match_Scheme <HttpScheme>
The client request scheme to match on. Specify only one. Applicable only for HTTP2 routes.
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. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSpec_Http2Route_RetryPolicy_TcpRetryEvents
-Spec_Http2Route_Timeout_Idle_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_Timeout_Idle_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_Timeout_PerRequest_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_Http2Route_Timeout_PerRequest_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-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[]>
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_Path_Exact <String>
The exact path to match on.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMatch_Path_Exact
-Spec_HttpRoute_Match_Path_Regex <String>
The regex used to match the path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPath_Regex
-Spec_HttpRoute_Match_Port <Int32>
The port number to match on.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-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_QueryParameters <HttpQueryParameter[]>
The client request query parameters to match on.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMatch_QueryParameters
-Spec_HttpRoute_Match_Scheme <HttpScheme>
The client request scheme to match on. Specify only one. Applicable only for HTTP2 routes.
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. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetryPolicy_TcpRetryEvent, Spec_HttpRoute_RetryPolicy_TcpRetryEvents
-Spec_HttpRoute_Timeout_Idle_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTimeout_Idle_Unit
-Spec_HttpRoute_Timeout_Idle_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTimeout_Idle_Value
-Spec_HttpRoute_Timeout_PerRequest_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTimeout_PerRequest_Unit
-Spec_HttpRoute_Timeout_PerRequest_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTimeout_PerRequest_Value
-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
-Spec_TcpRoute_Timeout_Idle_Unit <DurationUnit>
A unit of time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Spec_TcpRoute_Timeout_Idle_Value <Int64>
A number of time units.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-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. If the virtual router is in a shared mesh, then you must be the owner of the virtual router resource.
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