DeviceSecurityGroupArgs

data class DeviceSecurityGroupArgs(val allowlistRules: Output<List<AllowlistCustomAlertRuleArgs>>? = null, val denylistRules: Output<List<DenylistCustomAlertRuleArgs>>? = null, val deviceSecurityGroupName: Output<String>? = null, val resourceId: Output<String>? = null, val thresholdRules: Output<List<ThresholdCustomAlertRuleArgs>>? = null, val timeWindowRules: Output<List<TimeWindowCustomAlertRuleArgs>>? = null) : ConvertibleToJava<DeviceSecurityGroupArgs>

The device security group resource Uses Azure REST API version 2019-08-01. In version 2.x of the Azure Native provider, it used API version 2019-08-01. Other available API versions: 2017-08-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native security [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create or update a device security group for the specified IoT hub resource

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var deviceSecurityGroup = new AzureNative.Security.DeviceSecurityGroup("deviceSecurityGroup", new()
{
DeviceSecurityGroupName = "samplesecuritygroup",
ResourceId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub",
TimeWindowRules = new[]
{
null,
},
});
});
package main
import (
security "github.com/pulumi/pulumi-azure-native-sdk/security/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := security.NewDeviceSecurityGroup(ctx, "deviceSecurityGroup", &security.DeviceSecurityGroupArgs{
DeviceSecurityGroupName: pulumi.String("samplesecuritygroup"),
ResourceId: pulumi.String("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub"),
TimeWindowRules: security.TimeWindowCustomAlertRuleArray{
&security.TimeWindowCustomAlertRuleArgs{},
},
})
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.security.DeviceSecurityGroup;
import com.pulumi.azurenative.security.DeviceSecurityGroupArgs;
import com.pulumi.azurenative.security.inputs.TimeWindowCustomAlertRuleArgs;
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 deviceSecurityGroup = new DeviceSecurityGroup("deviceSecurityGroup", DeviceSecurityGroupArgs.builder()
.deviceSecurityGroupName("samplesecuritygroup")
.resourceId("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub")
.timeWindowRules()
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:security:DeviceSecurityGroup samplesecuritygroup /{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}

Constructors

Link copied to clipboard
constructor(allowlistRules: Output<List<AllowlistCustomAlertRuleArgs>>? = null, denylistRules: Output<List<DenylistCustomAlertRuleArgs>>? = null, deviceSecurityGroupName: Output<String>? = null, resourceId: Output<String>? = null, thresholdRules: Output<List<ThresholdCustomAlertRuleArgs>>? = null, timeWindowRules: Output<List<TimeWindowCustomAlertRuleArgs>>? = null)

Properties

Link copied to clipboard

The allow-list custom alert rules.

Link copied to clipboard

The deny-list custom alert rules.

Link copied to clipboard
val deviceSecurityGroupName: Output<String>? = null

The name of the device security group. Note that the name of the device security group is case insensitive.

Link copied to clipboard
val resourceId: Output<String>? = null

The identifier of the resource.

Link copied to clipboard

The list of custom alert threshold rules.

Link copied to clipboard

The list of custom alert time-window rules.

Functions

Link copied to clipboard
open override fun toJava(): DeviceSecurityGroupArgs