Show / Hide Table of Contents

Class Route

Provides an AWS App Mesh route resource.

Example Usage

HTTP Routing

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb = new Aws.AppMesh.Route("serviceb", new Aws.AppMesh.RouteArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.RouteSpecArgs
        {
            HttpRoute = new Aws.AppMesh.Inputs.RouteSpecHttpRouteArgs
            {
                Action = new Aws.AppMesh.Inputs.RouteSpecHttpRouteActionArgs
                {
                    WeightedTarget = 
                    {

                        {
                            { "virtualNode", aws_appmesh_virtual_node.Serviceb1.Name },
                            { "weight", 90 },
                        },

                        {
                            { "virtualNode", aws_appmesh_virtual_node.Serviceb2.Name },
                            { "weight", 10 },
                        },
                    },
                },
                Match = new Aws.AppMesh.Inputs.RouteSpecHttpRouteMatchArgs
                {
                    Prefix = "/",
                },
            },
        },
        VirtualRouterName = aws_appmesh_virtual_router.Serviceb.Name,
    });
}

}

HTTP Header Routing

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb = new Aws.AppMesh.Route("serviceb", new Aws.AppMesh.RouteArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.RouteSpecArgs
        {
            HttpRoute = new Aws.AppMesh.Inputs.RouteSpecHttpRouteArgs
            {
                Action = new Aws.AppMesh.Inputs.RouteSpecHttpRouteActionArgs
                {
                    WeightedTarget = 
                    {

                        {
                            { "virtualNode", aws_appmesh_virtual_node.Serviceb.Name },
                            { "weight", 100 },
                        },
                    },
                },
                Match = new Aws.AppMesh.Inputs.RouteSpecHttpRouteMatchArgs
                {
                    Header = 
                    {

                        {
                            { "match", 
                            {
                                { "prefix", "123" },
                            } },
                            { "name", "clientRequestId" },
                        },
                    },
                    Method = "POST",
                    Prefix = "/",
                    Scheme = "https",
                },
            },
        },
        VirtualRouterName = aws_appmesh_virtual_router.Serviceb.Name,
    });
}

}

TCP Routing

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb = new Aws.AppMesh.Route("serviceb", new Aws.AppMesh.RouteArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.RouteSpecArgs
        {
            TcpRoute = new Aws.AppMesh.Inputs.RouteSpecTcpRouteArgs
            {
                Action = new Aws.AppMesh.Inputs.RouteSpecTcpRouteActionArgs
                {
                    WeightedTarget = 
                    {

                        {
                            { "virtualNode", aws_appmesh_virtual_node.Serviceb1.Name },
                            { "weight", 100 },
                        },
                    },
                },
            },
        },
        VirtualRouterName = aws_appmesh_virtual_router.Serviceb.Name,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Route
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.AppMesh
Assembly: Pulumi.Aws.dll
Syntax
public class Route : CustomResource

Constructors

View Source

Route(String, RouteArgs, CustomResourceOptions)

Create a Route resource with the given unique name, arguments, and options.

Declaration
public Route(string name, RouteArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RouteArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The ARN of the route.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

CreatedDate

The creation date of the route.

Declaration
public Output<string> CreatedDate { get; }
Property Value
Type Description
Output<System.String>
View Source

LastUpdatedDate

The last update date of the route.

Declaration
public Output<string> LastUpdatedDate { get; }
Property Value
Type Description
Output<System.String>
View Source

MeshName

The name of the service mesh in which to create the route.

Declaration
public Output<string> MeshName { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name to use for the route.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Spec

The route specification to apply.

Declaration
public Output<RouteSpec> Spec { get; }
Property Value
Type Description
Output<RouteSpec>
View Source

Tags

A map of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

VirtualRouterName

The name of the virtual router in which to create the route.

Declaration
public Output<string> VirtualRouterName { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, RouteState, CustomResourceOptions)

Get an existing Route resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Route Get(string name, Input<string> id, RouteState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

RouteState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Route
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.