DefenderForStorage

class DefenderForStorage : KotlinCustomResource

The Defender for Storage resource. Uses Azure REST API version 2022-12-01-preview. Other available API versions: 2024-10-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()
{
Properties = new AzureNative.Security.Inputs.DefenderForStorageSettingPropertiesArgs
{
IsEnabled = true,
MalwareScanning = new AzureNative.Security.Inputs.MalwareScanningPropertiesArgs
{
OnUpload = new AzureNative.Security.Inputs.OnUploadPropertiesArgs
{
CapGBPerMonth = -1,
IsEnabled = true,
},
ScanResultsEventGridTopicResourceId = "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic",
},
OverrideSubscriptionLevelSettings = true,
SensitiveDataDiscovery = new AzureNative.Security.Inputs.SensitiveDataDiscoveryPropertiesArgs
{
IsEnabled = true,
},
},
ResourceId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount",
SettingName = "current",
});
});
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.NewDefenderForStorage(ctx, "defenderForStorage", &security.DefenderForStorageArgs{
Properties: &security.DefenderForStorageSettingPropertiesArgs{
IsEnabled: pulumi.Bool(true),
MalwareScanning: &security.MalwareScanningPropertiesArgs{
OnUpload: &security.OnUploadPropertiesArgs{
CapGBPerMonth: pulumi.Int(-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),
SensitiveDataDiscovery: &security.SensitiveDataDiscoveryPropertiesArgs{
IsEnabled: pulumi.Bool(true),
},
},
ResourceId: pulumi.String("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount"),
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.DefenderForStorageSettingPropertiesArgs;
import com.pulumi.azurenative.security.inputs.MalwareScanningPropertiesArgs;
import com.pulumi.azurenative.security.inputs.OnUploadPropertiesArgs;
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()
.properties(DefenderForStorageSettingPropertiesArgs.builder()
.isEnabled(true)
.malwareScanning(MalwareScanningPropertiesArgs.builder()
.onUpload(OnUploadPropertiesArgs.builder()
.capGBPerMonth(-1)
.isEnabled(true)
.build())
.scanResultsEventGridTopicResourceId("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic")
.build())
.overrideSubscriptionLevelSettings(true)
.sensitiveDataDiscovery(SensitiveDataDiscoveryPropertiesArgs.builder()
.isEnabled(true)
.build())
.build())
.resourceId("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount")
.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 name: Output<String>

Resource name

Link copied to clipboard

Defender for Storage resource properties.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: Output<String>

Resource type

Link copied to clipboard
val urn: Output<String>