azure-native.network.RoutingRule
Explore with Pulumi AI
Network routing rule. Azure REST API version: 2024-03-01.
Example Usage
Create a default routing rule
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var routingRule = new AzureNative.Network.RoutingRule("routingRule", new()
{
ConfigurationName = "myTestRoutingConfig",
Description = "This is Sample Routing Rule",
Destination = new AzureNative.Network.Inputs.RoutingRuleRouteDestinationArgs
{
DestinationAddress = "10.0.0.0/16",
Type = AzureNative.Network.RoutingRuleDestinationType.AddressPrefix,
},
NetworkManagerName = "testNetworkManager",
NextHop = new AzureNative.Network.Inputs.RoutingRuleNextHopArgs
{
NextHopType = AzureNative.Network.RoutingRuleNextHopType.VirtualNetworkGateway,
},
ResourceGroupName = "rg1",
RuleCollectionName = "testRuleCollection",
RuleName = "SampleRoutingRule",
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewRoutingRule(ctx, "routingRule", &network.RoutingRuleArgs{
ConfigurationName: pulumi.String("myTestRoutingConfig"),
Description: pulumi.String("This is Sample Routing Rule"),
Destination: &network.RoutingRuleRouteDestinationArgs{
DestinationAddress: pulumi.String("10.0.0.0/16"),
Type: pulumi.String(network.RoutingRuleDestinationTypeAddressPrefix),
},
NetworkManagerName: pulumi.String("testNetworkManager"),
NextHop: &network.RoutingRuleNextHopArgs{
NextHopType: pulumi.String(network.RoutingRuleNextHopTypeVirtualNetworkGateway),
},
ResourceGroupName: pulumi.String("rg1"),
RuleCollectionName: pulumi.String("testRuleCollection"),
RuleName: pulumi.String("SampleRoutingRule"),
})
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.RoutingRule;
import com.pulumi.azurenative.network.RoutingRuleArgs;
import com.pulumi.azurenative.network.inputs.RoutingRuleRouteDestinationArgs;
import com.pulumi.azurenative.network.inputs.RoutingRuleNextHopArgs;
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 routingRule = new RoutingRule("routingRule", RoutingRuleArgs.builder()
.configurationName("myTestRoutingConfig")
.description("This is Sample Routing Rule")
.destination(RoutingRuleRouteDestinationArgs.builder()
.destinationAddress("10.0.0.0/16")
.type("AddressPrefix")
.build())
.networkManagerName("testNetworkManager")
.nextHop(RoutingRuleNextHopArgs.builder()
.nextHopType("VirtualNetworkGateway")
.build())
.resourceGroupName("rg1")
.ruleCollectionName("testRuleCollection")
.ruleName("SampleRoutingRule")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
routing_rule = azure_native.network.RoutingRule("routingRule",
configuration_name="myTestRoutingConfig",
description="This is Sample Routing Rule",
destination={
"destination_address": "10.0.0.0/16",
"type": azure_native.network.RoutingRuleDestinationType.ADDRESS_PREFIX,
},
network_manager_name="testNetworkManager",
next_hop={
"next_hop_type": azure_native.network.RoutingRuleNextHopType.VIRTUAL_NETWORK_GATEWAY,
},
resource_group_name="rg1",
rule_collection_name="testRuleCollection",
rule_name="SampleRoutingRule")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const routingRule = new azure_native.network.RoutingRule("routingRule", {
configurationName: "myTestRoutingConfig",
description: "This is Sample Routing Rule",
destination: {
destinationAddress: "10.0.0.0/16",
type: azure_native.network.RoutingRuleDestinationType.AddressPrefix,
},
networkManagerName: "testNetworkManager",
nextHop: {
nextHopType: azure_native.network.RoutingRuleNextHopType.VirtualNetworkGateway,
},
resourceGroupName: "rg1",
ruleCollectionName: "testRuleCollection",
ruleName: "SampleRoutingRule",
});
resources:
routingRule:
type: azure-native:network:RoutingRule
properties:
configurationName: myTestRoutingConfig
description: This is Sample Routing Rule
destination:
destinationAddress: 10.0.0.0/16
type: AddressPrefix
networkManagerName: testNetworkManager
nextHop:
nextHopType: VirtualNetworkGateway
resourceGroupName: rg1
ruleCollectionName: testRuleCollection
ruleName: SampleRoutingRule
Create RoutingRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoutingRule(name: string, args: RoutingRuleArgs, opts?: CustomResourceOptions);
@overload
def RoutingRule(resource_name: str,
args: RoutingRuleInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RoutingRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
configuration_name: Optional[str] = None,
destination: Optional[RoutingRuleRouteDestinationArgs] = None,
network_manager_name: Optional[str] = None,
next_hop: Optional[RoutingRuleNextHopArgs] = None,
resource_group_name: Optional[str] = None,
rule_collection_name: Optional[str] = None,
description: Optional[str] = None,
rule_name: Optional[str] = None)
func NewRoutingRule(ctx *Context, name string, args RoutingRuleArgs, opts ...ResourceOption) (*RoutingRule, error)
public RoutingRule(string name, RoutingRuleArgs args, CustomResourceOptions? opts = null)
public RoutingRule(String name, RoutingRuleArgs args)
public RoutingRule(String name, RoutingRuleArgs args, CustomResourceOptions options)
type: azure-native:network:RoutingRule
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 RoutingRuleArgs
- 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 RoutingRuleInitArgs
- 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 RoutingRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoutingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoutingRuleArgs
- 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 routingRuleResource = new AzureNative.Network.RoutingRule("routingRuleResource", new()
{
ConfigurationName = "string",
Destination = new AzureNative.Network.Inputs.RoutingRuleRouteDestinationArgs
{
DestinationAddress = "string",
Type = "string",
},
NetworkManagerName = "string",
NextHop = new AzureNative.Network.Inputs.RoutingRuleNextHopArgs
{
NextHopType = "string",
NextHopAddress = "string",
},
ResourceGroupName = "string",
RuleCollectionName = "string",
Description = "string",
RuleName = "string",
});
example, err := network.NewRoutingRule(ctx, "routingRuleResource", &network.RoutingRuleArgs{
ConfigurationName: pulumi.String("string"),
Destination: &network.RoutingRuleRouteDestinationArgs{
DestinationAddress: pulumi.String("string"),
Type: pulumi.String("string"),
},
NetworkManagerName: pulumi.String("string"),
NextHop: &network.RoutingRuleNextHopArgs{
NextHopType: pulumi.String("string"),
NextHopAddress: pulumi.String("string"),
},
ResourceGroupName: pulumi.String("string"),
RuleCollectionName: pulumi.String("string"),
Description: pulumi.String("string"),
RuleName: pulumi.String("string"),
})
var routingRuleResource = new RoutingRule("routingRuleResource", RoutingRuleArgs.builder()
.configurationName("string")
.destination(RoutingRuleRouteDestinationArgs.builder()
.destinationAddress("string")
.type("string")
.build())
.networkManagerName("string")
.nextHop(RoutingRuleNextHopArgs.builder()
.nextHopType("string")
.nextHopAddress("string")
.build())
.resourceGroupName("string")
.ruleCollectionName("string")
.description("string")
.ruleName("string")
.build());
routing_rule_resource = azure_native.network.RoutingRule("routingRuleResource",
configuration_name="string",
destination={
"destination_address": "string",
"type": "string",
},
network_manager_name="string",
next_hop={
"next_hop_type": "string",
"next_hop_address": "string",
},
resource_group_name="string",
rule_collection_name="string",
description="string",
rule_name="string")
const routingRuleResource = new azure_native.network.RoutingRule("routingRuleResource", {
configurationName: "string",
destination: {
destinationAddress: "string",
type: "string",
},
networkManagerName: "string",
nextHop: {
nextHopType: "string",
nextHopAddress: "string",
},
resourceGroupName: "string",
ruleCollectionName: "string",
description: "string",
ruleName: "string",
});
type: azure-native:network:RoutingRule
properties:
configurationName: string
description: string
destination:
destinationAddress: string
type: string
networkManagerName: string
nextHop:
nextHopAddress: string
nextHopType: string
resourceGroupName: string
ruleCollectionName: string
ruleName: string
RoutingRule 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 RoutingRule resource accepts the following input properties:
- Configuration
Name string - The name of the network manager Routing Configuration.
- Destination
Pulumi.
Azure Native. Network. Inputs. Routing Rule Route Destination - Indicates the destination for this particular rule.
- Network
Manager stringName - The name of the network manager.
- Next
Hop Pulumi.Azure Native. Network. Inputs. Routing Rule Next Hop - Indicates the next hop for this particular rule.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Rule
Collection stringName - The name of the network manager routing Configuration rule collection.
- Description string
- A description for this rule.
- Rule
Name string - The name of the rule.
- Configuration
Name string - The name of the network manager Routing Configuration.
- Destination
Routing
Rule Route Destination Args - Indicates the destination for this particular rule.
- Network
Manager stringName - The name of the network manager.
- Next
Hop RoutingRule Next Hop Args - Indicates the next hop for this particular rule.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Rule
Collection stringName - The name of the network manager routing Configuration rule collection.
- Description string
- A description for this rule.
- Rule
Name string - The name of the rule.
- configuration
Name String - The name of the network manager Routing Configuration.
- destination
Routing
Rule Route Destination - Indicates the destination for this particular rule.
- network
Manager StringName - The name of the network manager.
- next
Hop RoutingRule Next Hop - Indicates the next hop for this particular rule.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- rule
Collection StringName - The name of the network manager routing Configuration rule collection.
- description String
- A description for this rule.
- rule
Name String - The name of the rule.
- configuration
Name string - The name of the network manager Routing Configuration.
- destination
Routing
Rule Route Destination - Indicates the destination for this particular rule.
- network
Manager stringName - The name of the network manager.
- next
Hop RoutingRule Next Hop - Indicates the next hop for this particular rule.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- rule
Collection stringName - The name of the network manager routing Configuration rule collection.
- description string
- A description for this rule.
- rule
Name string - The name of the rule.
- configuration_
name str - The name of the network manager Routing Configuration.
- destination
Routing
Rule Route Destination Args - Indicates the destination for this particular rule.
- network_
manager_ strname - The name of the network manager.
- next_
hop RoutingRule Next Hop Args - Indicates the next hop for this particular rule.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- rule_
collection_ strname - The name of the network manager routing Configuration rule collection.
- description str
- A description for this rule.
- rule_
name str - The name of the rule.
- configuration
Name String - The name of the network manager Routing Configuration.
- destination Property Map
- Indicates the destination for this particular rule.
- network
Manager StringName - The name of the network manager.
- next
Hop Property Map - Indicates the next hop for this particular rule.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- rule
Collection StringName - The name of the network manager routing Configuration rule collection.
- description String
- A description for this rule.
- rule
Name String - The name of the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoutingRule 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.
- Name string
- Resource name.
- Provisioning
State string - The provisioning state of the resource.
- Resource
Guid string - Unique identifier for this resource.
- System
Data Pulumi.Azure Native. Network. Outputs. System Data Response - The system metadata related to this resource.
- Type string
- Resource type.
- 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.
- Name string
- Resource name.
- Provisioning
State string - The provisioning state of the resource.
- Resource
Guid string - Unique identifier for this resource.
- System
Data SystemData Response - The system metadata related to this resource.
- Type string
- Resource type.
- 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.
- name String
- Resource name.
- provisioning
State String - The provisioning state of the resource.
- resource
Guid String - Unique identifier for this resource.
- system
Data SystemData Response - The system metadata related to this resource.
- type String
- Resource type.
- 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.
- name string
- Resource name.
- provisioning
State string - The provisioning state of the resource.
- resource
Guid string - Unique identifier for this resource.
- system
Data SystemData Response - The system metadata related to this resource.
- type string
- Resource type.
- 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.
- name str
- Resource name.
- provisioning_
state str - The provisioning state of the resource.
- resource_
guid str - Unique identifier for this resource.
- system_
data SystemData Response - The system metadata related to this resource.
- type str
- Resource type.
- 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.
- name String
- Resource name.
- provisioning
State String - The provisioning state of the resource.
- resource
Guid String - Unique identifier for this resource.
- system
Data Property Map - The system metadata related to this resource.
- type String
- Resource type.
Supporting Types
RoutingRuleDestinationType, RoutingRuleDestinationTypeArgs
- Address
Prefix - AddressPrefix
- Service
Tag - ServiceTag
- Routing
Rule Destination Type Address Prefix - AddressPrefix
- Routing
Rule Destination Type Service Tag - ServiceTag
- Address
Prefix - AddressPrefix
- Service
Tag - ServiceTag
- Address
Prefix - AddressPrefix
- Service
Tag - ServiceTag
- ADDRESS_PREFIX
- AddressPrefix
- SERVICE_TAG
- ServiceTag
- "Address
Prefix" - AddressPrefix
- "Service
Tag" - ServiceTag
RoutingRuleNextHop, RoutingRuleNextHopArgs
- Next
Hop string | Pulumi.Type Azure Native. Network. Routing Rule Next Hop Type - Next hop type.
- Next
Hop stringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- Next
Hop string | RoutingType Rule Next Hop Type - Next hop type.
- Next
Hop stringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- next
Hop String | RoutingType Rule Next Hop Type - Next hop type.
- next
Hop StringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- next
Hop string | RoutingType Rule Next Hop Type - Next hop type.
- next
Hop stringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- next_
hop_ str | Routingtype Rule Next Hop Type - Next hop type.
- next_
hop_ straddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- next
Hop String | "Internet" | "NoType Next Hop" | "Virtual Appliance" | "Virtual Network Gateway" | "Vnet Local" - Next hop type.
- next
Hop StringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
RoutingRuleNextHopResponse, RoutingRuleNextHopResponseArgs
- Next
Hop stringType - Next hop type.
- Next
Hop stringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- Next
Hop stringType - Next hop type.
- Next
Hop stringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- next
Hop StringType - Next hop type.
- next
Hop StringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- next
Hop stringType - Next hop type.
- next
Hop stringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- next_
hop_ strtype - Next hop type.
- next_
hop_ straddress - Next hop address. Only required if the next hop type is VirtualAppliance.
- next
Hop StringType - Next hop type.
- next
Hop StringAddress - Next hop address. Only required if the next hop type is VirtualAppliance.
RoutingRuleNextHopType, RoutingRuleNextHopTypeArgs
- Internet
- Internet
- No
Next Hop - NoNextHop
- Virtual
Appliance - VirtualAppliance
- Virtual
Network Gateway - VirtualNetworkGateway
- Vnet
Local - VnetLocal
- Routing
Rule Next Hop Type Internet - Internet
- Routing
Rule Next Hop Type No Next Hop - NoNextHop
- Routing
Rule Next Hop Type Virtual Appliance - VirtualAppliance
- Routing
Rule Next Hop Type Virtual Network Gateway - VirtualNetworkGateway
- Routing
Rule Next Hop Type Vnet Local - VnetLocal
- Internet
- Internet
- No
Next Hop - NoNextHop
- Virtual
Appliance - VirtualAppliance
- Virtual
Network Gateway - VirtualNetworkGateway
- Vnet
Local - VnetLocal
- Internet
- Internet
- No
Next Hop - NoNextHop
- Virtual
Appliance - VirtualAppliance
- Virtual
Network Gateway - VirtualNetworkGateway
- Vnet
Local - VnetLocal
- INTERNET
- Internet
- NO_NEXT_HOP
- NoNextHop
- VIRTUAL_APPLIANCE
- VirtualAppliance
- VIRTUAL_NETWORK_GATEWAY
- VirtualNetworkGateway
- VNET_LOCAL
- VnetLocal
- "Internet"
- Internet
- "No
Next Hop" - NoNextHop
- "Virtual
Appliance" - VirtualAppliance
- "Virtual
Network Gateway" - VirtualNetworkGateway
- "Vnet
Local" - VnetLocal
RoutingRuleRouteDestination, RoutingRuleRouteDestinationArgs
- Destination
Address string - Destination address.
- Type
string | Pulumi.
Azure Native. Network. Routing Rule Destination Type - Destination type.
- Destination
Address string - Destination address.
- Type
string | Routing
Rule Destination Type - Destination type.
- destination
Address String - Destination address.
- type
String | Routing
Rule Destination Type - Destination type.
- destination
Address string - Destination address.
- type
string | Routing
Rule Destination Type - Destination type.
- destination_
address str - Destination address.
- type
str | Routing
Rule Destination Type - Destination type.
- destination
Address String - Destination address.
- type
String | "Address
Prefix" | "Service Tag" - Destination type.
RoutingRuleRouteDestinationResponse, RoutingRuleRouteDestinationResponseArgs
- Destination
Address string - Destination address.
- Type string
- Destination type.
- Destination
Address string - Destination address.
- Type string
- Destination type.
- destination
Address String - Destination address.
- type String
- Destination type.
- destination
Address string - Destination address.
- type string
- Destination type.
- destination_
address str - Destination address.
- type str
- Destination type.
- destination
Address String - Destination address.
- type String
- Destination type.
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The type of identity that last modified the resource.
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The type of identity that last modified the resource.
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The type of identity that last modified the resource.
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The type of identity that last modified the resource.
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The type of identity that last modified the resource.
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The type of identity that last modified the resource.
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:network:RoutingRule SampleRoutingRule /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0