Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin
import com.pulumi.azurenative.network.RouteArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.RouteNextHopType
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* 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.
* ## Example Usage
* ### Create route
* ```csharp
* 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 = AzureNative.Network.RouteNextHopType.VirtualNetworkGateway,
* ResourceGroupName = "rg1",
* RouteName = "route1",
* RouteTableName = "testrt",
* });
* });
* ```
* ```go
* 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.NewRoute(ctx, "route", &network.RouteArgs{
* AddressPrefix: pulumi.String("10.0.3.0/24"),
* NextHopType: pulumi.String(network.RouteNextHopTypeVirtualNetworkGateway),
* ResourceGroupName: pulumi.String("rg1"),
* RouteName: pulumi.String("route1"),
* RouteTableName: pulumi.String("testrt"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:network:Route route1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}
* ```
* @property addressPrefix The destination CIDR to which the route applies.
* @property hasBgpOverride A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
* @property id Resource ID.
* @property name The name of the resource that is unique within a resource group. This name can be used to access the resource.
* @property nextHopIpAddress The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
* @property nextHopType The type of Azure hop the packet should be sent to.
* @property resourceGroupName The name of the resource group.
* @property routeName The name of the route.
* @property routeTableName The name of the route table.
* @property type The type of the resource.
*/
public data class RouteArgs(
public val addressPrefix: Output? = null,
public val hasBgpOverride: Output? = null,
public val id: Output? = null,
public val name: Output? = null,
public val nextHopIpAddress: Output? = null,
public val nextHopType: Output>? = null,
public val resourceGroupName: Output? = null,
public val routeName: Output? = null,
public val routeTableName: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.RouteArgs =
com.pulumi.azurenative.network.RouteArgs.builder()
.addressPrefix(addressPrefix?.applyValue({ args0 -> args0 }))
.hasBgpOverride(hasBgpOverride?.applyValue({ args0 -> args0 }))
.id(id?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.nextHopIpAddress(nextHopIpAddress?.applyValue({ args0 -> args0 }))
.nextHopType(
nextHopType?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.routeName(routeName?.applyValue({ args0 -> args0 }))
.routeTableName(routeTableName?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RouteArgs].
*/
@PulumiTagMarker
public class RouteArgsBuilder internal constructor() {
private var addressPrefix: Output? = null
private var hasBgpOverride: Output? = null
private var id: Output? = null
private var name: Output? = null
private var nextHopIpAddress: Output? = null
private var nextHopType: Output>? = null
private var resourceGroupName: Output? = null
private var routeName: Output? = null
private var routeTableName: Output? = null
private var type: Output? = null
/**
* @param value The destination CIDR to which the route applies.
*/
@JvmName("lfbvceyjvphikmbw")
public suspend fun addressPrefix(`value`: Output) {
this.addressPrefix = value
}
/**
* @param value A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
*/
@JvmName("ekjlensewoelsjkw")
public suspend fun hasBgpOverride(`value`: Output) {
this.hasBgpOverride = value
}
/**
* @param value Resource ID.
*/
@JvmName("ufvovsbjktnbirmn")
public suspend fun id(`value`: Output) {
this.id = value
}
/**
* @param value The name of the resource that is unique within a resource group. This name can be used to access the resource.
*/
@JvmName("jtjlwurkrkvxbnla")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
*/
@JvmName("lqbcnwwicbhviahq")
public suspend fun nextHopIpAddress(`value`: Output) {
this.nextHopIpAddress = value
}
/**
* @param value The type of Azure hop the packet should be sent to.
*/
@JvmName("gamworbgoywhlsru")
public suspend fun nextHopType(`value`: Output>) {
this.nextHopType = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("niqdiwepgpcmsfrp")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the route.
*/
@JvmName("lywdsgwedqqnvbtq")
public suspend fun routeName(`value`: Output) {
this.routeName = value
}
/**
* @param value The name of the route table.
*/
@JvmName("qbbacrwxbqqcwrsc")
public suspend fun routeTableName(`value`: Output) {
this.routeTableName = value
}
/**
* @param value The type of the resource.
*/
@JvmName("lvtslgkrtuchhwdq")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value The destination CIDR to which the route applies.
*/
@JvmName("bvdmsxnsveoefquh")
public suspend fun addressPrefix(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.addressPrefix = mapped
}
/**
* @param value A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
*/
@JvmName("vunnmqybyyiihoxu")
public suspend fun hasBgpOverride(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hasBgpOverride = mapped
}
/**
* @param value Resource ID.
*/
@JvmName("wvmnxfnwjmegjgke")
public suspend fun id(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.id = mapped
}
/**
* @param value The name of the resource that is unique within a resource group. This name can be used to access the resource.
*/
@JvmName("xgtkhosqfbibkcoh")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
*/
@JvmName("mfpaegrqjlxxjmfs")
public suspend fun nextHopIpAddress(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.nextHopIpAddress = mapped
}
/**
* @param value The type of Azure hop the packet should be sent to.
*/
@JvmName("ietkwwtvodhlmosv")
public suspend fun nextHopType(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.nextHopType = mapped
}
/**
* @param value The type of Azure hop the packet should be sent to.
*/
@JvmName("lyhqnrgqvghlfgqn")
public fun nextHopType(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.nextHopType = mapped
}
/**
* @param value The type of Azure hop the packet should be sent to.
*/
@JvmName("cdlqnefwrkwsnkqy")
public fun nextHopType(`value`: RouteNextHopType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.nextHopType = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("sbbxqosqkwsjqwmi")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The name of the route.
*/
@JvmName("edibxifhwbkusbjq")
public suspend fun routeName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.routeName = mapped
}
/**
* @param value The name of the route table.
*/
@JvmName("qnrapfavrrfsphyo")
public suspend fun routeTableName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.routeTableName = mapped
}
/**
* @param value The type of the resource.
*/
@JvmName("myptiqvxynajorot")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): RouteArgs = RouteArgs(
addressPrefix = addressPrefix,
hasBgpOverride = hasBgpOverride,
id = id,
name = name,
nextHopIpAddress = nextHopIpAddress,
nextHopType = nextHopType,
resourceGroupName = resourceGroupName,
routeName = routeName,
routeTableName = routeTableName,
type = type,
)
}