azure-native.network.Route
Explore with Pulumi AI
Route resource. API Version: 2020-11-01.
Example Usage
Create route
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var route = new AzureNative.Network.Route("route", new()
{
AddressPrefix = "10.0.3.0/24",
NextHopType = "VirtualNetworkGateway",
ResourceGroupName = "rg1",
RouteName = "route1",
RouteTableName = "testrt",
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewRoute(ctx, "route", &network.RouteArgs{
AddressPrefix: pulumi.String("10.0.3.0/24"),
NextHopType: pulumi.String("VirtualNetworkGateway"),
ResourceGroupName: pulumi.String("rg1"),
RouteName: pulumi.String("route1"),
RouteTableName: pulumi.String("testrt"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.Route;
import com.pulumi.azurenative.network.RouteArgs;
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) {
var route = new Route("route", RouteArgs.builder()
.addressPrefix("10.0.3.0/24")
.nextHopType("VirtualNetworkGateway")
.resourceGroupName("rg1")
.routeName("route1")
.routeTableName("testrt")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
route = azure_native.network.Route("route",
address_prefix="10.0.3.0/24",
next_hop_type="VirtualNetworkGateway",
resource_group_name="rg1",
route_name="route1",
route_table_name="testrt")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const route = new azure_native.network.Route("route", {
addressPrefix: "10.0.3.0/24",
nextHopType: "VirtualNetworkGateway",
resourceGroupName: "rg1",
routeName: "route1",
routeTableName: "testrt",
});
resources:
route:
type: azure-native:network:Route
properties:
addressPrefix: 10.0.3.0/24
nextHopType: VirtualNetworkGateway
resourceGroupName: rg1
routeName: route1
routeTableName: testrt
Create Route Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Route(name: string, args: RouteArgs, opts?: CustomResourceOptions);
@overload
def Route(resource_name: str,
args: RouteInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Route(resource_name: str,
opts: Optional[ResourceOptions] = None,
next_hop_type: Optional[Union[str, RouteNextHopType]] = None,
resource_group_name: Optional[str] = None,
route_table_name: Optional[str] = None,
address_prefix: Optional[str] = None,
has_bgp_override: Optional[bool] = None,
id: Optional[str] = None,
name: Optional[str] = None,
next_hop_ip_address: Optional[str] = None,
route_name: Optional[str] = None,
type: Optional[str] = None)
func NewRoute(ctx *Context, name string, args RouteArgs, opts ...ResourceOption) (*Route, error)
public Route(string name, RouteArgs args, CustomResourceOptions? opts = null)
type: azure-native:network:Route
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RouteInitArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var azure_nativeRouteResource = new AzureNative.Network.Route("azure-nativeRouteResource", new()
{
NextHopType = "string",
ResourceGroupName = "string",
RouteTableName = "string",
AddressPrefix = "string",
HasBgpOverride = false,
Id = "string",
Name = "string",
NextHopIpAddress = "string",
RouteName = "string",
Type = "string",
});
example, err := network.NewRoute(ctx, "azure-nativeRouteResource", &network.RouteArgs{
NextHopType: "string",
ResourceGroupName: "string",
RouteTableName: "string",
AddressPrefix: "string",
HasBgpOverride: false,
Id: "string",
Name: "string",
NextHopIpAddress: "string",
RouteName: "string",
Type: "string",
})
var azure_nativeRouteResource = new Route("azure-nativeRouteResource", RouteArgs.builder()
.nextHopType("string")
.resourceGroupName("string")
.routeTableName("string")
.addressPrefix("string")
.hasBgpOverride(false)
.id("string")
.name("string")
.nextHopIpAddress("string")
.routeName("string")
.type("string")
.build());
azure_native_route_resource = azure_native.network.Route("azure-nativeRouteResource",
next_hop_type=string,
resource_group_name=string,
route_table_name=string,
address_prefix=string,
has_bgp_override=False,
id=string,
name=string,
next_hop_ip_address=string,
route_name=string,
type=string)
const azure_nativeRouteResource = new azure_native.network.Route("azure-nativeRouteResource", {
nextHopType: "string",
resourceGroupName: "string",
routeTableName: "string",
addressPrefix: "string",
hasBgpOverride: false,
id: "string",
name: "string",
nextHopIpAddress: "string",
routeName: "string",
type: "string",
});
type: azure-native:network:Route
properties:
addressPrefix: string
hasBgpOverride: false
id: string
name: string
nextHopIpAddress: string
nextHopType: string
resourceGroupName: string
routeName: string
routeTableName: string
type: string
Route Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Route resource accepts the following input properties:
- Next
Hop string | Pulumi.Type Azure Native. Network. Route Next Hop Type - The type of Azure hop the packet should be sent to.
- Resource
Group stringName - The name of the resource group.
- Route
Table stringName - The name of the route table.
- Address
Prefix string - The destination CIDR to which the route applies.
- Has
Bgp boolOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- Id string
- Resource ID.
- Name string
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- Next
Hop stringIp Address - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
- Route
Name string - The name of the route.
- Type string
- The type of the resource.
- Next
Hop string | RouteType Next Hop Type - The type of Azure hop the packet should be sent to.
- Resource
Group stringName - The name of the resource group.
- Route
Table stringName - The name of the route table.
- Address
Prefix string - The destination CIDR to which the route applies.
- Has
Bgp boolOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- Id string
- Resource ID.
- Name string
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- Next
Hop stringIp Address - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
- Route
Name string - The name of the route.
- Type string
- The type of the resource.
- next
Hop String | RouteType Next Hop Type - The type of Azure hop the packet should be sent to.
- resource
Group StringName - The name of the resource group.
- route
Table StringName - The name of the route table.
- address
Prefix String - The destination CIDR to which the route applies.
- has
Bgp BooleanOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- id String
- Resource ID.
- name String
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- next
Hop StringIp Address - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
- route
Name String - The name of the route.
- type String
- The type of the resource.
- next
Hop string | RouteType Next Hop Type - The type of Azure hop the packet should be sent to.
- resource
Group stringName - The name of the resource group.
- route
Table stringName - The name of the route table.
- address
Prefix string - The destination CIDR to which the route applies.
- has
Bgp booleanOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- id string
- Resource ID.
- name string
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- next
Hop stringIp Address - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
- route
Name string - The name of the route.
- type string
- The type of the resource.
- next_
hop_ str | Routetype Next Hop Type - The type of Azure hop the packet should be sent to.
- resource_
group_ strname - The name of the resource group.
- route_
table_ strname - The name of the route table.
- address_
prefix str - The destination CIDR to which the route applies.
- has_
bgp_ booloverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- id str
- Resource ID.
- name str
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- next_
hop_ strip_ address - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
- route_
name str - The name of the route.
- type str
- The type of the resource.
- next
Hop String | "VirtualType Network Gateway" | "Vnet Local" | "Internet" | "Virtual Appliance" | "None" - The type of Azure hop the packet should be sent to.
- resource
Group StringName - The name of the resource group.
- route
Table StringName - The name of the route table.
- address
Prefix String - The destination CIDR to which the route applies.
- has
Bgp BooleanOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- id String
- Resource ID.
- name String
- The name of the resource that is unique within a resource group. This name can be used to access the resource.
- next
Hop StringIp Address - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
- route
Name String - The name of the route.
- type String
- The type of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Route resource produces the following output properties:
- Etag string
- A unique read-only string that changes whenever the resource is updated.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning state of the route resource.
- Etag string
- A unique read-only string that changes whenever the resource is updated.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning state of the route resource.
- etag String
- A unique read-only string that changes whenever the resource is updated.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning state of the route resource.
- etag string
- A unique read-only string that changes whenever the resource is updated.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioning
State string - The provisioning state of the route resource.
- etag str
- A unique read-only string that changes whenever the resource is updated.
- id str
- The provider-assigned unique ID for this managed resource.
- provisioning_
state str - The provisioning state of the route resource.
- etag String
- A unique read-only string that changes whenever the resource is updated.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning state of the route resource.
Supporting Types
RouteNextHopType, RouteNextHopTypeArgs
- Virtual
Network Gateway - VirtualNetworkGateway
- Vnet
Local - VnetLocal
- Internet
- Internet
- Virtual
Appliance - VirtualAppliance
- None
- None
- Route
Next Hop Type Virtual Network Gateway - VirtualNetworkGateway
- Route
Next Hop Type Vnet Local - VnetLocal
- Route
Next Hop Type Internet - Internet
- Route
Next Hop Type Virtual Appliance - VirtualAppliance
- Route
Next Hop Type None - None
- Virtual
Network Gateway - VirtualNetworkGateway
- Vnet
Local - VnetLocal
- Internet
- Internet
- Virtual
Appliance - VirtualAppliance
- None
- None
- Virtual
Network Gateway - VirtualNetworkGateway
- Vnet
Local - VnetLocal
- Internet
- Internet
- Virtual
Appliance - VirtualAppliance
- None
- None
- VIRTUAL_NETWORK_GATEWAY
- VirtualNetworkGateway
- VNET_LOCAL
- VnetLocal
- INTERNET
- Internet
- VIRTUAL_APPLIANCE
- VirtualAppliance
- NONE
- None
- "Virtual
Network Gateway" - VirtualNetworkGateway
- "Vnet
Local" - VnetLocal
- "Internet"
- Internet
- "Virtual
Appliance" - VirtualAppliance
- "None"
- None
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:network:Route route1 /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/routeTables/testrt/routes/route1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0