Show / Hide Table of Contents

Class Route

Provides a resource to create a routing table entry (a route) in a VPC routing table.

NOTE on Route Tables and Routes: This provider currently provides both a standalone Route resource and a Route Table resource with routes defined in-line. At this time you cannot use a Route Table with in-line routes in conjunction with any Route resources. Doing so will cause a conflict of rule settings and will overwrite rules.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var route = new Aws.Ec2.Route("route", new Aws.Ec2.RouteArgs
    {
        RouteTableId = "rtb-4fbb3ac4",
        DestinationCidrBlock = "10.0.1.0/22",
        VpcPeeringConnectionId = "pcx-45ff3dc1",
    });
}

}

Example IPv6 Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var vpc = new Aws.Ec2.Vpc("vpc", new Aws.Ec2.VpcArgs
    {
        AssignGeneratedIpv6CidrBlock = true,
        CidrBlock = "10.1.0.0/16",
    });
    var egress = new Aws.Ec2.EgressOnlyInternetGateway("egress", new Aws.Ec2.EgressOnlyInternetGatewayArgs
    {
        VpcId = vpc.Id,
    });
    var route = new Aws.Ec2.Route("route", new Aws.Ec2.RouteArgs
    {
        DestinationIpv6CidrBlock = "::/0",
        EgressOnlyGatewayId = egress.Id,
        RouteTableId = "rtb-4fbb3ac4",
    });
}

}
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.Ec2
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

DestinationCidrBlock

The destination CIDR block.

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

DestinationIpv6CidrBlock

The destination IPv6 CIDR block.

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

DestinationPrefixListId

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

EgressOnlyGatewayId

Identifier of a VPC Egress Only Internet Gateway.

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

GatewayId

Identifier of a VPC internet gateway or a virtual private gateway.

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

InstanceId

Identifier of an EC2 instance.

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

InstanceOwnerId

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

NatGatewayId

Identifier of a VPC NAT gateway.

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

NetworkInterfaceId

Identifier of an EC2 network interface.

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

Origin

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

RouteTableId

The ID of the routing table.

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

State

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

TransitGatewayId

Identifier of an EC2 Transit Gateway.

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

VpcPeeringConnectionId

Identifier of a VPC peering connection.

Declaration
public Output<string> VpcPeeringConnectionId { 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.