![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.network.kotlin.UserRuleCollectionArgs.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.UserRuleCollectionArgs.builder
import com.pulumi.azurenative.network.kotlin.inputs.NetworkManagerSecurityGroupItemArgs
import com.pulumi.azurenative.network.kotlin.inputs.NetworkManagerSecurityGroupItemArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Defines the user rule collection.
* Azure REST API version: 2022-04-01-preview. Prior API version in Azure Native 1.x: 2021-02-01-preview.
* Other available API versions: 2021-02-01-preview, 2021-05-01-preview.
* ## Example Usage
* ### Create or Update a User Rule Collection
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var userRuleCollection = new AzureNative.Network.UserRuleCollection("userRuleCollection", new()
* {
* AppliesToGroups = new[]
* {
* new AzureNative.Network.Inputs.NetworkManagerSecurityGroupItemArgs
* {
* NetworkGroupId = "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup",
* },
* },
* ConfigurationName = "myTestSecurityConfig",
* Description = "A sample policy",
* NetworkManagerName = "testNetworkManager",
* ResourceGroupName = "rg1",
* RuleCollectionName = "testRuleCollection",
* });
* });
* ```
* ```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.NewUserRuleCollection(ctx, "userRuleCollection", &network.UserRuleCollectionArgs{
* AppliesToGroups: network.NetworkManagerSecurityGroupItemArray{
* &network.NetworkManagerSecurityGroupItemArgs{
* NetworkGroupId: pulumi.String("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup"),
* },
* },
* ConfigurationName: pulumi.String("myTestSecurityConfig"),
* Description: pulumi.String("A sample policy"),
* NetworkManagerName: pulumi.String("testNetworkManager"),
* ResourceGroupName: pulumi.String("rg1"),
* RuleCollectionName: pulumi.String("testRuleCollection"),
* })
* 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.UserRuleCollection;
* import com.pulumi.azurenative.network.UserRuleCollectionArgs;
* import com.pulumi.azurenative.network.inputs.NetworkManagerSecurityGroupItemArgs;
* 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 userRuleCollection = new UserRuleCollection("userRuleCollection", UserRuleCollectionArgs.builder()
* .appliesToGroups(NetworkManagerSecurityGroupItemArgs.builder()
* .networkGroupId("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup")
* .build())
* .configurationName("myTestSecurityConfig")
* .description("A sample policy")
* .networkManagerName("testNetworkManager")
* .resourceGroupName("rg1")
* .ruleCollectionName("testRuleCollection")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:network:UserRuleCollection myTestSecurityConfig /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}
* ```
* @property appliesToGroups Groups for configuration
* @property configurationName The name of the network manager Security Configuration.
* @property description A description of the user rule collection.
* @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.
*/
public data class UserRuleCollectionArgs(
public val appliesToGroups: Output>? = null,
public val configurationName: Output? = null,
public val description: Output? = null,
public val networkManagerName: Output? = null,
public val resourceGroupName: Output? = null,
public val ruleCollectionName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.UserRuleCollectionArgs =
com.pulumi.azurenative.network.UserRuleCollectionArgs.builder()
.appliesToGroups(
appliesToGroups?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.configurationName(configurationName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.networkManagerName(networkManagerName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.ruleCollectionName(ruleCollectionName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [UserRuleCollectionArgs].
*/
@PulumiTagMarker
public class UserRuleCollectionArgsBuilder internal constructor() {
private var appliesToGroups: Output>? = null
private var configurationName: Output? = null
private var description: Output? = null
private var networkManagerName: Output? = null
private var resourceGroupName: Output? = null
private var ruleCollectionName: Output? = null
/**
* @param value Groups for configuration
*/
@JvmName("mlsgayijvwxjphyg")
public suspend fun appliesToGroups(`value`: Output>) {
this.appliesToGroups = value
}
@JvmName("libyayumauddkhpo")
public suspend fun appliesToGroups(vararg values: Output) {
this.appliesToGroups = Output.all(values.asList())
}
/**
* @param values Groups for configuration
*/
@JvmName("xjgqvtoqcudnlpau")
public suspend fun appliesToGroups(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy