AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.appmesh.getGatewayRoute
Explore with Pulumi AI
The App Mesh Gateway Route data source allows details of an App Mesh Gateway Route to be retrieved by its name, mesh_name, virtual_gateway_name, and optionally the mesh_owner.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.appmesh.getGatewayRoute({
    name: "test-route",
    meshName: "test-mesh",
    virtualGatewayName: "test-gateway",
});
import pulumi
import pulumi_aws as aws
test = aws.appmesh.get_gateway_route(name="test-route",
    mesh_name="test-mesh",
    virtual_gateway_name="test-gateway")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := appmesh.LookupGatewayRoute(ctx, &appmesh.LookupGatewayRouteArgs{
			Name:               "test-route",
			MeshName:           "test-mesh",
			VirtualGatewayName: "test-gateway",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var test = Aws.AppMesh.GetGatewayRoute.Invoke(new()
    {
        Name = "test-route",
        MeshName = "test-mesh",
        VirtualGatewayName = "test-gateway",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appmesh.AppmeshFunctions;
import com.pulumi.aws.appmesh.inputs.GetGatewayRouteArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var test = AppmeshFunctions.getGatewayRoute(GetGatewayRouteArgs.builder()
            .name("test-route")
            .meshName("test-mesh")
            .virtualGatewayName("test-gateway")
            .build());
    }
}
variables:
  test:
    fn::invoke:
      function: aws:appmesh:getGatewayRoute
      arguments:
        name: test-route
        meshName: test-mesh
        virtualGatewayName: test-gateway
Using getGatewayRoute
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getGatewayRoute(args: GetGatewayRouteArgs, opts?: InvokeOptions): Promise<GetGatewayRouteResult>
function getGatewayRouteOutput(args: GetGatewayRouteOutputArgs, opts?: InvokeOptions): Output<GetGatewayRouteResult>def get_gateway_route(mesh_name: Optional[str] = None,
                      mesh_owner: Optional[str] = None,
                      name: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      virtual_gateway_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetGatewayRouteResult
def get_gateway_route_output(mesh_name: Optional[pulumi.Input[str]] = None,
                      mesh_owner: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                      virtual_gateway_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetGatewayRouteResult]func LookupGatewayRoute(ctx *Context, args *LookupGatewayRouteArgs, opts ...InvokeOption) (*LookupGatewayRouteResult, error)
func LookupGatewayRouteOutput(ctx *Context, args *LookupGatewayRouteOutputArgs, opts ...InvokeOption) LookupGatewayRouteResultOutput> Note: This function is named LookupGatewayRoute in the Go SDK.
public static class GetGatewayRoute 
{
    public static Task<GetGatewayRouteResult> InvokeAsync(GetGatewayRouteArgs args, InvokeOptions? opts = null)
    public static Output<GetGatewayRouteResult> Invoke(GetGatewayRouteInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGatewayRouteResult> getGatewayRoute(GetGatewayRouteArgs args, InvokeOptions options)
public static Output<GetGatewayRouteResult> getGatewayRoute(GetGatewayRouteArgs args, InvokeOptions options)
fn::invoke:
  function: aws:appmesh/getGatewayRoute:getGatewayRoute
  arguments:
    # arguments dictionaryThe following arguments are supported:
- MeshName string
- Name of the service mesh in which the virtual gateway exists.
- Name string
- Name of the gateway route.
- VirtualGateway stringName 
- Name of the virtual gateway in which the route exists.
- MeshOwner string
- AWS account ID of the service mesh's owner.
- Dictionary<string, string>
- Map of tags.
- MeshName string
- Name of the service mesh in which the virtual gateway exists.
- Name string
- Name of the gateway route.
- VirtualGateway stringName 
- Name of the virtual gateway in which the route exists.
- MeshOwner string
- AWS account ID of the service mesh's owner.
- map[string]string
- Map of tags.
- meshName String
- Name of the service mesh in which the virtual gateway exists.
- name String
- Name of the gateway route.
- virtualGateway StringName 
- Name of the virtual gateway in which the route exists.
- meshOwner String
- AWS account ID of the service mesh's owner.
- Map<String,String>
- Map of tags.
- meshName string
- Name of the service mesh in which the virtual gateway exists.
- name string
- Name of the gateway route.
- virtualGateway stringName 
- Name of the virtual gateway in which the route exists.
- meshOwner string
- AWS account ID of the service mesh's owner.
- {[key: string]: string}
- Map of tags.
- mesh_name str
- Name of the service mesh in which the virtual gateway exists.
- name str
- Name of the gateway route.
- virtual_gateway_ strname 
- Name of the virtual gateway in which the route exists.
- mesh_owner str
- AWS account ID of the service mesh's owner.
- Mapping[str, str]
- Map of tags.
- meshName String
- Name of the service mesh in which the virtual gateway exists.
- name String
- Name of the gateway route.
- virtualGateway StringName 
- Name of the virtual gateway in which the route exists.
- meshOwner String
- AWS account ID of the service mesh's owner.
- Map<String>
- Map of tags.
getGatewayRoute Result
The following output properties are available:
- Arn string
- ARN of the gateway route.
- CreatedDate string
- Creation date of the gateway route.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastUpdated stringDate 
- Last update date of the gateway route.
- MeshName string
- MeshOwner string
- Name string
- ResourceOwner string
- Resource owner's AWS account ID.
- Specs
List<GetGateway Route Spec> 
- Gateway route specification. See the aws.appmesh.GatewayRouteresource for details.
- Dictionary<string, string>
- Map of tags.
- VirtualGateway stringName 
- Arn string
- ARN of the gateway route.
- CreatedDate string
- Creation date of the gateway route.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastUpdated stringDate 
- Last update date of the gateway route.
- MeshName string
- MeshOwner string
- Name string
- ResourceOwner string
- Resource owner's AWS account ID.
- Specs
[]GetGateway Route Spec 
- Gateway route specification. See the aws.appmesh.GatewayRouteresource for details.
- map[string]string
- Map of tags.
- VirtualGateway stringName 
- arn String
- ARN of the gateway route.
- createdDate String
- Creation date of the gateway route.
- id String
- The provider-assigned unique ID for this managed resource.
- lastUpdated StringDate 
- Last update date of the gateway route.
- meshName String
- meshOwner String
- name String
- resourceOwner String
- Resource owner's AWS account ID.
- specs
List<GetGateway Route Spec> 
- Gateway route specification. See the aws.appmesh.GatewayRouteresource for details.
- Map<String,String>
- Map of tags.
- virtualGateway StringName 
- arn string
- ARN of the gateway route.
- createdDate string
- Creation date of the gateway route.
- id string
- The provider-assigned unique ID for this managed resource.
- lastUpdated stringDate 
- Last update date of the gateway route.
- meshName string
- meshOwner string
- name string
- resourceOwner string
- Resource owner's AWS account ID.
- specs
GetGateway Route Spec[] 
- Gateway route specification. See the aws.appmesh.GatewayRouteresource for details.
- {[key: string]: string}
- Map of tags.
- virtualGateway stringName 
- arn str
- ARN of the gateway route.
- created_date str
- Creation date of the gateway route.
- id str
- The provider-assigned unique ID for this managed resource.
- last_updated_ strdate 
- Last update date of the gateway route.
- mesh_name str
- mesh_owner str
- name str
- resource_owner str
- Resource owner's AWS account ID.
- specs
Sequence[GetGateway Route Spec] 
- Gateway route specification. See the aws.appmesh.GatewayRouteresource for details.
- Mapping[str, str]
- Map of tags.
- virtual_gateway_ strname 
- arn String
- ARN of the gateway route.
- createdDate String
- Creation date of the gateway route.
- id String
- The provider-assigned unique ID for this managed resource.
- lastUpdated StringDate 
- Last update date of the gateway route.
- meshName String
- meshOwner String
- name String
- resourceOwner String
- Resource owner's AWS account ID.
- specs List<Property Map>
- Gateway route specification. See the aws.appmesh.GatewayRouteresource for details.
- Map<String>
- Map of tags.
- virtualGateway StringName 
Supporting Types
GetGatewayRouteSpec   
GetGatewayRouteSpecGrpcRoute     
GetGatewayRouteSpecGrpcRouteAction      
GetGatewayRouteSpecGrpcRouteActionTarget       
GetGatewayRouteSpecGrpcRouteActionTargetVirtualService         
- VirtualService stringName 
- VirtualService stringName 
- virtualService StringName 
- virtualService stringName 
- virtualService StringName 
GetGatewayRouteSpecGrpcRouteMatch      
- Port int
- ServiceName string
- Port int
- ServiceName string
- port Integer
- serviceName String
- port number
- serviceName string
- port int
- service_name str
- port Number
- serviceName String
GetGatewayRouteSpecHttp2Route    
GetGatewayRouteSpecHttp2RouteAction     
GetGatewayRouteSpecHttp2RouteActionRewrite      
GetGatewayRouteSpecHttp2RouteActionRewriteHostname       
- DefaultTarget stringHostname 
- DefaultTarget stringHostname 
- defaultTarget StringHostname 
- defaultTarget stringHostname 
- defaultTarget StringHostname 
GetGatewayRouteSpecHttp2RouteActionRewritePath       
- Exact string
- Exact string
- exact String
- exact string
- exact str
- exact String
GetGatewayRouteSpecHttp2RouteActionRewritePrefix       
- DefaultPrefix string
- Value string
- DefaultPrefix string
- Value string
- defaultPrefix String
- value String
- defaultPrefix string
- value string
- default_prefix str
- value str
- defaultPrefix String
- value String
GetGatewayRouteSpecHttp2RouteActionTarget      
GetGatewayRouteSpecHttp2RouteActionTargetVirtualService        
- VirtualService stringName 
- VirtualService stringName 
- virtualService StringName 
- virtualService stringName 
- virtualService StringName 
GetGatewayRouteSpecHttp2RouteMatch     
GetGatewayRouteSpecHttp2RouteMatchHeader      
- Invert bool
- Matches
List<GetGateway Route Spec Http2Route Match Header Match> 
- Name string
- Name of the gateway route.
- Invert bool
- Matches
[]GetGateway Route Spec Http2Route Match Header Match 
- Name string
- Name of the gateway route.
- invert Boolean
- matches
List<GetGateway Route Spec Http2Route Match Header Match> 
- name String
- Name of the gateway route.
- invert boolean
- matches
GetGateway Route Spec Http2Route Match Header Match[] 
- name string
- Name of the gateway route.
- invert bool
- matches
Sequence[GetGateway Route Spec Http2Route Match Header Match] 
- name str
- Name of the gateway route.
- invert Boolean
- matches List<Property Map>
- name String
- Name of the gateway route.
GetGatewayRouteSpecHttp2RouteMatchHeaderMatch       
GetGatewayRouteSpecHttp2RouteMatchHeaderMatchRange        
GetGatewayRouteSpecHttp2RouteMatchHostname      
GetGatewayRouteSpecHttp2RouteMatchPath      
GetGatewayRouteSpecHttp2RouteMatchQueryParameter       
- Matches
List<GetGateway Route Spec Http2Route Match Query Parameter Match> 
- Name string
- Name of the gateway route.
- Matches
[]GetGateway Route Spec Http2Route Match Query Parameter Match 
- Name string
- Name of the gateway route.
- matches
List<GetGateway Route Spec Http2Route Match Query Parameter Match> 
- name String
- Name of the gateway route.
- matches
GetGateway Route Spec Http2Route Match Query Parameter Match[] 
- name string
- Name of the gateway route.
- matches
Sequence[GetGateway Route Spec Http2Route Match Query Parameter Match] 
- name str
- Name of the gateway route.
- matches List<Property Map>
- name String
- Name of the gateway route.
GetGatewayRouteSpecHttp2RouteMatchQueryParameterMatch        
- Exact string
- Exact string
- exact String
- exact string
- exact str
- exact String
GetGatewayRouteSpecHttpRoute     
GetGatewayRouteSpecHttpRouteAction      
GetGatewayRouteSpecHttpRouteActionRewrite       
GetGatewayRouteSpecHttpRouteActionRewriteHostname        
- DefaultTarget stringHostname 
- DefaultTarget stringHostname 
- defaultTarget StringHostname 
- defaultTarget stringHostname 
- defaultTarget StringHostname 
GetGatewayRouteSpecHttpRouteActionRewritePath        
- Exact string
- Exact string
- exact String
- exact string
- exact str
- exact String
GetGatewayRouteSpecHttpRouteActionRewritePrefix        
- DefaultPrefix string
- Value string
- DefaultPrefix string
- Value string
- defaultPrefix String
- value String
- defaultPrefix string
- value string
- default_prefix str
- value str
- defaultPrefix String
- value String
GetGatewayRouteSpecHttpRouteActionTarget       
GetGatewayRouteSpecHttpRouteActionTargetVirtualService         
- VirtualService stringName 
- VirtualService stringName 
- virtualService StringName 
- virtualService stringName 
- virtualService StringName 
GetGatewayRouteSpecHttpRouteMatch      
GetGatewayRouteSpecHttpRouteMatchHeader       
- Invert bool
- Matches
List<GetGateway Route Spec Http Route Match Header Match> 
- Name string
- Name of the gateway route.
- Invert bool
- Matches
[]GetGateway Route Spec Http Route Match Header Match 
- Name string
- Name of the gateway route.
- invert Boolean
- matches
List<GetGateway Route Spec Http Route Match Header Match> 
- name String
- Name of the gateway route.
- invert boolean
- matches
GetGateway Route Spec Http Route Match Header Match[] 
- name string
- Name of the gateway route.
- invert bool
- matches
Sequence[GetGateway Route Spec Http Route Match Header Match] 
- name str
- Name of the gateway route.
- invert Boolean
- matches List<Property Map>
- name String
- Name of the gateway route.
GetGatewayRouteSpecHttpRouteMatchHeaderMatch        
GetGatewayRouteSpecHttpRouteMatchHeaderMatchRange         
GetGatewayRouteSpecHttpRouteMatchHostname       
GetGatewayRouteSpecHttpRouteMatchPath       
GetGatewayRouteSpecHttpRouteMatchQueryParameter        
- Matches
List<GetGateway Route Spec Http Route Match Query Parameter Match> 
- Name string
- Name of the gateway route.
- Matches
[]GetGateway Route Spec Http Route Match Query Parameter Match 
- Name string
- Name of the gateway route.
- matches
List<GetGateway Route Spec Http Route Match Query Parameter Match> 
- name String
- Name of the gateway route.
- matches
GetGateway Route Spec Http Route Match Query Parameter Match[] 
- name string
- Name of the gateway route.
- matches
Sequence[GetGateway Route Spec Http Route Match Query Parameter Match] 
- name str
- Name of the gateway route.
- matches List<Property Map>
- name String
- Name of the gateway route.
GetGatewayRouteSpecHttpRouteMatchQueryParameterMatch         
- Exact string
- Exact string
- exact String
- exact string
- exact str
- exact String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.