azure-native.network.Route
Explore with Pulumi AI
Route resource. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
Other available API versions: 2019-06-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01.
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,
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
This property is required. string - The unique name of the resource.
- args
This property is required. RouteArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. 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
This property is required. string - The unique name of the resource.
- args
This property is required. RouteArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. RouteArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. 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",
Id = "string",
Name = "string",
NextHopIpAddress = "string",
RouteName = "string",
Type = "string",
});
example, err := network.NewRoute(ctx, "azure-nativeRouteResource", &network.RouteArgs{
NextHopType: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
RouteTableName: pulumi.String("string"),
AddressPrefix: pulumi.String("string"),
Id: pulumi.String("string"),
Name: pulumi.String("string"),
NextHopIpAddress: pulumi.String("string"),
RouteName: pulumi.String("string"),
Type: pulumi.String("string"),
})
var azure_nativeRouteResource = new Route("azure-nativeRouteResource", RouteArgs.builder()
.nextHopType("string")
.resourceGroupName("string")
.routeTableName("string")
.addressPrefix("string")
.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",
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",
id: "string",
name: "string",
nextHopIpAddress: "string",
routeName: "string",
type: "string",
});
type: azure-native:network:Route
properties:
addressPrefix: string
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 Type This property is required. string | Pulumi.Azure Native. Network. Route Next Hop Type - The type of Azure hop the packet should be sent to.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- Route
Table Name This property is required. Changes to this property will trigger replacement.
- The name of the route table.
- Address
Prefix string - The destination CIDR to which the route applies.
- 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 Changes to this property will trigger replacement.
- The name of the route.
- Type string
- The type of the resource.
- Next
Hop Type This property is required. string | RouteNext Hop Type - The type of Azure hop the packet should be sent to.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- Route
Table Name This property is required. Changes to this property will trigger replacement.
- The name of the route table.
- Address
Prefix string - The destination CIDR to which the route applies.
- 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 Changes to this property will trigger replacement.
- The name of the route.
- Type string
- The type of the resource.
- next
Hop Type This property is required. String | RouteNext Hop Type - The type of Azure hop the packet should be sent to.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- route
Table Name This property is required. Changes to this property will trigger replacement.
- The name of the route table.
- address
Prefix String - The destination CIDR to which the route applies.
- 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 Changes to this property will trigger replacement.
- The name of the route.
- type String
- The type of the resource.
- next
Hop Type This property is required. string | RouteNext Hop Type - The type of Azure hop the packet should be sent to.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- route
Table Name This property is required. Changes to this property will trigger replacement.
- The name of the route table.
- address
Prefix string - The destination CIDR to which the route applies.
- 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 Changes to this property will trigger replacement.
- The name of the route.
- type string
- The type of the resource.
- next_
hop_ type This property is required. str | RouteNext Hop Type - The type of Azure hop the packet should be sent to.
- resource_
group_ name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- route_
table_ name This property is required. Changes to this property will trigger replacement.
- The name of the route table.
- address_
prefix str - The destination CIDR to which the route applies.
- 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 Changes to this property will trigger replacement.
- The name of the route.
- type str
- The type of the resource.
- next
Hop Type This property is required. String | "VirtualNetwork Gateway" | "Vnet Local" | "Internet" | "Virtual Appliance" | "None" - The type of Azure hop the packet should be sent to.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- route
Table Name This property is required. Changes to this property will trigger replacement.
- The name of the route table.
- address
Prefix String - The destination CIDR to which the route applies.
- 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 Changes to this property will trigger replacement.
- 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.
- Has
Bgp boolOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- 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.
- Has
Bgp boolOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- 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.
- has
Bgp BooleanOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- 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.
- has
Bgp booleanOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- 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.
- has_
bgp_ booloverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- 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.
- has
Bgp BooleanOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
- 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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0