Device Security Group Args
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 API Version: 2019-08-01.
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,
},
});
});
Content copied to clipboard
package main
import (
security "github.com/pulumi/pulumi-azure-native-sdk/security"
"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.TimeWindowCustomAlertRuleArgs{
nil,
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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 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());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:security:DeviceSecurityGroup samplesecuritygroup /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Devices/iotHubs/sampleiothub/providers/Microsoft.Security/deviceSecurityGroups/samplesecuritygroup
Content copied to clipboard
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
The name of the device security group. Note that the name of the device security group is case insensitive.
Link copied to clipboard
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.