Please wait. This can take some minutes ...
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.
com.pulumi.azure.network.kotlin.LocalNetworkGatewayArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.network.kotlin
import com.pulumi.azure.network.LocalNetworkGatewayArgs.builder
import com.pulumi.azure.network.kotlin.inputs.LocalNetworkGatewayBgpSettingsArgs
import com.pulumi.azure.network.kotlin.inputs.LocalNetworkGatewayBgpSettingsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a local network gateway connection over which specific connections can be configured.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "localNetworkGWTest",
* location: "West Europe",
* });
* const home = new azure.network.LocalNetworkGateway("home", {
* name: "backHome",
* resourceGroupName: example.name,
* location: example.location,
* gatewayAddress: "12.13.14.15",
* addressSpaces: ["10.0.0.0/16"],
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="localNetworkGWTest",
* location="West Europe")
* home = azure.network.LocalNetworkGateway("home",
* name="backHome",
* resource_group_name=example.name,
* location=example.location,
* gateway_address="12.13.14.15",
* address_spaces=["10.0.0.0/16"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "localNetworkGWTest",
* Location = "West Europe",
* });
* var home = new Azure.Network.LocalNetworkGateway("home", new()
* {
* Name = "backHome",
* ResourceGroupName = example.Name,
* Location = example.Location,
* GatewayAddress = "12.13.14.15",
* AddressSpaces = new[]
* {
* "10.0.0.0/16",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("localNetworkGWTest"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = network.NewLocalNetworkGateway(ctx, "home", &network.LocalNetworkGatewayArgs{
* Name: pulumi.String("backHome"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* GatewayAddress: pulumi.String("12.13.14.15"),
* AddressSpaces: pulumi.StringArray{
* pulumi.String("10.0.0.0/16"),
* },
* })
* 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.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.network.LocalNetworkGateway;
* import com.pulumi.azure.network.LocalNetworkGatewayArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("localNetworkGWTest")
* .location("West Europe")
* .build());
* var home = new LocalNetworkGateway("home", LocalNetworkGatewayArgs.builder()
* .name("backHome")
* .resourceGroupName(example.name())
* .location(example.location())
* .gatewayAddress("12.13.14.15")
* .addressSpaces("10.0.0.0/16")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: localNetworkGWTest
* location: West Europe
* home:
* type: azure:network:LocalNetworkGateway
* properties:
* name: backHome
* resourceGroupName: ${example.name}
* location: ${example.location}
* gatewayAddress: 12.13.14.15
* addressSpaces:
* - 10.0.0.0/16
* ```
*
* ## Import
* Local Network Gateways can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:network/localNetworkGateway:LocalNetworkGateway lng1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/localNetworkGateways/lng1
* ```
* @property addressSpaces The list of string CIDRs representing the address spaces the gateway exposes.
* @property bgpSettings A `bgp_settings` block as defined below containing the Local Network Gateway's BGP speaker settings.
* @property gatewayAddress The gateway IP address to connect with.
* @property gatewayFqdn The gateway FQDN to connect with.
* > **NOTE:** Either `gateway_address` or `gateway_fqdn` should be specified.
* @property location The location/region where the local network gateway is created. Changing this forces a new resource to be created.
* @property name The name of the local network gateway. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
* @property tags A mapping of tags to assign to the resource.
*/
public data class LocalNetworkGatewayArgs(
public val addressSpaces: Output>? = null,
public val bgpSettings: Output? = null,
public val gatewayAddress: Output? = null,
public val gatewayFqdn: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.network.LocalNetworkGatewayArgs =
com.pulumi.azure.network.LocalNetworkGatewayArgs.builder()
.addressSpaces(addressSpaces?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.bgpSettings(bgpSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.gatewayAddress(gatewayAddress?.applyValue({ args0 -> args0 }))
.gatewayFqdn(gatewayFqdn?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [LocalNetworkGatewayArgs].
*/
@PulumiTagMarker
public class LocalNetworkGatewayArgsBuilder internal constructor() {
private var addressSpaces: Output>? = null
private var bgpSettings: Output? = null
private var gatewayAddress: Output? = null
private var gatewayFqdn: Output? = null
private var location: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
/**
* @param value The list of string CIDRs representing the address spaces the gateway exposes.
*/
@JvmName("rkhyphsexosfqjea")
public suspend fun addressSpaces(`value`: Output>) {
this.addressSpaces = value
}
@JvmName("ksceqyrfaafxkhoj")
public suspend fun addressSpaces(vararg values: Output) {
this.addressSpaces = Output.all(values.asList())
}
/**
* @param values The list of string CIDRs representing the address spaces the gateway exposes.
*/
@JvmName("aexxnipuhgehtdnk")
public suspend fun addressSpaces(values: List>) {
this.addressSpaces = Output.all(values)
}
/**
* @param value A `bgp_settings` block as defined below containing the Local Network Gateway's BGP speaker settings.
*/
@JvmName("cgreaffevmnybdei")
public suspend fun bgpSettings(`value`: Output) {
this.bgpSettings = value
}
/**
* @param value The gateway IP address to connect with.
*/
@JvmName("dtjwfuvoqyjlmasw")
public suspend fun gatewayAddress(`value`: Output) {
this.gatewayAddress = value
}
/**
* @param value The gateway FQDN to connect with.
* > **NOTE:** Either `gateway_address` or `gateway_fqdn` should be specified.
*/
@JvmName("xattchoesqfniwge")
public suspend fun gatewayFqdn(`value`: Output) {
this.gatewayFqdn = value
}
/**
* @param value The location/region where the local network gateway is created. Changing this forces a new resource to be created.
*/
@JvmName("pklvofygypjrdbyf")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the local network gateway. Changing this forces a new resource to be created.
*/
@JvmName("iexklpsbgsewacjf")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
*/
@JvmName("wgytwjdfxjdbgnxr")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A mapping of tags to assign to the resource.
*/
@JvmName("ysmdbeldqjirrhue")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The list of string CIDRs representing the address spaces the gateway exposes.
*/
@JvmName("bdrfrqftcbttbjeq")
public suspend fun addressSpaces(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.addressSpaces = mapped
}
/**
* @param values The list of string CIDRs representing the address spaces the gateway exposes.
*/
@JvmName("llkukaiixgmutjcv")
public suspend fun addressSpaces(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.addressSpaces = mapped
}
/**
* @param value A `bgp_settings` block as defined below containing the Local Network Gateway's BGP speaker settings.
*/
@JvmName("rhylqnjfgvttdpfx")
public suspend fun bgpSettings(`value`: LocalNetworkGatewayBgpSettingsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.bgpSettings = mapped
}
/**
* @param argument A `bgp_settings` block as defined below containing the Local Network Gateway's BGP speaker settings.
*/
@JvmName("eeegqveweherbqbm")
public suspend fun bgpSettings(argument: suspend LocalNetworkGatewayBgpSettingsArgsBuilder.() -> Unit) {
val toBeMapped = LocalNetworkGatewayBgpSettingsArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.bgpSettings = mapped
}
/**
* @param value The gateway IP address to connect with.
*/
@JvmName("gliamyitklyhchho")
public suspend fun gatewayAddress(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.gatewayAddress = mapped
}
/**
* @param value The gateway FQDN to connect with.
* > **NOTE:** Either `gateway_address` or `gateway_fqdn` should be specified.
*/
@JvmName("rwtqeijwvijwemdg")
public suspend fun gatewayFqdn(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.gatewayFqdn = mapped
}
/**
* @param value The location/region where the local network gateway is created. Changing this forces a new resource to be created.
*/
@JvmName("ywumjdtcnbjyetca")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the local network gateway. Changing this forces a new resource to be created.
*/
@JvmName("qylrutxofsjaeeak")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
*/
@JvmName("datmnfmqemmxpcqy")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value A mapping of tags to assign to the resource.
*/
@JvmName("evuralrksuwhyjts")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A mapping of tags to assign to the resource.
*/
@JvmName("qwsvmghouneijaxd")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): LocalNetworkGatewayArgs = LocalNetworkGatewayArgs(
addressSpaces = addressSpaces,
bgpSettings = bgpSettings,
gatewayAddress = gatewayAddress,
gatewayFqdn = gatewayFqdn,
location = location,
name = name,
resourceGroupName = resourceGroupName,
tags = tags,
)
}