Data Scanners - Create Or Update
Creates or updates a data scanner resource for the specified scope.
PUT https://management.azure.com/{scopeId}/providers/Microsoft.Security/dataScanners/{scannerName}?api-version=2026-08-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
scanner
|
path | True |
string pattern: ^[a-zA-Z0-9-]{1,260}$ |
The name of the data scanner. |
|
scope
|
path | True |
string |
The scope of the data scanner. Valid scopes are a subscription (format: 'subscriptions/{subscriptionId}') or a resource group (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| identity |
The managed service identities assigned to this resource. |
|
| properties |
object |
Data scanner resource properties. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Resource 'DataScanner' update operation succeeded |
|
| 201 Created |
Resource 'DataScanner' create operation succeeded |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
| Creates or updates a data scanner resource at resource group scope. |
| Creates or updates a data scanner resource at subscription scope. |
Creates or updates a data scanner resource at resource group scope.
Sample request
PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Security/dataScanners/StorageDataScanner?api-version=2026-08-01
{
"identity": {
"type": "SystemAssigned"
}
}
Sample response
{
"name": "StorageDataScanner",
"type": "Microsoft.Security/dataScanners",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Security/dataScanners/StorageDataScanner",
"identity": {
"type": "SystemAssigned",
"principalId": "bec188e7-2308-4ae4-ac3e-694181be2bcf",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
}
}
{
"name": "StorageDataScanner",
"type": "Microsoft.Security/dataScanners",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Security/dataScanners/StorageDataScanner",
"identity": {
"type": "SystemAssigned",
"principalId": "bec188e7-2308-4ae4-ac3e-694181be2bcf",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
}
}
Creates or updates a data scanner resource at subscription scope.
Sample request
PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/dataScanners/StorageDataScanner?api-version=2026-08-01
{
"identity": {
"type": "SystemAssigned"
}
}
Sample response
{
"name": "StorageDataScanner",
"type": "Microsoft.Security/dataScanners",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/dataScanners/StorageDataScanner",
"identity": {
"type": "SystemAssigned",
"principalId": "bec188e7-2308-4ae4-ac3e-694181be2bcf",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
}
}
{
"name": "StorageDataScanner",
"type": "Microsoft.Security/dataScanners",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/dataScanners/StorageDataScanner",
"identity": {
"type": "SystemAssigned",
"principalId": "bec188e7-2308-4ae4-ac3e-694181be2bcf",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
}
}
Definitions
| Name | Description |
|---|---|
|
Common. |
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). |
|
Common. |
The error detail. |
|
created |
The type of identity that created the resource. |
|
Data |
The data scanner resource used by Defender for Storage to scan data for malware and sensitive data discovery. |
|
Error |
The resource management error additional info. |
|
System |
Managed service identity (either system assigned, or none) |
|
System |
Type of managed service identity (either system assigned, or none). |
|
system |
Metadata pertaining to creation and last modification of the resource. |
Common.CloudError
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
Common.CloudErrorBody
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DataScanner
The data scanner resource used by Defender for Storage to scan data for malware and sensitive data discovery.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| identity |
The managed service identities assigned to this resource. |
|
| name |
string |
The name of the resource |
| properties |
object |
Data scanner resource properties. |
| systemData |
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" |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
SystemAssignedServiceIdentity
Managed service identity (either system assigned, or none)
| Name | Type | Description |
|---|---|---|
| principalId |
string (uuid) |
The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. |
| tenantId |
string (uuid) |
The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. |
| type |
Type of managed service identity (either system assigned, or none). |
SystemAssignedServiceIdentityType
Type of managed service identity (either system assigned, or none).
| Value | Description |
|---|---|
| None | |
| SystemAssigned |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |