Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "../Common/main.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Common;

namespace DataScannersAPI;
/**
* The data scanner resource used by Defender for Storage to scan data for malware and sensitive data discovery.
*/
@extensionResource
model DataScanner
is Azure.ResourceManager.ExtensionResource<DataScannerProperties> {
...ResourceNameParameter<
Resource = DataScanner,
KeyName = "scannerName",
SegmentName = "datascanners",
NamePattern = "^[a-zA-Z0-9-]*$"
>;
...Azure.ResourceManager.ManagedServiceIdentityProperty;
}

alias DataScannersOps = Azure.ResourceManager.Legacy.ExtensionOperations<
{
...ApiVersionParameter;

/**
* The scope of the data scanner. Valid scopes are a subscription (format: 'subscriptions/{subscriptionId}') or a resource group (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}').
*/
@path(#{ allowReserved: true })
@key
scopeId: string;

/** The provider namespace. */
@path
@segment("providers")
@key
providerNamespace: "Microsoft.Security";
},
{},
{
/** The name of the data scanner. */
@path
@segment("datascanners")
@key
@pattern("^[a-zA-Z0-9-]*$")
scannerName: string;
}
>;

@armResourceOperations
interface DataScanners {
/**
* Gets a data scanner resource for the specified scope.
*/
get is DataScannersOps.Read<DataScanner, ErrorType = CloudError>;

/**
* Creates or updates a data scanner resource for the specified scope.
*/
createOrUpdate is DataScannersOps.CreateOrUpdateSync<
DataScanner,
ErrorType = CloudError
>;

/**
* Deletes a data scanner resource for the specified scope.
*/
delete is DataScannersOps.DeleteSync<DataScanner, ErrorType = CloudError>;

/**
* Lists all data scanner resources for the specified scope.
*/
list is DataScannersOps.List<
DataScanner,
Response = ArmResponse<DataScannerList>,
ErrorType = CloudError
>;
}

@@doc(DataScanner.name, "The name of the data scanner.");
@@doc(DataScanner.properties, "Data scanner resource properties.");
@@doc(DataScanners.createOrUpdate::parameters.resource, "The data scanner resource.");
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"api-version": "2026-08-01",
"scopeId": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"scannerName": "StorageDataScanner",
"resource": {
"identity": {
"type": "SystemAssigned"
}
}
},
"responses": {
"200": {
"body": {
"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"
}
}
},
"201": {
"body": {
"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"
}
}
}
},
"operationId": "DataScanners_CreateOrUpdate",
"title": "Creates or updates a data scanner resource for the specified scope."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"api-version": "2026-08-01",
"scopeId": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"scannerName": "StorageDataScanner"
},
"responses": {
"200": {},
"204": {}
},
"operationId": "DataScanners_Delete",
"title": "Deletes a data scanner resource for the specified scope."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"api-version": "2026-08-01",
"scopeId": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"scannerName": "StorageDataScanner"
},
"responses": {
"200": {
"body": {
"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"
}
}
}
},
"operationId": "DataScanners_Get",
"title": "Gets a data scanner resource for the specified scope."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"api-version": "2026-08-01",
"scopeId": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23"
},
"responses": {
"200": {
"body": {
"value": [
{
"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"
}
}
]
}
}
},
"operationId": "DataScanners_List",
"title": "Lists all data scanner resources for the specified scope."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "./models.tsp";
import "./DataScanner.tsp";

using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.ResourceManager;
using Azure.Core;
using TypeSpec.Versioning;
/**
* API spec for Microsoft.Security (Azure Security Center) data scanners resource provider.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint" "Operations are defined in a separate operations.json spec for Microsoft.Security."
#suppress "@azure-tools/typespec-azure-core/casing-style" "Namespace name retained from the migrated OpenAPI specification."
@armProviderNamespace("Microsoft.Security")
@service(#{ title: "Security Center" })
@versioned(Versions)
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5)
namespace DataScannersAPI;

/**
* The available API versions.
*/
enum Versions {
/**
* The 2026-08-01 stable API version.
*/
v2026_08_01: "2026-08-01",
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "../Common/main.tsp";

using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using Common;

namespace DataScannersAPI;

/**
* Data scanner resource properties.
*/
model DataScannerProperties {}

/**
* List of data scanner resources.
*/
model DataScannerList {
/**
* The list of data scanner resources.
*/
@pageItems
value: DataScanner[];

/**
* The URI to fetch the next page.
*/
@nextLink
nextLink?: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
emit:
- "@azure-tools/typespec-autorest"
options:
"@azure-tools/typespec-autorest":
omit-unreachable-types: true
emitter-output-dir: "{project-root}"
azure-resource-provider-folder: "resource-manager"
output-file: "../{version-status}/{version}/datascanners.json"
arm-types-dir: "{project-root}/../../../../../common-types/resource-management"
emit-lro-options: "all"
examples-dir: "{project-root}/examples"
linter:
extends:
- "@azure-tools/typespec-azure-rulesets/resource-manager"
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"api-version": "2026-08-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.Security/defenderforstoragesettings/read",
"display": {
"description": "Gets the defenderforstoragesettings for the scope",
"operation": "Get defenderForStorageSettings",
"provider": "Microsoft Security",
"resource": "DefenderForStorageSettings"
},
"origin": "user"
},
{
"name": "Microsoft.Security/defenderforstoragesettings/write",
"display": {
"description": "Creates or updates the defenderforstoragesettings for the scope",
"operation": "Update defenderForStorageSettings",
"provider": "Microsoft Security",
"resource": "DefenderForStorageSettings"
},
"origin": "user"
},
{
"name": "Microsoft.Security/defenderforstoragesettings/delete",
"display": {
"description": "Deletes the defenderforstoragesettings for the scope",
"operation": "Delete defenderForStorageSettings",
"provider": "Microsoft Security",
"resource": "DefenderForStorageSettings"
},
"origin": "user"
}
]
}
}
},
"operationId": "Operations_List",
"title": "List the operations for the Microsoft.Security (Microsoft Defender for Cloud) resource provider"
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ enum Versions {
* The 2025-10-01-preview API version.
*/
v2025_10_01_preview: "2025-10-01-preview",

/**
* The 2026-08-01 stable API version.
*/
v2026_08_01: "2026-08-01",
}

interface Operations extends Azure.ResourceManager.Operations {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ import "@typespec/rest";
import "./models.tsp";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/versioning";

using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.ResourceManager;
using Azure.Core;
using TypeSpec.OpenAPI;
using TypeSpec.Versioning;

namespace OperationsAPI;

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@removed(Versions.v2026_08_01)
interface OperationResultsOperationGroup {
/**
* Returns operation results for long running operations.
Expand Down Expand Up @@ -49,6 +52,7 @@ interface OperationResultsOperationGroup {
}

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@removed(Versions.v2026_08_01)
interface OperationStatusesOperationGroup {
/**
* Get the status of a long running azure asynchronous operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,16 @@ suppressions:
reason: The databaseName query parameter is required for server-level routes where the database is not part of the ARM resource ID path.
```

### Tag: package-2026-08

These settings apply only when `--tag=package-2026-08` is specified on the command line.

```yaml $(tag) == 'package-2026-08'
input-file:
- stable/2026-08-01/datascanners.json
- stable/2026-08-01/security-Operations.json
```

### Tag: package-2026-01

These settings apply only when `--tag=package-2026-01` is specified on the command line.
Expand Down
Loading
Loading