![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.avs.kotlin.WorkloadNetworkSegmentArgs.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.avs.kotlin
import com.pulumi.azurenative.avs.WorkloadNetworkSegmentArgs.builder
import com.pulumi.azurenative.avs.kotlin.inputs.WorkloadNetworkSegmentSubnetArgs
import com.pulumi.azurenative.avs.kotlin.inputs.WorkloadNetworkSegmentSubnetArgsBuilder
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.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* NSX Segment
* Azure REST API version: 2022-05-01. Prior API version in Azure Native 1.x: 2020-07-17-preview.
* Other available API versions: 2023-03-01, 2023-09-01.
* ## Example Usage
* ### WorkloadNetworks_CreateSegments
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var workloadNetworkSegment = new AzureNative.AVS.WorkloadNetworkSegment("workloadNetworkSegment", new()
* {
* ConnectedGateway = "/infra/tier-1s/gateway",
* DisplayName = "segment1",
* PrivateCloudName = "cloud1",
* ResourceGroupName = "group1",
* Revision = 1,
* SegmentId = "segment1",
* Subnet = new AzureNative.AVS.Inputs.WorkloadNetworkSegmentSubnetArgs
* {
* DhcpRanges = new[]
* {
* "40.20.0.0-40.20.0.1",
* },
* GatewayAddress = "40.20.20.20/16",
* },
* });
* });
* ```
* ```go
* package main
* import (
* avs "github.com/pulumi/pulumi-azure-native-sdk/avs/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := avs.NewWorkloadNetworkSegment(ctx, "workloadNetworkSegment", &avs.WorkloadNetworkSegmentArgs{
* ConnectedGateway: pulumi.String("/infra/tier-1s/gateway"),
* DisplayName: pulumi.String("segment1"),
* PrivateCloudName: pulumi.String("cloud1"),
* ResourceGroupName: pulumi.String("group1"),
* Revision: pulumi.Float64(1),
* SegmentId: pulumi.String("segment1"),
* Subnet: &avs.WorkloadNetworkSegmentSubnetArgs{
* DhcpRanges: pulumi.StringArray{
* pulumi.String("40.20.0.0-40.20.0.1"),
* },
* GatewayAddress: pulumi.String("40.20.20.20/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.azurenative.avs.WorkloadNetworkSegment;
* import com.pulumi.azurenative.avs.WorkloadNetworkSegmentArgs;
* import com.pulumi.azurenative.avs.inputs.WorkloadNetworkSegmentSubnetArgs;
* 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 workloadNetworkSegment = new WorkloadNetworkSegment("workloadNetworkSegment", WorkloadNetworkSegmentArgs.builder()
* .connectedGateway("/infra/tier-1s/gateway")
* .displayName("segment1")
* .privateCloudName("cloud1")
* .resourceGroupName("group1")
* .revision(1)
* .segmentId("segment1")
* .subnet(WorkloadNetworkSegmentSubnetArgs.builder()
* .dhcpRanges("40.20.0.0-40.20.0.1")
* .gatewayAddress("40.20.20.20/16")
* .build())
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:avs:WorkloadNetworkSegment segment1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}
* ```
* @property connectedGateway Gateway which to connect segment to.
* @property displayName Display name of the segment.
* @property privateCloudName Name of the private cloud
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property revision NSX revision number.
* @property segmentId NSX Segment identifier. Generally the same as the Segment's display name
* @property subnet Subnet which to connect segment to.
*/
public data class WorkloadNetworkSegmentArgs(
public val connectedGateway: Output? = null,
public val displayName: Output? = null,
public val privateCloudName: Output? = null,
public val resourceGroupName: Output? = null,
public val revision: Output? = null,
public val segmentId: Output? = null,
public val subnet: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.avs.WorkloadNetworkSegmentArgs =
com.pulumi.azurenative.avs.WorkloadNetworkSegmentArgs.builder()
.connectedGateway(connectedGateway?.applyValue({ args0 -> args0 }))
.displayName(displayName?.applyValue({ args0 -> args0 }))
.privateCloudName(privateCloudName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.revision(revision?.applyValue({ args0 -> args0 }))
.segmentId(segmentId?.applyValue({ args0 -> args0 }))
.subnet(subnet?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [WorkloadNetworkSegmentArgs].
*/
@PulumiTagMarker
public class WorkloadNetworkSegmentArgsBuilder internal constructor() {
private var connectedGateway: Output? = null
private var displayName: Output? = null
private var privateCloudName: Output? = null
private var resourceGroupName: Output? = null
private var revision: Output? = null
private var segmentId: Output? = null
private var subnet: Output? = null
/**
* @param value Gateway which to connect segment to.
*/
@JvmName("cahdqhqkftiurjwl")
public suspend fun connectedGateway(`value`: Output) {
this.connectedGateway = value
}
/**
* @param value Display name of the segment.
*/
@JvmName("pclgbftxttcivvpr")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value Name of the private cloud
*/
@JvmName("muanxblrkrkjjkqp")
public suspend fun privateCloudName(`value`: Output) {
this.privateCloudName = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("jlxhpxidlmqjjbcj")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value NSX revision number.
*/
@JvmName("euqnqmfggtctvxdl")
public suspend fun revision(`value`: Output) {
this.revision = value
}
/**
* @param value NSX Segment identifier. Generally the same as the Segment's display name
*/
@JvmName("xxaettqwpyaapfok")
public suspend fun segmentId(`value`: Output) {
this.segmentId = value
}
/**
* @param value Subnet which to connect segment to.
*/
@JvmName("axktwdcpjaplhwha")
public suspend fun subnet(`value`: Output) {
this.subnet = value
}
/**
* @param value Gateway which to connect segment to.
*/
@JvmName("qkqayiwapdpsrumu")
public suspend fun connectedGateway(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.connectedGateway = mapped
}
/**
* @param value Display name of the segment.
*/
@JvmName("obduivlqdsyltpkl")
public suspend fun displayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.displayName = mapped
}
/**
* @param value Name of the private cloud
*/
@JvmName("nqtxjcjtmejhjdxt")
public suspend fun privateCloudName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.privateCloudName = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("uxkddsvrbgndxbvw")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value NSX revision number.
*/
@JvmName("epkmypyhrtqkpppy")
public suspend fun revision(`value`: Double?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.revision = mapped
}
/**
* @param value NSX Segment identifier. Generally the same as the Segment's display name
*/
@JvmName("npltepqwrrimgcec")
public suspend fun segmentId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.segmentId = mapped
}
/**
* @param value Subnet which to connect segment to.
*/
@JvmName("rrfiyaykvhkvjrok")
public suspend fun subnet(`value`: WorkloadNetworkSegmentSubnetArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subnet = mapped
}
/**
* @param argument Subnet which to connect segment to.
*/
@JvmName("oetkaguybacodrhh")
public suspend fun subnet(argument: suspend WorkloadNetworkSegmentSubnetArgsBuilder.() -> Unit) {
val toBeMapped = WorkloadNetworkSegmentSubnetArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.subnet = mapped
}
internal fun build(): WorkloadNetworkSegmentArgs = WorkloadNetworkSegmentArgs(
connectedGateway = connectedGateway,
displayName = displayName,
privateCloudName = privateCloudName,
resourceGroupName = resourceGroupName,
revision = revision,
segmentId = segmentId,
subnet = subnet,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy