
com.pulumi.azurenative.network.kotlin.DefaultUserRuleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin
import com.pulumi.azurenative.network.DefaultUserRuleArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Network security default user rule.
* Azure REST API version: 2022-04-01-preview. Prior API version in Azure Native 1.x: 2021-02-01-preview.
* ## Example Usage
* ### Create a default user rule
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var defaultUserRule = new AzureNative.Network.DefaultUserRule("defaultUserRule", new()
* {
* ConfigurationName = "myTestSecurityConfig",
* Flag = "AllowVnetInbound",
* Kind = "Default",
* NetworkManagerName = "testNetworkManager",
* ResourceGroupName = "rg1",
* RuleCollectionName = "testRuleCollection",
* RuleName = "SampleDefaultUserRule",
* });
* });
* ```
* ```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.NewDefaultUserRule(ctx, "defaultUserRule", &network.DefaultUserRuleArgs{
* ConfigurationName: pulumi.String("myTestSecurityConfig"),
* Flag: pulumi.String("AllowVnetInbound"),
* Kind: pulumi.String("Default"),
* NetworkManagerName: pulumi.String("testNetworkManager"),
* ResourceGroupName: pulumi.String("rg1"),
* RuleCollectionName: pulumi.String("testRuleCollection"),
* RuleName: pulumi.String("SampleDefaultUserRule"),
* })
* 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.DefaultUserRule;
* import com.pulumi.azurenative.network.DefaultUserRuleArgs;
* 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 defaultUserRule = new DefaultUserRule("defaultUserRule", DefaultUserRuleArgs.builder()
* .configurationName("myTestSecurityConfig")
* .flag("AllowVnetInbound")
* .kind("Default")
* .networkManagerName("testNetworkManager")
* .resourceGroupName("rg1")
* .ruleCollectionName("testRuleCollection")
* .ruleName("SampleDefaultUserRule")
* .build());
* }
* }
* ```
* ### Create a user rule
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var defaultUserRule = new AzureNative.Network.DefaultUserRule("defaultUserRule", new()
* {
* ConfigurationName = "myTestSecurityConfig",
* NetworkManagerName = "testNetworkManager",
* ResourceGroupName = "rg1",
* RuleCollectionName = "testRuleCollection",
* RuleName = "SampleUserRule",
* });
* });
* ```
* ```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.NewDefaultUserRule(ctx, "defaultUserRule", &network.DefaultUserRuleArgs{
* ConfigurationName: pulumi.String("myTestSecurityConfig"),
* NetworkManagerName: pulumi.String("testNetworkManager"),
* ResourceGroupName: pulumi.String("rg1"),
* RuleCollectionName: pulumi.String("testRuleCollection"),
* RuleName: pulumi.String("SampleUserRule"),
* })
* 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.DefaultUserRule;
* import com.pulumi.azurenative.network.DefaultUserRuleArgs;
* 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 defaultUserRule = new DefaultUserRule("defaultUserRule", DefaultUserRuleArgs.builder()
* .configurationName("myTestSecurityConfig")
* .networkManagerName("testNetworkManager")
* .resourceGroupName("rg1")
* .ruleCollectionName("testRuleCollection")
* .ruleName("SampleUserRule")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:network:DefaultUserRule SampleUserRule /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}
* ```
* @property configurationName The name of the network manager Security Configuration.
* @property flag Default rule flag.
* @property kind Whether the rule is custom or default.
* Expected value is 'Default'.
* @property networkManagerName The name of the network manager.
* @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.
*/
public data class DefaultUserRuleArgs(
public val configurationName: Output? = null,
public val flag: Output? = null,
public val kind: Output? = null,
public val networkManagerName: Output? = null,
public val resourceGroupName: Output? = null,
public val ruleCollectionName: Output? = null,
public val ruleName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.DefaultUserRuleArgs =
com.pulumi.azurenative.network.DefaultUserRuleArgs.builder()
.configurationName(configurationName?.applyValue({ args0 -> args0 }))
.flag(flag?.applyValue({ args0 -> args0 }))
.kind(kind?.applyValue({ args0 -> args0 }))
.networkManagerName(networkManagerName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.ruleCollectionName(ruleCollectionName?.applyValue({ args0 -> args0 }))
.ruleName(ruleName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DefaultUserRuleArgs].
*/
@PulumiTagMarker
public class DefaultUserRuleArgsBuilder internal constructor() {
private var configurationName: Output? = null
private var flag: Output? = null
private var kind: Output? = null
private var networkManagerName: Output? = null
private var resourceGroupName: Output? = null
private var ruleCollectionName: Output? = null
private var ruleName: Output? = null
/**
* @param value The name of the network manager Security Configuration.
*/
@JvmName("kcvbfmbyxxdgekmj")
public suspend fun configurationName(`value`: Output) {
this.configurationName = value
}
/**
* @param value Default rule flag.
*/
@JvmName("uvueeqsikuvpexgv")
public suspend fun flag(`value`: Output) {
this.flag = value
}
/**
* @param value Whether the rule is custom or default.
* Expected value is 'Default'.
*/
@JvmName("xxfbfrdahbrcdiil")
public suspend fun kind(`value`: Output) {
this.kind = value
}
/**
* @param value The name of the network manager.
*/
@JvmName("hvyhoodnuungtseg")
public suspend fun networkManagerName(`value`: Output) {
this.networkManagerName = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("obiqsuelmlftlcrf")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the network manager security Configuration rule collection.
*/
@JvmName("xshyabsqobrlvdcy")
public suspend fun ruleCollectionName(`value`: Output) {
this.ruleCollectionName = value
}
/**
* @param value The name of the rule.
*/
@JvmName("gpuyeoukstbskxia")
public suspend fun ruleName(`value`: Output) {
this.ruleName = value
}
/**
* @param value The name of the network manager Security Configuration.
*/
@JvmName("wocqnxxdjifserwj")
public suspend fun configurationName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.configurationName = mapped
}
/**
* @param value Default rule flag.
*/
@JvmName("jhhdxlaxabjtqibd")
public suspend fun flag(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.flag = mapped
}
/**
* @param value Whether the rule is custom or default.
* Expected value is 'Default'.
*/
@JvmName("sdydpppqtytqvxmx")
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("mnxuvnhhayrvbkrg")
public suspend fun networkManagerName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkManagerName = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("ofsaphphyulmtqhv")
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("qpkpssdcoubuxowt")
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("dyflchsvonffhkgy")
public suspend fun ruleName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ruleName = mapped
}
internal fun build(): DefaultUserRuleArgs = DefaultUserRuleArgs(
configurationName = configurationName,
flag = flag,
kind = kind,
networkManagerName = networkManagerName,
resourceGroupName = resourceGroupName,
ruleCollectionName = ruleCollectionName,
ruleName = ruleName,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy