1. Packages
  2. Azure Native
  3. API Docs
  4. security
  5. DefenderForStorage
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.39.0 published on Monday, Apr 29, 2024 by Pulumi

azure-native.security.DefenderForStorage

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.39.0 published on Monday, Apr 29, 2024 by Pulumi

    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 pulumi
    import pulumi_azure_native as azure_native
    
    defender_for_storage = azure_native.security.DefenderForStorage("defenderForStorage",
        is_enabled=True,
        malware_scanning=azure_native.security.MalwareScanningPropertiesArgs(
            cap_gb_per_month=-1,
            is_enabled=True,
            scan_results_event_grid_topic_resource_id="/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic",
        ),
        override_subscription_level_settings=True,
        resource_id="subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount",
        sensitive_data_discovery=azure_native.security.SensitiveDataDiscoveryPropertiesArgs(
            is_enabled=True,
        ),
        setting_name="current")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const defenderForStorage = new azure_native.security.DefenderForStorage("defenderForStorage", {
        isEnabled: true,
        malwareScanning: {
            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: {
            isEnabled: true,
        },
        settingName: "current",
    });
    

    Create DefenderForStorage Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DefenderForStorage(name: string, args: DefenderForStorageArgs, opts?: CustomResourceOptions);
    @overload
    def DefenderForStorage(resource_name: str,
                           args: DefenderForStorageArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def DefenderForStorage(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           resource_id: Optional[str] = None,
                           is_enabled: Optional[bool] = None,
                           malware_scanning: Optional[MalwareScanningPropertiesArgs] = None,
                           override_subscription_level_settings: Optional[bool] = None,
                           sensitive_data_discovery: Optional[SensitiveDataDiscoveryPropertiesArgs] = None,
                           setting_name: Optional[str] = None)
    func NewDefenderForStorage(ctx *Context, name string, args DefenderForStorageArgs, opts ...ResourceOption) (*DefenderForStorage, error)
    public DefenderForStorage(string name, DefenderForStorageArgs args, CustomResourceOptions? opts = null)
    public DefenderForStorage(String name, DefenderForStorageArgs args)
    public DefenderForStorage(String name, DefenderForStorageArgs args, CustomResourceOptions options)
    
    type: azure-native:security:DefenderForStorage
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DefenderForStorageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DefenderForStorageArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DefenderForStorageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DefenderForStorageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DefenderForStorageArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var defenderForStorageResource = new AzureNative.Security.DefenderForStorage("defenderForStorageResource", new()
    {
        ResourceId = "string",
        IsEnabled = false,
        MalwareScanning = new AzureNative.Security.Inputs.MalwareScanningPropertiesArgs
        {
            CapGBPerMonth = 0,
            IsEnabled = false,
            ScanResultsEventGridTopicResourceId = "string",
        },
        OverrideSubscriptionLevelSettings = false,
        SensitiveDataDiscovery = new AzureNative.Security.Inputs.SensitiveDataDiscoveryPropertiesArgs
        {
            IsEnabled = false,
        },
        SettingName = "string",
    });
    
    example, err := security.NewDefenderForStorage(ctx, "defenderForStorageResource", &security.DefenderForStorageArgs{
    ResourceId: pulumi.String("string"),
    IsEnabled: pulumi.Bool(false),
    MalwareScanning: &security.MalwareScanningPropertiesArgs{
    CapGBPerMonth: pulumi.Int(0),
    IsEnabled: pulumi.Bool(false),
    ScanResultsEventGridTopicResourceId: pulumi.String("string"),
    },
    OverrideSubscriptionLevelSettings: pulumi.Bool(false),
    SensitiveDataDiscovery: &security.SensitiveDataDiscoveryPropertiesArgs{
    IsEnabled: pulumi.Bool(false),
    },
    SettingName: pulumi.String("string"),
    })
    
    var defenderForStorageResource = new DefenderForStorage("defenderForStorageResource", DefenderForStorageArgs.builder()        
        .resourceId("string")
        .isEnabled(false)
        .malwareScanning(MalwareScanningPropertiesArgs.builder()
            .capGBPerMonth(0)
            .isEnabled(false)
            .scanResultsEventGridTopicResourceId("string")
            .build())
        .overrideSubscriptionLevelSettings(false)
        .sensitiveDataDiscovery(SensitiveDataDiscoveryPropertiesArgs.builder()
            .isEnabled(false)
            .build())
        .settingName("string")
        .build());
    
    defender_for_storage_resource = azure_native.security.DefenderForStorage("defenderForStorageResource",
        resource_id="string",
        is_enabled=False,
        malware_scanning=azure_native.security.MalwareScanningPropertiesArgs(
            cap_gb_per_month=0,
            is_enabled=False,
            scan_results_event_grid_topic_resource_id="string",
        ),
        override_subscription_level_settings=False,
        sensitive_data_discovery=azure_native.security.SensitiveDataDiscoveryPropertiesArgs(
            is_enabled=False,
        ),
        setting_name="string")
    
    const defenderForStorageResource = new azure_native.security.DefenderForStorage("defenderForStorageResource", {
        resourceId: "string",
        isEnabled: false,
        malwareScanning: {
            capGBPerMonth: 0,
            isEnabled: false,
            scanResultsEventGridTopicResourceId: "string",
        },
        overrideSubscriptionLevelSettings: false,
        sensitiveDataDiscovery: {
            isEnabled: false,
        },
        settingName: "string",
    });
    
    type: azure-native:security:DefenderForStorage
    properties:
        isEnabled: false
        malwareScanning:
            capGBPerMonth: 0
            isEnabled: false
            scanResultsEventGridTopicResourceId: string
        overrideSubscriptionLevelSettings: false
        resourceId: string
        sensitiveDataDiscovery:
            isEnabled: false
        settingName: string
    

    DefenderForStorage Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The DefenderForStorage resource accepts the following input properties:

    ResourceId string
    The identifier of the resource.
    IsEnabled bool
    Indicates whether Defender for Storage is enabled on this storage account.
    MalwareScanning Pulumi.AzureNative.Security.Inputs.MalwareScanningProperties
    Properties of Malware Scanning.
    OverrideSubscriptionLevelSettings bool
    Indicates whether the settings defined for this storage account should override the settings defined for the subscription.
    SensitiveDataDiscovery Pulumi.AzureNative.Security.Inputs.SensitiveDataDiscoveryProperties
    Properties of Sensitive Data Discovery.
    SettingName string
    Defender for Storage setting name.
    ResourceId string
    The identifier of the resource.
    IsEnabled bool
    Indicates whether Defender for Storage is enabled on this storage account.
    MalwareScanning MalwareScanningPropertiesArgs
    Properties of Malware Scanning.
    OverrideSubscriptionLevelSettings bool
    Indicates whether the settings defined for this storage account should override the settings defined for the subscription.
    SensitiveDataDiscovery SensitiveDataDiscoveryPropertiesArgs
    Properties of Sensitive Data Discovery.
    SettingName string
    Defender for Storage setting name.
    resourceId String
    The identifier of the resource.
    isEnabled Boolean
    Indicates whether Defender for Storage is enabled on this storage account.
    malwareScanning MalwareScanningProperties
    Properties of Malware Scanning.
    overrideSubscriptionLevelSettings Boolean
    Indicates whether the settings defined for this storage account should override the settings defined for the subscription.
    sensitiveDataDiscovery SensitiveDataDiscoveryProperties
    Properties of Sensitive Data Discovery.
    settingName String
    Defender for Storage setting name.
    resourceId string
    The identifier of the resource.
    isEnabled boolean
    Indicates whether Defender for Storage is enabled on this storage account.
    malwareScanning MalwareScanningProperties
    Properties of Malware Scanning.
    overrideSubscriptionLevelSettings boolean
    Indicates whether the settings defined for this storage account should override the settings defined for the subscription.
    sensitiveDataDiscovery SensitiveDataDiscoveryProperties
    Properties of Sensitive Data Discovery.
    settingName string
    Defender for Storage setting name.
    resource_id str
    The identifier of the resource.
    is_enabled bool
    Indicates whether Defender for Storage is enabled on this storage account.
    malware_scanning MalwareScanningPropertiesArgs
    Properties of Malware Scanning.
    override_subscription_level_settings bool
    Indicates whether the settings defined for this storage account should override the settings defined for the subscription.
    sensitive_data_discovery SensitiveDataDiscoveryPropertiesArgs
    Properties of Sensitive Data Discovery.
    setting_name str
    Defender for Storage setting name.
    resourceId String
    The identifier of the resource.
    isEnabled Boolean
    Indicates whether Defender for Storage is enabled on this storage account.
    malwareScanning Property Map
    Properties of Malware Scanning.
    overrideSubscriptionLevelSettings Boolean
    Indicates whether the settings defined for this storage account should override the settings defined for the subscription.
    sensitiveDataDiscovery Property Map
    Properties of Sensitive Data Discovery.
    settingName String
    Defender for Storage setting name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DefenderForStorage resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name
    Type string
    Resource type
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name
    Type string
    Resource type
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name
    type String
    Resource type
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name
    type string
    Resource type
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Resource name
    type str
    Resource type
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name
    type String
    Resource type

    Supporting Types

    MalwareScanningProperties, MalwareScanningPropertiesArgs

    CapGBPerMonth int
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    IsEnabled bool
    Indicates whether On Upload malware scanning should be enabled.
    ScanResultsEventGridTopicResourceId string
    Optional. Resource id of an Event Grid Topic to send scan results to.
    CapGBPerMonth int
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    IsEnabled bool
    Indicates whether On Upload malware scanning should be enabled.
    ScanResultsEventGridTopicResourceId string
    Optional. Resource id of an Event Grid Topic to send scan results to.
    capGBPerMonth Integer
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    isEnabled Boolean
    Indicates whether On Upload malware scanning should be enabled.
    scanResultsEventGridTopicResourceId String
    Optional. Resource id of an Event Grid Topic to send scan results to.
    capGBPerMonth number
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    isEnabled boolean
    Indicates whether On Upload malware scanning should be enabled.
    scanResultsEventGridTopicResourceId string
    Optional. Resource id of an Event Grid Topic to send scan results to.
    cap_gb_per_month int
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    is_enabled bool
    Indicates whether On Upload malware scanning should be enabled.
    scan_results_event_grid_topic_resource_id str
    Optional. Resource id of an Event Grid Topic to send scan results to.
    capGBPerMonth Number
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    isEnabled Boolean
    Indicates whether On Upload malware scanning should be enabled.
    scanResultsEventGridTopicResourceId String
    Optional. Resource id of an Event Grid Topic to send scan results to.

    MalwareScanningPropertiesResponse, MalwareScanningPropertiesResponseArgs

    OperationStatus Pulumi.AzureNative.Security.Inputs.OperationStatusResponse
    Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation.
    CapGBPerMonth int
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    IsEnabled bool
    Indicates whether On Upload malware scanning should be enabled.
    ScanResultsEventGridTopicResourceId string
    Optional. Resource id of an Event Grid Topic to send scan results to.
    OperationStatus OperationStatusResponse
    Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation.
    CapGBPerMonth int
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    IsEnabled bool
    Indicates whether On Upload malware scanning should be enabled.
    ScanResultsEventGridTopicResourceId string
    Optional. Resource id of an Event Grid Topic to send scan results to.
    operationStatus OperationStatusResponse
    Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation.
    capGBPerMonth Integer
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    isEnabled Boolean
    Indicates whether On Upload malware scanning should be enabled.
    scanResultsEventGridTopicResourceId String
    Optional. Resource id of an Event Grid Topic to send scan results to.
    operationStatus OperationStatusResponse
    Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation.
    capGBPerMonth number
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    isEnabled boolean
    Indicates whether On Upload malware scanning should be enabled.
    scanResultsEventGridTopicResourceId string
    Optional. Resource id of an Event Grid Topic to send scan results to.
    operation_status OperationStatusResponse
    Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation.
    cap_gb_per_month int
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    is_enabled bool
    Indicates whether On Upload malware scanning should be enabled.
    scan_results_event_grid_topic_resource_id str
    Optional. Resource id of an Event Grid Topic to send scan results to.
    operationStatus Property Map
    Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation.
    capGBPerMonth Number
    Defines the max GB to be scanned per Month. Set to -1 if no capping is needed.
    isEnabled Boolean
    Indicates whether On Upload malware scanning should be enabled.
    scanResultsEventGridTopicResourceId String
    Optional. Resource id of an Event Grid Topic to send scan results to.

    OperationStatusResponse, OperationStatusResponseArgs

    Code string
    The operation status code.
    Message string
    Additional information regarding the success/failure of the operation.
    Code string
    The operation status code.
    Message string
    Additional information regarding the success/failure of the operation.
    code String
    The operation status code.
    message String
    Additional information regarding the success/failure of the operation.
    code string
    The operation status code.
    message string
    Additional information regarding the success/failure of the operation.
    code str
    The operation status code.
    message str
    Additional information regarding the success/failure of the operation.
    code String
    The operation status code.
    message String
    Additional information regarding the success/failure of the operation.

    SensitiveDataDiscoveryProperties, SensitiveDataDiscoveryPropertiesArgs

    IsEnabled bool
    Indicates whether Sensitive Data Discovery should be enabled.
    IsEnabled bool
    Indicates whether Sensitive Data Discovery should be enabled.
    isEnabled Boolean
    Indicates whether Sensitive Data Discovery should be enabled.
    isEnabled boolean
    Indicates whether Sensitive Data Discovery should be enabled.
    is_enabled bool
    Indicates whether Sensitive Data Discovery should be enabled.
    isEnabled Boolean
    Indicates whether Sensitive Data Discovery should be enabled.

    SensitiveDataDiscoveryPropertiesResponse, SensitiveDataDiscoveryPropertiesResponseArgs

    OperationStatus Pulumi.AzureNative.Security.Inputs.OperationStatusResponse
    Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation.
    IsEnabled bool
    Indicates whether Sensitive Data Discovery should be enabled.
    OperationStatus OperationStatusResponse
    Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation.
    IsEnabled bool
    Indicates whether Sensitive Data Discovery should be enabled.
    operationStatus OperationStatusResponse
    Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation.
    isEnabled Boolean
    Indicates whether Sensitive Data Discovery should be enabled.
    operationStatus OperationStatusResponse
    Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation.
    isEnabled boolean
    Indicates whether Sensitive Data Discovery should be enabled.
    operation_status OperationStatusResponse
    Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation.
    is_enabled bool
    Indicates whether Sensitive Data Discovery should be enabled.
    operationStatus Property Map
    Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation.
    isEnabled Boolean
    Indicates whether Sensitive Data Discovery should be enabled.

    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} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.39.0 published on Monday, Apr 29, 2024 by Pulumi