Show / Hide Table of Contents

Class Route

Manages a Route within a Route Table.

NOTE on Route Tables and Routes: This provider currently provides both a standalone Route resource, and allows for Routes to be defined in-line within the Route Table resource. 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 Route configurations and will overwrite Routes.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
    {
        Location = "West US",
    });
    var exampleRouteTable = new Azure.Network.RouteTable("exampleRouteTable", new Azure.Network.RouteTableArgs
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
    });
    var exampleRoute = new Azure.Network.Route("exampleRoute", new Azure.Network.RouteArgs
    {
        ResourceGroupName = exampleResourceGroup.Name,
        RouteTableName = exampleRouteTable.Name,
        AddressPrefix = "10.1.0.0/16",
        NextHopType = "vnetlocal",
    });
}

}
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.Azure.Network
Assembly: Pulumi.Azure.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

AddressPrefix

The destination CIDR to which the route applies, such as 10.1.0.0/16

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

Name

The name of the route. Changing this forces a new resource to be created.

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

NextHopInIpAddress

Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.

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

NextHopType

The type of Azure hop the packet should be sent to. Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None

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

ResourceGroupName

The name of the resource group in which to create the route. Changing this forces a new resource to be created.

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

RouteTableName

The name of the route table within which create the route. Changing this forces a new resource to be created.

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