Admin Rule Collection Args
Defines the admin rule collection. Uses Azure REST API version 2024-05-01. In version 2.x of the Azure Native provider, it used API version 2023-02-01. Other available API versions: 2021-02-01-preview, 2022-01-01, 2022-02-01-preview, 2022-04-01-preview, 2022-05-01, 2022-07-01, 2022-09-01, 2022-11-01, 2023-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-01-01-preview, 2024-03-01, 2024-07-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native network [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Create or Update an admin rule collection
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var adminRuleCollection = new AzureNative.Network.AdminRuleCollection("adminRuleCollection", new()
{
AppliesToGroups = new[]
{
new AzureNative.Network.Inputs.NetworkManagerSecurityGroupItemArgs
{
NetworkGroupId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup",
},
},
ConfigurationName = "myTestSecurityConfig",
Description = "A sample policy",
NetworkManagerName = "testNetworkManager",
ResourceGroupName = "rg1",
RuleCollectionName = "testRuleCollection",
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewAdminRuleCollection(ctx, "adminRuleCollection", &network.AdminRuleCollectionArgs{
AppliesToGroups: network.NetworkManagerSecurityGroupItemArray{
&network.NetworkManagerSecurityGroupItemArgs{
NetworkGroupId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.AdminRuleCollection;
import com.pulumi.azurenative.network.AdminRuleCollectionArgs;
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 adminRuleCollection = new AdminRuleCollection("adminRuleCollection", AdminRuleCollectionArgs.builder()
.appliesToGroups(NetworkManagerSecurityGroupItemArgs.builder()
.networkGroupId("/subscriptions/00000000-0000-0000-0000-000000000000/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.
$ pulumi import azure-native:network:AdminRuleCollection myTestSecurityConfig /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}
Properties
Groups for configuration
The name of the network manager Security Configuration.
A description of the admin rule collection.
The name of the network manager.
The name of the resource group.
The name of the network manager security Configuration rule collection.