![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.network.kotlin.VirtualHub.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin
import com.pulumi.azurenative.network.kotlin.outputs.SubResourceResponse
import com.pulumi.azurenative.network.kotlin.outputs.VirtualHubRouteTableResponse
import com.pulumi.azurenative.network.kotlin.outputs.VirtualHubRouteTableV2Response
import com.pulumi.azurenative.network.kotlin.outputs.VirtualRouterAutoScaleConfigurationResponse
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azurenative.network.kotlin.outputs.SubResourceResponse.Companion.toKotlin as subResourceResponseToKotlin
import com.pulumi.azurenative.network.kotlin.outputs.VirtualHubRouteTableResponse.Companion.toKotlin as virtualHubRouteTableResponseToKotlin
import com.pulumi.azurenative.network.kotlin.outputs.VirtualHubRouteTableV2Response.Companion.toKotlin as virtualHubRouteTableV2ResponseToKotlin
import com.pulumi.azurenative.network.kotlin.outputs.VirtualRouterAutoScaleConfigurationResponse.Companion.toKotlin as virtualRouterAutoScaleConfigurationResponseToKotlin
/**
* Builder for [VirtualHub].
*/
@PulumiTagMarker
public class VirtualHubResourceBuilder internal constructor() {
public var name: String? = null
public var args: VirtualHubArgs = VirtualHubArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend VirtualHubArgsBuilder.() -> Unit) {
val builder = VirtualHubArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): VirtualHub {
val builtJavaResource = com.pulumi.azurenative.network.VirtualHub(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return VirtualHub(builtJavaResource)
}
}
/**
* VirtualHub Resource.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
* Other available API versions: 2018-07-01, 2020-04-01, 2020-06-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
* ## Example Usage
* ### VirtualHubPut
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var virtualHub = new AzureNative.Network.VirtualHub("virtualHub", new()
* {
* AddressPrefix = "10.168.0.0/24",
* Location = "West US",
* ResourceGroupName = "rg1",
* Sku = "Basic",
* Tags =
* {
* { "key1", "value1" },
* },
* VirtualHubName = "virtualHub2",
* VirtualWan = new AzureNative.Network.Inputs.SubResourceArgs
* {
* Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1",
* },
* });
* });
* ```
* ```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.NewVirtualHub(ctx, "virtualHub", &network.VirtualHubArgs{
* AddressPrefix: pulumi.String("10.168.0.0/24"),
* Location: pulumi.String("West US"),
* ResourceGroupName: pulumi.String("rg1"),
* Sku: pulumi.String("Basic"),
* Tags: pulumi.StringMap{
* "key1": pulumi.String("value1"),
* },
* VirtualHubName: pulumi.String("virtualHub2"),
* VirtualWan: &network.SubResourceArgs{
* Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1"),
* },
* })
* 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.VirtualHub;
* import com.pulumi.azurenative.network.VirtualHubArgs;
* import com.pulumi.azurenative.network.inputs.SubResourceArgs;
* 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 virtualHub = new VirtualHub("virtualHub", VirtualHubArgs.builder()
* .addressPrefix("10.168.0.0/24")
* .location("West US")
* .resourceGroupName("rg1")
* .sku("Basic")
* .tags(Map.of("key1", "value1"))
* .virtualHubName("virtualHub2")
* .virtualWan(SubResourceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1")
* .build())
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:network:VirtualHub virtualHub2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}
* ```
*/
public class VirtualHub internal constructor(
override val javaResource: com.pulumi.azurenative.network.VirtualHub,
) : KotlinCustomResource(javaResource, VirtualHubMapper) {
/**
* Address-prefix for this VirtualHub.
*/
public val addressPrefix: Output?
get() = javaResource.addressPrefix().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Flag to control transit for VirtualRouter hub.
*/
public val allowBranchToBranchTraffic: Output?
get() = javaResource.allowBranchToBranchTraffic().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The azureFirewall associated with this VirtualHub.
*/
public val azureFirewall: Output?
get() = javaResource.azureFirewall().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> subResourceResponseToKotlin(args0) })
}).orElse(null)
})
/**
* List of references to Bgp Connections.
*/
public val bgpConnections: Output>
get() = javaResource.bgpConnections().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> subResourceResponseToKotlin(args0) })
})
})
/**
* A unique read-only string that changes whenever the resource is updated.
*/
public val etag: Output
get() = javaResource.etag().applyValue({ args0 -> args0 })
/**
* The expressRouteGateway associated with this VirtualHub.
*/
public val expressRouteGateway: Output?
get() = javaResource.expressRouteGateway().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> subResourceResponseToKotlin(args0) })
}).orElse(null)
})
/**
* The hubRoutingPreference of this VirtualHub.
*/
public val hubRoutingPreference: Output?
get() = javaResource.hubRoutingPreference().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* List of references to IpConfigurations.
*/
public val ipConfigurations: Output>
get() = javaResource.ipConfigurations().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> subResourceResponseToKotlin(args0) })
})
})
/**
* Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server.
*/
public val kind: Output
get() = javaResource.kind().applyValue({ args0 -> args0 })
/**
* Resource location.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Resource name.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The P2SVpnGateway associated with this VirtualHub.
*/
public val p2SVpnGateway: Output?
get() = javaResource.p2SVpnGateway().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> subResourceResponseToKotlin(args0) })
}).orElse(null)
})
/**
* The preferred gateway to route on-prem traffic
*/
public val preferredRoutingGateway: Output?
get() = javaResource.preferredRoutingGateway().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The provisioning state of the virtual hub resource.
*/
public val provisioningState: Output
get() = javaResource.provisioningState().applyValue({ args0 -> args0 })
/**
* List of references to RouteMaps.
*/
public val routeMaps: Output>
get() = javaResource.routeMaps().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
subResourceResponseToKotlin(args0)
})
})
})
/**
* The routeTable associated with this virtual hub.
*/
public val routeTable: Output?
get() = javaResource.routeTable().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
virtualHubRouteTableResponseToKotlin(args0)
})
}).orElse(null)
})
/**
* The routing state.
*/
public val routingState: Output
get() = javaResource.routingState().applyValue({ args0 -> args0 })
/**
* The securityPartnerProvider associated with this VirtualHub.
*/
public val securityPartnerProvider: Output?
get() = javaResource.securityPartnerProvider().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> subResourceResponseToKotlin(args0) })
}).orElse(null)
})
/**
* The Security Provider name.
*/
public val securityProviderName: Output?
get() = javaResource.securityProviderName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The sku of this VirtualHub.
*/
public val sku: Output?
get() = javaResource.sku().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Resource tags.
*/
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy