DefenderForStorage

class DefenderForStorage : KotlinCustomResource

The Defender for Storage resource. Azure REST API version: 2022-12-01-preview.

Example Usage

Creates or updates the Defender for Storage settings on a specified resource.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var defenderForStorage = new AzureNative.Security.DefenderForStorage("defenderForStorage", new()
{
IsEnabled = true,
MalwareScanning = new AzureNative.Security.Inputs.MalwareScanningPropertiesArgs
{
CapGBPerMonth = -1,
IsEnabled = true,
ScanResultsEventGridTopicResourceId = "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic",
},
OverrideSubscriptionLevelSettings = true,
ResourceId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount",
SensitiveDataDiscovery = new AzureNative.Security.Inputs.SensitiveDataDiscoveryPropertiesArgs
{
IsEnabled = true,
},
SettingName = "current",
});
});
package main
import (
"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.NewDefenderForStorage(ctx, "defenderForStorage", &security.DefenderForStorageArgs{
IsEnabled: pulumi.Bool(true),
MalwareScanning: &security.MalwareScanningPropertiesArgs{
CapGBPerMonth: -1,
IsEnabled: pulumi.Bool(true),
ScanResultsEventGridTopicResourceId: pulumi.String("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic"),
},
OverrideSubscriptionLevelSettings: pulumi.Bool(true),
ResourceId: pulumi.String("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount"),
SensitiveDataDiscovery: &security.SensitiveDataDiscoveryPropertiesArgs{
IsEnabled: pulumi.Bool(true),
},
SettingName: pulumi.String("current"),
})
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.DefenderForStorage;
import com.pulumi.azurenative.security.DefenderForStorageArgs;
import com.pulumi.azurenative.security.inputs.MalwareScanningPropertiesArgs;
import com.pulumi.azurenative.security.inputs.SensitiveDataDiscoveryPropertiesArgs;
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 defenderForStorage = new DefenderForStorage("defenderForStorage", DefenderForStorageArgs.builder()
.isEnabled(true)
.malwareScanning(MalwareScanningPropertiesArgs.builder()
.capGBPerMonth("TODO: GenUnaryOpExpression")
.isEnabled(true)
.scanResultsEventGridTopicResourceId("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic")
.build())
.overrideSubscriptionLevelSettings(true)
.resourceId("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount")
.sensitiveDataDiscovery(SensitiveDataDiscoveryPropertiesArgs.builder()
.isEnabled(true)
.build())
.settingName("current")
.build());
}
}

Import

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

$ pulumi import azure-native:security:DefenderForStorage current /{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val isEnabled: Output<Boolean>?

Indicates whether Defender for Storage is enabled on this storage account.

Link copied to clipboard

Properties of Malware Scanning.

Link copied to clipboard
val name: Output<String>

Resource name

Link copied to clipboard

Indicates whether the settings defined for this storage account should override the settings defined for the subscription.

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

Properties of Sensitive Data Discovery.

Link copied to clipboard
val type: Output<String>

Resource type

Link copied to clipboard
val urn: Output<String>