published on Thursday, Aug 13, 2026 by Pulumi
published on Thursday, Aug 13, 2026 by Pulumi
The data scanner resource used by Defender for Storage to scan data for malware and sensitive data discovery.
Uses Azure REST API version 2026-08-01.
Example Usage
Creates or updates a data scanner resource at resource group scope.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var dataScanner = new AzureNative.Security.DataScanner("dataScanner", new()
{
Identity = new AzureNative.Security.Inputs.SystemAssignedServiceIdentityArgs
{
Type = AzureNative.Security.SystemAssignedServiceIdentityType.SystemAssigned,
},
ScannerName = "StorageDataScanner",
ScopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1",
});
});
package main
import (
security "github.com/pulumi/pulumi-azure-native-sdk/security/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := security.NewDataScanner(ctx, "dataScanner", &security.DataScannerArgs{
Identity: &security.SystemAssignedServiceIdentityArgs{
Type: pulumi.String(security.SystemAssignedServiceIdentityTypeSystemAssigned),
},
ScannerName: pulumi.String("StorageDataScanner"),
ScopeId: pulumi.String("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_security_datascanner" "dataScanner" {
identity = {
type = "SystemAssigned"
}
scanner_name = "StorageDataScanner"
scope_id = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.security.DataScanner;
import com.pulumi.azurenative.security.DataScannerArgs;
import com.pulumi.azurenative.security.inputs.SystemAssignedServiceIdentityArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 dataScanner = new DataScanner("dataScanner", DataScannerArgs.builder()
.identity(SystemAssignedServiceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.scannerName("StorageDataScanner")
.scopeId("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const dataScanner = new azure_native.security.DataScanner("dataScanner", {
identity: {
type: azure_native.security.SystemAssignedServiceIdentityType.SystemAssigned,
},
scannerName: "StorageDataScanner",
scopeId: "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1",
});
import pulumi
import pulumi_azure_native as azure_native
data_scanner = azure_native.security.DataScanner("dataScanner",
identity={
"type": azure_native.security.SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED,
},
scanner_name="StorageDataScanner",
scope_id="subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1")
resources:
dataScanner:
type: azure-native:security:DataScanner
properties:
identity:
type: SystemAssigned
scannerName: StorageDataScanner
scopeId: subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1
Creates or updates a data scanner resource at subscription scope.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var dataScanner = new AzureNative.Security.DataScanner("dataScanner", new()
{
Identity = new AzureNative.Security.Inputs.SystemAssignedServiceIdentityArgs
{
Type = AzureNative.Security.SystemAssignedServiceIdentityType.SystemAssigned,
},
ScannerName = "StorageDataScanner",
ScopeId = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23",
});
});
package main
import (
security "github.com/pulumi/pulumi-azure-native-sdk/security/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := security.NewDataScanner(ctx, "dataScanner", &security.DataScannerArgs{
Identity: &security.SystemAssignedServiceIdentityArgs{
Type: pulumi.String(security.SystemAssignedServiceIdentityTypeSystemAssigned),
},
ScannerName: pulumi.String("StorageDataScanner"),
ScopeId: pulumi.String("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_security_datascanner" "dataScanner" {
identity = {
type = "SystemAssigned"
}
scanner_name = "StorageDataScanner"
scope_id = "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.security.DataScanner;
import com.pulumi.azurenative.security.DataScannerArgs;
import com.pulumi.azurenative.security.inputs.SystemAssignedServiceIdentityArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 dataScanner = new DataScanner("dataScanner", DataScannerArgs.builder()
.identity(SystemAssignedServiceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.scannerName("StorageDataScanner")
.scopeId("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const dataScanner = new azure_native.security.DataScanner("dataScanner", {
identity: {
type: azure_native.security.SystemAssignedServiceIdentityType.SystemAssigned,
},
scannerName: "StorageDataScanner",
scopeId: "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23",
});
import pulumi
import pulumi_azure_native as azure_native
data_scanner = azure_native.security.DataScanner("dataScanner",
identity={
"type": azure_native.security.SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED,
},
scanner_name="StorageDataScanner",
scope_id="subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23")
resources:
dataScanner:
type: azure-native:security:DataScanner
properties:
identity:
type: SystemAssigned
scannerName: StorageDataScanner
scopeId: subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23
Create DataScanner Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DataScanner(name: string, args: DataScannerArgs, opts?: CustomResourceOptions);@overload
def DataScanner(resource_name: str,
args: DataScannerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DataScanner(resource_name: str,
opts: Optional[ResourceOptions] = None,
scope_id: Optional[str] = None,
identity: Optional[SystemAssignedServiceIdentityArgs] = None,
properties: Optional[Any] = None,
scanner_name: Optional[str] = None)func NewDataScanner(ctx *Context, name string, args DataScannerArgs, opts ...ResourceOption) (*DataScanner, error)public DataScanner(string name, DataScannerArgs args, CustomResourceOptions? opts = null)
public DataScanner(String name, DataScannerArgs args)
public DataScanner(String name, DataScannerArgs args, CustomResourceOptions options)
type: azure-native:security:DataScanner
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "azure-native_security_data_scanner" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args DataScannerArgs
- 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 DataScannerArgs
- 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 DataScannerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DataScannerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DataScannerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var dataScannerResource = new AzureNative.Security.DataScanner("dataScannerResource", new()
{
ScopeId = "string",
Identity = new AzureNative.Security.Inputs.SystemAssignedServiceIdentityArgs
{
Type = "string",
},
Properties = "any",
ScannerName = "string",
});
example, err := security.NewDataScanner(ctx, "dataScannerResource", &security.DataScannerArgs{
ScopeId: pulumi.String("string"),
Identity: &security.SystemAssignedServiceIdentityArgs{
Type: pulumi.String("string"),
},
Properties: pulumi.Any("any"),
ScannerName: pulumi.String("string"),
})
resource "azure-native_security_data_scanner" "dataScannerResource" {
lifecycle {
create_before_destroy = true
}
scope_id = "string"
identity = {
type = "string"
}
properties = "any"
scanner_name = "string"
}
var dataScannerResource = new DataScanner("dataScannerResource", DataScannerArgs.builder()
.scopeId("string")
.identity(com.pulumi.azurenative.security.inputs.SystemAssignedServiceIdentityArgs.builder()
.type("string")
.build())
.properties("any")
.scannerName("string")
.build());
data_scanner_resource = azure_native.security.DataScanner("dataScannerResource",
scope_id="string",
identity={
"type": "string",
},
properties="any",
scanner_name="string")
const dataScannerResource = new azure_native.security.DataScanner("dataScannerResource", {
scopeId: "string",
identity: {
type: "string",
},
properties: "any",
scannerName: "string",
});
type: azure-native:security:DataScanner
properties:
identity:
type: string
properties: any
scannerName: string
scopeId: string
DataScanner Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DataScanner resource accepts the following input properties:
- Scope
Id string - The scope of the data scanner. Valid scopes are a subscription (format: 'subscriptions/{subscriptionId}') or a resource group (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').
- Identity
Pulumi.
Azure Native. Security. Inputs. System Assigned Service Identity - The managed service identities assigned to this resource.
- Properties object
- Data scanner resource properties.
- Scanner
Name string - The name of the data scanner.
- Scope
Id string - The scope of the data scanner. Valid scopes are a subscription (format: 'subscriptions/{subscriptionId}') or a resource group (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').
- Identity
System
Assigned Service Identity Args - The managed service identities assigned to this resource.
- Properties interface{}
- Data scanner resource properties.
- Scanner
Name string - The name of the data scanner.
- scope_
id string - The scope of the data scanner. Valid scopes are a subscription (format: 'subscriptions/{subscriptionId}') or a resource group (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').
- identity object
- The managed service identities assigned to this resource.
- properties any
- Data scanner resource properties.
- scanner_
name string - The name of the data scanner.
- scope
Id String - The scope of the data scanner. Valid scopes are a subscription (format: 'subscriptions/{subscriptionId}') or a resource group (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').
- identity
System
Assigned Service Identity - The managed service identities assigned to this resource.
- properties Object
- Data scanner resource properties.
- scanner
Name String - The name of the data scanner.
- scope
Id string - The scope of the data scanner. Valid scopes are a subscription (format: 'subscriptions/{subscriptionId}') or a resource group (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').
- identity
System
Assigned Service Identity - The managed service identities assigned to this resource.
- properties any
- Data scanner resource properties.
- scanner
Name string - The name of the data scanner.
- scope_
id str - The scope of the data scanner. Valid scopes are a subscription (format: 'subscriptions/{subscriptionId}') or a resource group (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').
- identity
System
Assigned Service Identity Args - The managed service identities assigned to this resource.
- properties Any
- Data scanner resource properties.
- scanner_
name str - The name of the data scanner.
- scope
Id String - The scope of the data scanner. Valid scopes are a subscription (format: 'subscriptions/{subscriptionId}') or a resource group (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').
- identity Property Map
- The managed service identities assigned to this resource.
- properties Any
- Data scanner resource properties.
- scanner
Name String - The name of the data scanner.
Outputs
All input properties are implicitly available as output properties. Additionally, the DataScanner resource produces the following output properties:
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- System
Data Pulumi.Azure Native. Security. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_
api_ stringversion - The Azure API version of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- system_
data object - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api stringVersion - The Azure API version of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_
api_ strversion - The Azure API version of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
SystemAssignedServiceIdentity, SystemAssignedServiceIdentityArgs
Managed service identity (either system assigned, or none)- Type
string | Pulumi.
Azure Native. Security. System Assigned Service Identity Type - Type of managed service identity (either system assigned, or none).
- Type
string | System
Assigned Service Identity Type - Type of managed service identity (either system assigned, or none).
- type
string | "None" | "System
Assigned" - Type of managed service identity (either system assigned, or none).
- type
String | System
Assigned Service Identity Type - Type of managed service identity (either system assigned, or none).
- type
string | System
Assigned Service Identity Type - Type of managed service identity (either system assigned, or none).
- type
str | System
Assigned Service Identity Type - Type of managed service identity (either system assigned, or none).
- type
String | "None" | "System
Assigned" - Type of managed service identity (either system assigned, or none).
SystemAssignedServiceIdentityResponse, SystemAssignedServiceIdentityResponseArgs
Managed service identity (either system assigned, or none)- Principal
Id string - The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
- Tenant
Id string - The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
- Type string
- Type of managed service identity (either system assigned, or none).
- Principal
Id string - The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
- Tenant
Id string - The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
- Type string
- Type of managed service identity (either system assigned, or none).
- principal_
id string - The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
- tenant_
id string - The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
- type string
- Type of managed service identity (either system assigned, or none).
- principal
Id String - The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
- tenant
Id String - The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
- type String
- Type of managed service identity (either system assigned, or none).
- principal
Id string - The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
- tenant
Id string - The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
- type string
- Type of managed service identity (either system assigned, or none).
- principal_
id str - The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
- tenant_
id str - The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
- type str
- Type of managed service identity (either system assigned, or none).
- principal
Id String - The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
- tenant
Id String - The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
- type String
- Type of managed service identity (either system assigned, or none).
SystemAssignedServiceIdentityType, SystemAssignedServiceIdentityTypeArgs
- None
None- System
Assigned SystemAssigned
- System
Assigned Service Identity Type None None- System
Assigned Service Identity Type System Assigned SystemAssigned
- "None"
None- "System
Assigned" SystemAssigned
- None
None- System
Assigned SystemAssigned
- None
None- System
Assigned SystemAssigned
- NONE
None- SYSTEM_ASSIGNED
SystemAssigned
- "None"
None- "System
Assigned" SystemAssigned
SystemDataResponse, SystemDataResponseArgs
Metadata pertaining to creation and last modification of the resource.- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at string - The timestamp of resource creation (UTC).
- created_
by string - The identity that created the resource.
- created_
by_ stringtype - The type of identity that created the resource.
- last_
modified_ stringat - The timestamp of resource last modification (UTC)
- last_
modified_ stringby - The identity that last modified the resource.
- last_
modified_ stringby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:security:DataScanner StorageDataScanner /{scopeId}/providers/Microsoft.Security/dataScanners/{scannerName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
published on Thursday, Aug 13, 2026 by Pulumi