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.VpnSiteArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.network.kotlin
import com.pulumi.azure.network.VpnSiteArgs.builder
import com.pulumi.azure.network.kotlin.inputs.VpnSiteLinkArgs
import com.pulumi.azure.network.kotlin.inputs.VpnSiteLinkArgsBuilder
import com.pulumi.azure.network.kotlin.inputs.VpnSiteO365PolicyArgs
import com.pulumi.azure.network.kotlin.inputs.VpnSiteO365PolicyArgsBuilder
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 VPN Site.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-rg",
* location: "West Europe",
* });
* const exampleVirtualWan = new azure.network.VirtualWan("example", {
* name: "example-vwan",
* resourceGroupName: example.name,
* location: example.location,
* });
* const exampleVpnSite = new azure.network.VpnSite("example", {
* name: "site1",
* resourceGroupName: example.name,
* location: example.location,
* virtualWanId: exampleVirtualWan.id,
* addressCidrs: ["10.0.0.0/24"],
* links: [{
* name: "link1",
* ipAddress: "10.0.0.1",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-rg",
* location="West Europe")
* example_virtual_wan = azure.network.VirtualWan("example",
* name="example-vwan",
* resource_group_name=example.name,
* location=example.location)
* example_vpn_site = azure.network.VpnSite("example",
* name="site1",
* resource_group_name=example.name,
* location=example.location,
* virtual_wan_id=example_virtual_wan.id,
* address_cidrs=["10.0.0.0/24"],
* links=[{
* "name": "link1",
* "ip_address": "10.0.0.1",
* }])
* ```
* ```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 = "example-rg",
* Location = "West Europe",
* });
* var exampleVirtualWan = new Azure.Network.VirtualWan("example", new()
* {
* Name = "example-vwan",
* ResourceGroupName = example.Name,
* Location = example.Location,
* });
* var exampleVpnSite = new Azure.Network.VpnSite("example", new()
* {
* Name = "site1",
* ResourceGroupName = example.Name,
* Location = example.Location,
* VirtualWanId = exampleVirtualWan.Id,
* AddressCidrs = new[]
* {
* "10.0.0.0/24",
* },
* Links = new[]
* {
* new Azure.Network.Inputs.VpnSiteLinkArgs
* {
* Name = "link1",
* IpAddress = "10.0.0.1",
* },
* },
* });
* });
* ```
* ```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("example-rg"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{
* Name: pulumi.String("example-vwan"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* })
* if err != nil {
* return err
* }
* _, err = network.NewVpnSite(ctx, "example", &network.VpnSiteArgs{
* Name: pulumi.String("site1"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* VirtualWanId: exampleVirtualWan.ID(),
* AddressCidrs: pulumi.StringArray{
* pulumi.String("10.0.0.0/24"),
* },
* Links: network.VpnSiteLinkArray{
* &network.VpnSiteLinkArgs{
* Name: pulumi.String("link1"),
* IpAddress: pulumi.String("10.0.0.1"),
* },
* },
* })
* 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.VirtualWan;
* import com.pulumi.azure.network.VirtualWanArgs;
* import com.pulumi.azure.network.VpnSite;
* import com.pulumi.azure.network.VpnSiteArgs;
* import com.pulumi.azure.network.inputs.VpnSiteLinkArgs;
* 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("example-rg")
* .location("West Europe")
* .build());
* var exampleVirtualWan = new VirtualWan("exampleVirtualWan", VirtualWanArgs.builder()
* .name("example-vwan")
* .resourceGroupName(example.name())
* .location(example.location())
* .build());
* var exampleVpnSite = new VpnSite("exampleVpnSite", VpnSiteArgs.builder()
* .name("site1")
* .resourceGroupName(example.name())
* .location(example.location())
* .virtualWanId(exampleVirtualWan.id())
* .addressCidrs("10.0.0.0/24")
* .links(VpnSiteLinkArgs.builder()
* .name("link1")
* .ipAddress("10.0.0.1")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-rg
* location: West Europe
* exampleVirtualWan:
* type: azure:network:VirtualWan
* name: example
* properties:
* name: example-vwan
* resourceGroupName: ${example.name}
* location: ${example.location}
* exampleVpnSite:
* type: azure:network:VpnSite
* name: example
* properties:
* name: site1
* resourceGroupName: ${example.name}
* location: ${example.location}
* virtualWanId: ${exampleVirtualWan.id}
* addressCidrs:
* - 10.0.0.0/24
* links:
* - name: link1
* ipAddress: 10.0.0.1
* ```
*
* ## Import
* VPN Sites can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:network/vpnSite:VpnSite example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/vpnSites/site1
* ```
* @property addressCidrs Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site.
* > **NOTE:** The `address_cidrs` has to be set when the `link.bgp` isn't specified.
* @property deviceModel The model of the VPN device.
* @property deviceVendor The name of the VPN device vendor.
* @property links One or more `link` blocks as defined below.
* @property location The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created.
* @property name The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created.
* @property o365Policy An `o365_policy` block as defined below.
* @property resourceGroupName The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created.
* @property tags A mapping of tags which should be assigned to the VPN Site.
* @property virtualWanId The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created.
*/
public data class VpnSiteArgs(
public val addressCidrs: Output>? = null,
public val deviceModel: Output? = null,
public val deviceVendor: Output? = null,
public val links: Output>? = null,
public val location: Output? = null,
public val name: Output? = null,
public val o365Policy: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
public val virtualWanId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.network.VpnSiteArgs =
com.pulumi.azure.network.VpnSiteArgs.builder()
.addressCidrs(addressCidrs?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.deviceModel(deviceModel?.applyValue({ args0 -> args0 }))
.deviceVendor(deviceVendor?.applyValue({ args0 -> args0 }))
.links(links?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.o365Policy(o365Policy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.virtualWanId(virtualWanId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [VpnSiteArgs].
*/
@PulumiTagMarker
public class VpnSiteArgsBuilder internal constructor() {
private var addressCidrs: Output>? = null
private var deviceModel: Output? = null
private var deviceVendor: Output? = null
private var links: Output>? = null
private var location: Output? = null
private var name: Output? = null
private var o365Policy: Output? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
private var virtualWanId: Output? = null
/**
* @param value Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site.
* > **NOTE:** The `address_cidrs` has to be set when the `link.bgp` isn't specified.
*/
@JvmName("dlawtaeiblrnwtfx")
public suspend fun addressCidrs(`value`: Output>) {
this.addressCidrs = value
}
@JvmName("skbvlxxjsiassahr")
public suspend fun addressCidrs(vararg values: Output) {
this.addressCidrs = Output.all(values.asList())
}
/**
* @param values Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site.
* > **NOTE:** The `address_cidrs` has to be set when the `link.bgp` isn't specified.
*/
@JvmName("gntnhkwtpqagtlur")
public suspend fun addressCidrs(values: List>) {
this.addressCidrs = Output.all(values)
}
/**
* @param value The model of the VPN device.
*/
@JvmName("pgkrruokgengacqn")
public suspend fun deviceModel(`value`: Output) {
this.deviceModel = value
}
/**
* @param value The name of the VPN device vendor.
*/
@JvmName("qyxjycamawwqytxh")
public suspend fun deviceVendor(`value`: Output) {
this.deviceVendor = value
}
/**
* @param value One or more `link` blocks as defined below.
*/
@JvmName("gcohlqyrugdmvgkh")
public suspend fun links(`value`: Output>) {
this.links = value
}
@JvmName("wbrmvqbavifunhbv")
public suspend fun links(vararg values: Output) {
this.links = Output.all(values.asList())
}
/**
* @param values One or more `link` blocks as defined below.
*/
@JvmName("apnsuyrqxwqntxkd")
public suspend fun links(values: List>) {
this.links = Output.all(values)
}
/**
* @param value The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created.
*/
@JvmName("vwwdcjqherrmqigm")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created.
*/
@JvmName("aipccgcsqptwfiqe")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value An `o365_policy` block as defined below.
*/
@JvmName("lqhqiuasicleqxfi")
public suspend fun o365Policy(`value`: Output) {
this.o365Policy = value
}
/**
* @param value The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created.
*/
@JvmName("hkpmxacvsphobstn")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A mapping of tags which should be assigned to the VPN Site.
*/
@JvmName("fnixmrhullnommkp")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created.
*/
@JvmName("bddcyqgcbfxfpbfo")
public suspend fun virtualWanId(`value`: Output) {
this.virtualWanId = value
}
/**
* @param value Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site.
* > **NOTE:** The `address_cidrs` has to be set when the `link.bgp` isn't specified.
*/
@JvmName("csyoppuoytdqjvnq")
public suspend fun addressCidrs(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.addressCidrs = mapped
}
/**
* @param values Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site.
* > **NOTE:** The `address_cidrs` has to be set when the `link.bgp` isn't specified.
*/
@JvmName("gtgpxdtkhmikwbnb")
public suspend fun addressCidrs(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.addressCidrs = mapped
}
/**
* @param value The model of the VPN device.
*/
@JvmName("xbmcmwdthlektkmo")
public suspend fun deviceModel(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deviceModel = mapped
}
/**
* @param value The name of the VPN device vendor.
*/
@JvmName("emkxhjckeqbcjscc")
public suspend fun deviceVendor(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deviceVendor = mapped
}
/**
* @param value One or more `link` blocks as defined below.
*/
@JvmName("sbocsghpdggcekdn")
public suspend fun links(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.links = mapped
}
/**
* @param argument One or more `link` blocks as defined below.
*/
@JvmName("iwiihlsjcmvqjdrp")
public suspend fun links(argument: List Unit>) {
val toBeMapped = argument.toList().map { VpnSiteLinkArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.links = mapped
}
/**
* @param argument One or more `link` blocks as defined below.
*/
@JvmName("ernjltgkbvsmknyo")
public suspend fun links(vararg argument: suspend VpnSiteLinkArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { VpnSiteLinkArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.links = mapped
}
/**
* @param argument One or more `link` blocks as defined below.
*/
@JvmName("afwatdofertbhgmv")
public suspend fun links(argument: suspend VpnSiteLinkArgsBuilder.() -> Unit) {
val toBeMapped = listOf(VpnSiteLinkArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.links = mapped
}
/**
* @param values One or more `link` blocks as defined below.
*/
@JvmName("mkidsiyyfdemxvdd")
public suspend fun links(vararg values: VpnSiteLinkArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.links = mapped
}
/**
* @param value The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created.
*/
@JvmName("frhpqebfocyuvvvq")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created.
*/
@JvmName("ryovmxavatmnsprs")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value An `o365_policy` block as defined below.
*/
@JvmName("plsoiaanadsxfcns")
public suspend fun o365Policy(`value`: VpnSiteO365PolicyArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.o365Policy = mapped
}
/**
* @param argument An `o365_policy` block as defined below.
*/
@JvmName("qajkivksxsfarkau")
public suspend fun o365Policy(argument: suspend VpnSiteO365PolicyArgsBuilder.() -> Unit) {
val toBeMapped = VpnSiteO365PolicyArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.o365Policy = mapped
}
/**
* @param value The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created.
*/
@JvmName("vdamutnuohscesty")
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 which should be assigned to the VPN Site.
*/
@JvmName("hcaewxuudgykhkkf")
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 which should be assigned to the VPN Site.
*/
@JvmName("brbensoheydhdbmm")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created.
*/
@JvmName("sgbgtsbnmdljomof")
public suspend fun virtualWanId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.virtualWanId = mapped
}
internal fun build(): VpnSiteArgs = VpnSiteArgs(
addressCidrs = addressCidrs,
deviceModel = deviceModel,
deviceVendor = deviceVendor,
links = links,
location = location,
name = name,
o365Policy = o365Policy,
resourceGroupName = resourceGroupName,
tags = tags,
virtualWanId = virtualWanId,
)
}