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.azurenative.network.kotlin.AdminRuleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin
import com.pulumi.azurenative.network.AdminRuleArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.SecurityConfigurationRuleAccess
import com.pulumi.azurenative.network.kotlin.enums.SecurityConfigurationRuleDirection
import com.pulumi.azurenative.network.kotlin.enums.SecurityConfigurationRuleProtocol
import com.pulumi.azurenative.network.kotlin.inputs.AddressPrefixItemArgs
import com.pulumi.azurenative.network.kotlin.inputs.AddressPrefixItemArgsBuilder
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 com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Network admin rule.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2021-02-01-preview.
* Other available API versions: 2021-02-01-preview, 2021-05-01-preview, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-01-01-preview.
* ## Example Usage
* ### Create a default admin rule
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var adminRule = new AzureNative.Network.AdminRule("adminRule", new()
* {
* ConfigurationName = "myTestSecurityConfig",
* NetworkManagerName = "testNetworkManager",
* ResourceGroupName = "rg1",
* RuleCollectionName = "testRuleCollection",
* RuleName = "SampleDefaultAdminRule",
* });
* });
* ```
* ```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.NewAdminRule(ctx, "adminRule", &network.AdminRuleArgs{
* ConfigurationName: pulumi.String("myTestSecurityConfig"),
* NetworkManagerName: pulumi.String("testNetworkManager"),
* ResourceGroupName: pulumi.String("rg1"),
* RuleCollectionName: pulumi.String("testRuleCollection"),
* RuleName: pulumi.String("SampleDefaultAdminRule"),
* })
* 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.AdminRule;
* import com.pulumi.azurenative.network.AdminRuleArgs;
* 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 adminRule = new AdminRule("adminRule", AdminRuleArgs.builder()
* .configurationName("myTestSecurityConfig")
* .networkManagerName("testNetworkManager")
* .resourceGroupName("rg1")
* .ruleCollectionName("testRuleCollection")
* .ruleName("SampleDefaultAdminRule")
* .build());
* }
* }
* ```
* ### Create an admin rule
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var adminRule = new AzureNative.Network.AdminRule("adminRule", new()
* {
* Access = AzureNative.Network.SecurityConfigurationRuleAccess.Deny,
* ConfigurationName = "myTestSecurityConfig",
* Description = "This is Sample Admin Rule",
* DestinationPortRanges = new[]
* {
* "22",
* },
* Destinations = new[]
* {
* new AzureNative.Network.Inputs.AddressPrefixItemArgs
* {
* AddressPrefix = "*",
* AddressPrefixType = AzureNative.Network.AddressPrefixType.IPPrefix,
* },
* },
* Direction = AzureNative.Network.SecurityConfigurationRuleDirection.Inbound,
* Kind = "Custom",
* NetworkManagerName = "testNetworkManager",
* Priority = 1,
* Protocol = AzureNative.Network.SecurityConfigurationRuleProtocol.Tcp,
* ResourceGroupName = "rg1",
* RuleCollectionName = "testRuleCollection",
* RuleName = "SampleAdminRule",
* SourcePortRanges = new[]
* {
* "0-65535",
* },
* Sources = new[]
* {
* new AzureNative.Network.Inputs.AddressPrefixItemArgs
* {
* AddressPrefix = "Internet",
* AddressPrefixType = AzureNative.Network.AddressPrefixType.ServiceTag,
* },
* },
* });
* });
* ```
* ```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.NewAdminRule(ctx, "adminRule", &network.AdminRuleArgs{
* Access: pulumi.String(network.SecurityConfigurationRuleAccessDeny),
* ConfigurationName: pulumi.String("myTestSecurityConfig"),
* Description: pulumi.String("This is Sample Admin Rule"),
* DestinationPortRanges: pulumi.StringArray{
* pulumi.String("22"),
* },
* Destinations: network.AddressPrefixItemArray{
* &network.AddressPrefixItemArgs{
* AddressPrefix: pulumi.String("*"),
* AddressPrefixType: pulumi.String(network.AddressPrefixTypeIPPrefix),
* },
* },
* Direction: pulumi.String(network.SecurityConfigurationRuleDirectionInbound),
* Kind: pulumi.String("Custom"),
* NetworkManagerName: pulumi.String("testNetworkManager"),
* Priority: pulumi.Int(1),
* Protocol: pulumi.String(network.SecurityConfigurationRuleProtocolTcp),
* ResourceGroupName: pulumi.String("rg1"),
* RuleCollectionName: pulumi.String("testRuleCollection"),
* RuleName: pulumi.String("SampleAdminRule"),
* SourcePortRanges: pulumi.StringArray{
* pulumi.String("0-65535"),
* },
* Sources: network.AddressPrefixItemArray{
* &network.AddressPrefixItemArgs{
* AddressPrefix: pulumi.String("Internet"),
* AddressPrefixType: pulumi.String(network.AddressPrefixTypeServiceTag),
* },
* },
* })
* 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.AdminRule;
* import com.pulumi.azurenative.network.AdminRuleArgs;
* import com.pulumi.azurenative.network.inputs.AddressPrefixItemArgs;
* 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 adminRule = new AdminRule("adminRule", AdminRuleArgs.builder()
* .access("Deny")
* .configurationName("myTestSecurityConfig")
* .description("This is Sample Admin Rule")
* .destinationPortRanges("22")
* .destinations(AddressPrefixItemArgs.builder()
* .addressPrefix("*")
* .addressPrefixType("IPPrefix")
* .build())
* .direction("Inbound")
* .kind("Custom")
* .networkManagerName("testNetworkManager")
* .priority(1)
* .protocol("Tcp")
* .resourceGroupName("rg1")
* .ruleCollectionName("testRuleCollection")
* .ruleName("SampleAdminRule")
* .sourcePortRanges("0-65535")
* .sources(AddressPrefixItemArgs.builder()
* .addressPrefix("Internet")
* .addressPrefixType("ServiceTag")
* .build())
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:network:AdminRule SampleAdminRule /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}
* ```
* @property access Indicates the access allowed for this particular rule
* @property configurationName The name of the network manager Security Configuration.
* @property description A description for this rule. Restricted to 140 chars.
* @property destinationPortRanges The destination port ranges.
* @property destinations The destination address prefixes. CIDR or destination IP ranges.
* @property direction Indicates if the traffic matched against the rule in inbound or outbound.
* @property kind Whether the rule is custom or default.
* Expected value is 'Custom'.
* @property networkManagerName The name of the network manager.
* @property priority The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
* @property protocol Network protocol this rule applies to.
* @property resourceGroupName The name of the resource group.
* @property ruleCollectionName The name of the network manager security Configuration rule collection.
* @property ruleName The name of the rule.
* @property sourcePortRanges The source port ranges.
* @property sources The CIDR or source IP ranges.
*/
public data class AdminRuleArgs(
public val access: Output>? = null,
public val configurationName: Output? = null,
public val description: Output? = null,
public val destinationPortRanges: Output>? = null,
public val destinations: Output>? = null,
public val direction: Output>? = null,
public val kind: Output? = null,
public val networkManagerName: Output? = null,
public val priority: Output? = null,
public val protocol: Output>? = null,
public val resourceGroupName: Output? = null,
public val ruleCollectionName: Output? = null,
public val ruleName: Output? = null,
public val sourcePortRanges: Output>? = null,
public val sources: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.AdminRuleArgs =
com.pulumi.azurenative.network.AdminRuleArgs.builder()
.access(
access?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.configurationName(configurationName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.destinationPortRanges(destinationPortRanges?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.destinations(
destinations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.direction(
direction?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.kind(kind?.applyValue({ args0 -> args0 }))
.networkManagerName(networkManagerName?.applyValue({ args0 -> args0 }))
.priority(priority?.applyValue({ args0 -> args0 }))
.protocol(
protocol?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.ruleCollectionName(ruleCollectionName?.applyValue({ args0 -> args0 }))
.ruleName(ruleName?.applyValue({ args0 -> args0 }))
.sourcePortRanges(sourcePortRanges?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.sources(
sources?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [AdminRuleArgs].
*/
@PulumiTagMarker
public class AdminRuleArgsBuilder internal constructor() {
private var access: Output>? = null
private var configurationName: Output? = null
private var description: Output? = null
private var destinationPortRanges: Output>? = null
private var destinations: Output>? = null
private var direction: Output>? = null
private var kind: Output? = null
private var networkManagerName: Output? = null
private var priority: Output? = null
private var protocol: Output>? = null
private var resourceGroupName: Output? = null
private var ruleCollectionName: Output? = null
private var ruleName: Output? = null
private var sourcePortRanges: Output>? = null
private var sources: Output>? = null
/**
* @param value Indicates the access allowed for this particular rule
*/
@JvmName("amwtpoancevvndvb")
public suspend fun access(`value`: Output>) {
this.access = value
}
/**
* @param value The name of the network manager Security Configuration.
*/
@JvmName("ebyyiofhbqtjlxde")
public suspend fun configurationName(`value`: Output) {
this.configurationName = value
}
/**
* @param value A description for this rule. Restricted to 140 chars.
*/
@JvmName("qrutdoymophdsqty")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The destination port ranges.
*/
@JvmName("rownphlrthmsdmno")
public suspend fun destinationPortRanges(`value`: Output>) {
this.destinationPortRanges = value
}
@JvmName("asaueerkwgtfpdis")
public suspend fun destinationPortRanges(vararg values: Output) {
this.destinationPortRanges = Output.all(values.asList())
}
/**
* @param values The destination port ranges.
*/
@JvmName("lpivbwytwrclqdhg")
public suspend fun destinationPortRanges(values: List>) {
this.destinationPortRanges = Output.all(values)
}
/**
* @param value The destination address prefixes. CIDR or destination IP ranges.
*/
@JvmName("bcpqayekjbhxrtby")
public suspend fun destinations(`value`: Output>) {
this.destinations = value
}
@JvmName("dvauvbtcmdhcgocs")
public suspend fun destinations(vararg values: Output) {
this.destinations = Output.all(values.asList())
}
/**
* @param values The destination address prefixes. CIDR or destination IP ranges.
*/
@JvmName("feiuuuomykxtkfgl")
public suspend fun destinations(values: List>) {
this.destinations = Output.all(values)
}
/**
* @param value Indicates if the traffic matched against the rule in inbound or outbound.
*/
@JvmName("shwojbfcsaukcdvs")
public suspend fun direction(`value`: Output>) {
this.direction = value
}
/**
* @param value Whether the rule is custom or default.
* Expected value is 'Custom'.
*/
@JvmName("wmgakogvxfxtxosj")
public suspend fun kind(`value`: Output) {
this.kind = value
}
/**
* @param value The name of the network manager.
*/
@JvmName("xbtmqkjarhcwwlqc")
public suspend fun networkManagerName(`value`: Output) {
this.networkManagerName = value
}
/**
* @param value The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
*/
@JvmName("sxopgqrgupexrdsy")
public suspend fun priority(`value`: Output) {
this.priority = value
}
/**
* @param value Network protocol this rule applies to.
*/
@JvmName("xojvjeuhrhlndgcq")
public suspend fun protocol(`value`: Output>) {
this.protocol = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("guegfwxmbisjdvet")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the network manager security Configuration rule collection.
*/
@JvmName("kcloediptqdxgvfo")
public suspend fun ruleCollectionName(`value`: Output) {
this.ruleCollectionName = value
}
/**
* @param value The name of the rule.
*/
@JvmName("vahlxlsjsgekwxti")
public suspend fun ruleName(`value`: Output) {
this.ruleName = value
}
/**
* @param value The source port ranges.
*/
@JvmName("smkrxxrngoelxnba")
public suspend fun sourcePortRanges(`value`: Output>) {
this.sourcePortRanges = value
}
@JvmName("bwexfqusynyuhoue")
public suspend fun sourcePortRanges(vararg values: Output) {
this.sourcePortRanges = Output.all(values.asList())
}
/**
* @param values The source port ranges.
*/
@JvmName("xmdkghvogmtogmwe")
public suspend fun sourcePortRanges(values: List>) {
this.sourcePortRanges = Output.all(values)
}
/**
* @param value The CIDR or source IP ranges.
*/
@JvmName("lcoootfanhyginyn")
public suspend fun sources(`value`: Output>) {
this.sources = value
}
@JvmName("kporwmpwbupmwmae")
public suspend fun sources(vararg values: Output) {
this.sources = Output.all(values.asList())
}
/**
* @param values The CIDR or source IP ranges.
*/
@JvmName("wthmaibmxcwdgrim")
public suspend fun sources(values: List>) {
this.sources = Output.all(values)
}
/**
* @param value Indicates the access allowed for this particular rule
*/
@JvmName("qxcfikctmtjrvygo")
public suspend fun access(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.access = mapped
}
/**
* @param value Indicates the access allowed for this particular rule
*/
@JvmName("utyyqrusqwaklefx")
public fun access(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.access = mapped
}
/**
* @param value Indicates the access allowed for this particular rule
*/
@JvmName("mgemlgmebbmeobgs")
public fun access(`value`: SecurityConfigurationRuleAccess) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.access = mapped
}
/**
* @param value The name of the network manager Security Configuration.
*/
@JvmName("spuraukcrwqewceq")
public suspend fun configurationName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.configurationName = mapped
}
/**
* @param value A description for this rule. Restricted to 140 chars.
*/
@JvmName("eyybwmhcxifngbeo")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The destination port ranges.
*/
@JvmName("jahxjxsknufogabw")
public suspend fun destinationPortRanges(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.destinationPortRanges = mapped
}
/**
* @param values The destination port ranges.
*/
@JvmName("vbstkvnijrqjxoyl")
public suspend fun destinationPortRanges(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.destinationPortRanges = mapped
}
/**
* @param value The destination address prefixes. CIDR or destination IP ranges.
*/
@JvmName("qqhmisdtjwrogfwb")
public suspend fun destinations(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.destinations = mapped
}
/**
* @param argument The destination address prefixes. CIDR or destination IP ranges.
*/
@JvmName("obajsgdklsnstxws")
public suspend fun destinations(argument: List Unit>) {
val toBeMapped = argument.toList().map {
AddressPrefixItemArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.destinations = mapped
}
/**
* @param argument The destination address prefixes. CIDR or destination IP ranges.
*/
@JvmName("yjrrufwhysbobfwv")
public suspend fun destinations(vararg argument: suspend AddressPrefixItemArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
AddressPrefixItemArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.destinations = mapped
}
/**
* @param argument The destination address prefixes. CIDR or destination IP ranges.
*/
@JvmName("mkjwvgsvwbfdceak")
public suspend fun destinations(argument: suspend AddressPrefixItemArgsBuilder.() -> Unit) {
val toBeMapped = listOf(AddressPrefixItemArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.destinations = mapped
}
/**
* @param values The destination address prefixes. CIDR or destination IP ranges.
*/
@JvmName("vdlxbktxmjfrwgyb")
public suspend fun destinations(vararg values: AddressPrefixItemArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.destinations = mapped
}
/**
* @param value Indicates if the traffic matched against the rule in inbound or outbound.
*/
@JvmName("xfmigomuhyabdqhn")
public suspend fun direction(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.direction = mapped
}
/**
* @param value Indicates if the traffic matched against the rule in inbound or outbound.
*/
@JvmName("jajgvhycigfyxbsr")
public fun direction(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.direction = mapped
}
/**
* @param value Indicates if the traffic matched against the rule in inbound or outbound.
*/
@JvmName("gymoqaygabmldnkx")
public fun direction(`value`: SecurityConfigurationRuleDirection) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.direction = mapped
}
/**
* @param value Whether the rule is custom or default.
* Expected value is 'Custom'.
*/
@JvmName("bbcqsglqwtjepftw")
public suspend fun kind(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value The name of the network manager.
*/
@JvmName("slpmqkhahpnliihr")
public suspend fun networkManagerName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkManagerName = mapped
}
/**
* @param value The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
*/
@JvmName("basqdruhaytqeaiw")
public suspend fun priority(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.priority = mapped
}
/**
* @param value Network protocol this rule applies to.
*/
@JvmName("vlgdntpvpauisjfe")
public suspend fun protocol(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.protocol = mapped
}
/**
* @param value Network protocol this rule applies to.
*/
@JvmName("eeinguelomgftwgh")
public fun protocol(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.protocol = mapped
}
/**
* @param value Network protocol this rule applies to.
*/
@JvmName("pfpqlxanvkcejauj")
public fun protocol(`value`: SecurityConfigurationRuleProtocol) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.protocol = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("subqxdxdxhbkqaxj")
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 network manager security Configuration rule collection.
*/
@JvmName("qxtlccywdpyusgbs")
public suspend fun ruleCollectionName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ruleCollectionName = mapped
}
/**
* @param value The name of the rule.
*/
@JvmName("vjcteqsvklqkpitx")
public suspend fun ruleName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ruleName = mapped
}
/**
* @param value The source port ranges.
*/
@JvmName("imjaqujwwrptcfyh")
public suspend fun sourcePortRanges(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sourcePortRanges = mapped
}
/**
* @param values The source port ranges.
*/
@JvmName("lxloawfpouwkvosj")
public suspend fun sourcePortRanges(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.sourcePortRanges = mapped
}
/**
* @param value The CIDR or source IP ranges.
*/
@JvmName("cjcgwrxxhtrhctgx")
public suspend fun sources(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sources = mapped
}
/**
* @param argument The CIDR or source IP ranges.
*/
@JvmName("aslysjiuhrrxydti")
public suspend fun sources(argument: List Unit>) {
val toBeMapped = argument.toList().map {
AddressPrefixItemArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.sources = mapped
}
/**
* @param argument The CIDR or source IP ranges.
*/
@JvmName("pfponwfwrpdrdfpi")
public suspend fun sources(vararg argument: suspend AddressPrefixItemArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
AddressPrefixItemArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.sources = mapped
}
/**
* @param argument The CIDR or source IP ranges.
*/
@JvmName("jompokehshessped")
public suspend fun sources(argument: suspend AddressPrefixItemArgsBuilder.() -> Unit) {
val toBeMapped = listOf(AddressPrefixItemArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.sources = mapped
}
/**
* @param values The CIDR or source IP ranges.
*/
@JvmName("sruutehlainsqmfy")
public suspend fun sources(vararg values: AddressPrefixItemArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.sources = mapped
}
internal fun build(): AdminRuleArgs = AdminRuleArgs(
access = access,
configurationName = configurationName,
description = description,
destinationPortRanges = destinationPortRanges,
destinations = destinations,
direction = direction,
kind = kind,
networkManagerName = networkManagerName,
priority = priority,
protocol = protocol,
resourceGroupName = resourceGroupName,
ruleCollectionName = ruleCollectionName,
ruleName = ruleName,
sourcePortRanges = sourcePortRanges,
sources = sources,
)
}