AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.appmesh.getVirtualRouter
Explore with Pulumi AI
The App Mesh Virtual Router data source allows details of an App Mesh Virtual Service to be retrieved by its name and mesh_name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.appmesh.getVirtualRouter({
    name: "example-router-name",
    meshName: "example-mesh-name",
});
import pulumi
import pulumi_aws as aws
test = aws.appmesh.get_virtual_router(name="example-router-name",
    mesh_name="example-mesh-name")
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.LookupVirtualRouter(ctx, &appmesh.LookupVirtualRouterArgs{
			Name:     "example-router-name",
			MeshName: "example-mesh-name",
		}, 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.GetVirtualRouter.Invoke(new()
    {
        Name = "example-router-name",
        MeshName = "example-mesh-name",
    });
});
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.GetVirtualRouterArgs;
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.getVirtualRouter(GetVirtualRouterArgs.builder()
            .name("example-router-name")
            .meshName("example-mesh-name")
            .build());
    }
}
variables:
  test:
    fn::invoke:
      function: aws:appmesh:getVirtualRouter
      arguments:
        name: example-router-name
        meshName: example-mesh-name
Using getVirtualRouter
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 getVirtualRouter(args: GetVirtualRouterArgs, opts?: InvokeOptions): Promise<GetVirtualRouterResult>
function getVirtualRouterOutput(args: GetVirtualRouterOutputArgs, opts?: InvokeOptions): Output<GetVirtualRouterResult>def get_virtual_router(mesh_name: Optional[str] = None,
                       mesh_owner: Optional[str] = None,
                       name: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetVirtualRouterResult
def get_virtual_router_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,
                       opts: Optional[InvokeOptions] = None) -> Output[GetVirtualRouterResult]func LookupVirtualRouter(ctx *Context, args *LookupVirtualRouterArgs, opts ...InvokeOption) (*LookupVirtualRouterResult, error)
func LookupVirtualRouterOutput(ctx *Context, args *LookupVirtualRouterOutputArgs, opts ...InvokeOption) LookupVirtualRouterResultOutput> Note: This function is named LookupVirtualRouter in the Go SDK.
public static class GetVirtualRouter 
{
    public static Task<GetVirtualRouterResult> InvokeAsync(GetVirtualRouterArgs args, InvokeOptions? opts = null)
    public static Output<GetVirtualRouterResult> Invoke(GetVirtualRouterInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVirtualRouterResult> getVirtualRouter(GetVirtualRouterArgs args, InvokeOptions options)
public static Output<GetVirtualRouterResult> getVirtualRouter(GetVirtualRouterArgs args, InvokeOptions options)
fn::invoke:
  function: aws:appmesh/getVirtualRouter:getVirtualRouter
  arguments:
    # arguments dictionaryThe following arguments are supported:
- mesh_name str
- Name of the mesh in which the virtual router exists
- name str
- Name of the virtual router.
- mesh_owner str
- Mapping[str, str]
- Map of tags.
getVirtualRouter Result
The following output properties are available:
- Arn string
- ARN of the virtual router.
- CreatedDate string
- Creation date of the virtual router.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastUpdated stringDate 
- Last update date of the virtual router.
- MeshName string
- MeshOwner string
- Name string
- ResourceOwner string
- Resource owner's AWS account ID.
- Specs
List<GetVirtual Router Spec> 
- Virtual routers specification. See the aws.appmesh.VirtualRouterresource for details.
- Dictionary<string, string>
- Map of tags.
- Arn string
- ARN of the virtual router.
- CreatedDate string
- Creation date of the virtual router.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastUpdated stringDate 
- Last update date of the virtual router.
- MeshName string
- MeshOwner string
- Name string
- ResourceOwner string
- Resource owner's AWS account ID.
- Specs
[]GetVirtual Router Spec 
- Virtual routers specification. See the aws.appmesh.VirtualRouterresource for details.
- map[string]string
- Map of tags.
- arn String
- ARN of the virtual router.
- createdDate String
- Creation date of the virtual router.
- id String
- The provider-assigned unique ID for this managed resource.
- lastUpdated StringDate 
- Last update date of the virtual router.
- meshName String
- meshOwner String
- name String
- resourceOwner String
- Resource owner's AWS account ID.
- specs
List<GetVirtual Router Spec> 
- Virtual routers specification. See the aws.appmesh.VirtualRouterresource for details.
- Map<String,String>
- Map of tags.
- arn string
- ARN of the virtual router.
- createdDate string
- Creation date of the virtual router.
- id string
- The provider-assigned unique ID for this managed resource.
- lastUpdated stringDate 
- Last update date of the virtual router.
- meshName string
- meshOwner string
- name string
- resourceOwner string
- Resource owner's AWS account ID.
- specs
GetVirtual Router Spec[] 
- Virtual routers specification. See the aws.appmesh.VirtualRouterresource for details.
- {[key: string]: string}
- Map of tags.
- arn str
- ARN of the virtual router.
- created_date str
- Creation date of the virtual router.
- id str
- The provider-assigned unique ID for this managed resource.
- last_updated_ strdate 
- Last update date of the virtual router.
- mesh_name str
- mesh_owner str
- name str
- resource_owner str
- Resource owner's AWS account ID.
- specs
Sequence[GetVirtual Router Spec] 
- Virtual routers specification. See the aws.appmesh.VirtualRouterresource for details.
- Mapping[str, str]
- Map of tags.
- arn String
- ARN of the virtual router.
- createdDate String
- Creation date of the virtual router.
- id String
- The provider-assigned unique ID for this managed resource.
- lastUpdated StringDate 
- Last update date of the virtual router.
- meshName String
- meshOwner String
- name String
- resourceOwner String
- Resource owner's AWS account ID.
- specs List<Property Map>
- Virtual routers specification. See the aws.appmesh.VirtualRouterresource for details.
- Map<String>
- Map of tags.
Supporting Types
GetVirtualRouterSpec   
GetVirtualRouterSpecListener    
GetVirtualRouterSpecListenerPortMapping      
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.