DeviceSecurityGroup

class DeviceSecurityGroup : KotlinCustomResource

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}

Properties

Link copied to clipboard

The allow-list custom alert rules.

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

The deny-list custom alert rules.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Resource name

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The list of custom alert threshold rules.

Link copied to clipboard

The list of custom alert time-window rules.

Link copied to clipboard
val type: Output<String>

Resource type

Link copied to clipboard
val urn: Output<String>