Routing Rule Args
data class RoutingRuleArgs(val configurationName: Output<String>? = null, val description: Output<String>? = null, val destination: Output<RoutingRuleRouteDestinationArgs>? = null, val networkManagerName: Output<String>? = null, val nextHop: Output<RoutingRuleNextHopArgs>? = null, val resourceGroupName: Output<String>? = null, val ruleCollectionName: Output<String>? = null, val ruleName: Output<String>? = null) : ConvertibleToJava<RoutingRuleArgs>
Network routing rule. Uses Azure REST API version 2024-03-01. Other available API versions: 2024-05-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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(configurationName: Output<String>? = null, description: Output<String>? = null, destination: Output<RoutingRuleRouteDestinationArgs>? = null, networkManagerName: Output<String>? = null, nextHop: Output<RoutingRuleNextHopArgs>? = null, resourceGroupName: Output<String>? = null, ruleCollectionName: Output<String>? = null, ruleName: Output<String>? = null)
Properties
Link copied to clipboard
The name of the network manager Routing Configuration.
Link copied to clipboard
A description for this rule.
Link copied to clipboard
Indicates the destination for this particular rule.
Link copied to clipboard
The name of the network manager.
Link copied to clipboard
Indicates the next hop for this particular rule.
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
The name of the network manager routing Configuration rule collection.