RoutingRuleArgs

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-05-01. In version 2.x of the Azure Native provider, it used API version 2024-03-01. Other available API versions: 2024-03-01, 2024-07-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native network [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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/v3"
"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

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}

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
val configurationName: Output<String>? = null

The name of the network manager Routing Configuration.

Link copied to clipboard
val description: Output<String>? = null

A description for this rule.

Link copied to clipboard

Indicates the destination for this particular rule.

Link copied to clipboard
val networkManagerName: Output<String>? = null

The name of the network manager.

Link copied to clipboard
val nextHop: Output<RoutingRuleNextHopArgs>? = null

Indicates the next hop for this particular rule.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val ruleCollectionName: Output<String>? = null

The name of the network manager routing Configuration rule collection.

Link copied to clipboard
val ruleName: Output<String>? = null

The name of the rule.

Functions

Link copied to clipboard
open override fun toJava(): RoutingRuleArgs