forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Swagger for Defender for Storage new on-demand malware scan API (A…
…zure#30786) * Copy files from preview/2022-12-01-preview Copied the files in a separate commit. This allows reviewers to easily diff subsequent changes against the previous spec. * Update version to preview/2024-10-01-preview Updated the API version from preview/2022-12-01-preview to preview/2024-10-01-preview. * Added tag for 2024-10-01-preview in readme file * Add Swagger for Defender for Storage new on-demand malware scan API * Update api-version in examples * Run prettier on swagger files * Fix defintions * Fix BlobsScanSummary definition * Remove scanRequestTime (will be removed from API) * Camel casing * Add get to malwareScanStatus operation name * Remove extra underscore from operation ids * Fix MalwareScanStatus top level properties * Fix examples to match properties * Extract MalwareScanStatusProperties * Remove resource reference * Remove scanId from Cancel and remove get from ScanStatus path * Change the API structure to include a collection of scans * Add 'malware' to cancel operation name * Copy operations API to new api version * Add opeations example * Limit example size * run prettier * Move example to correct folder * modify example * Add opeartions file to readme * Use common types for operation results
- Loading branch information
Showing
9 changed files
with
780 additions
and
1 deletion.
There are no files selected for viewing
476 changes: 476 additions & 0 deletions
476
...rce-manager/Microsoft.Security/preview/2024-10-01-preview/defenderForStorageSettings.json
Large diffs are not rendered by default.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
...ity/preview/2024-10-01-preview/examples/DefenderForStorage/CancelMalwareScan_example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2024-10-01-preview", | ||
"resourceId": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", | ||
"settingName": "current", | ||
"scanId": "latest" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"properties": { | ||
"scanId": "3fd3c1be-dbff-4d6e-985f-43f9ec1b1146", | ||
"scanStatus": "Canceling", | ||
"scanStatusMessage": "The scan request is being canceled upon user request" | ||
} | ||
} | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...2024-10-01-preview/examples/DefenderForStorage/GetDefenderForStorageSettings_example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2024-10-01-preview", | ||
"resourceId": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", | ||
"settingName": "current" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount/providers/Microsoft.Security/defenderForStorageSettings/current", | ||
"name": "current", | ||
"type": "Microsoft.Security/defenderForStorageSettings", | ||
"properties": { | ||
"isEnabled": true, | ||
"malwareScanning": { | ||
"onUpload": { | ||
"isEnabled": true, | ||
"capGBPerMonth": -1 | ||
}, | ||
"scanResultsEventGridTopicResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic" | ||
}, | ||
"sensitiveDataDiscovery": { | ||
"isEnabled": false | ||
}, | ||
"overrideSubscriptionLevelSettings": true | ||
} | ||
} | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...curity/preview/2024-10-01-preview/examples/DefenderForStorage/GetMalwareScan_example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2024-10-01-preview", | ||
"resourceId": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", | ||
"settingName": "current", | ||
"scanId": "latest" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"properties": { | ||
"scanId": "0ce362c5-87a5-4030-ba6a-109566cd7b3d", | ||
"scanStatus": "Completed", | ||
"scanStartTime": "2024-09-12T12:20:14.6364816Z", | ||
"scanEndTime": "2024-09-12T12:21:17.5648386Z", | ||
"scanSummary": { | ||
"blobs": { | ||
"totalBlobsScanned": 40, | ||
"maliciousBlobsCount": 10, | ||
"skippedBlobsCount": 0, | ||
"scannedBlobsInGB": 0.019550956785678864 | ||
}, | ||
"estimatedScanCostUSD": 0.0029326435178518295 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
80 changes: 80 additions & 0 deletions
80
...2024-10-01-preview/examples/DefenderForStorage/PutDefenderForStorageSettings_example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2024-10-01-preview", | ||
"resourceId": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", | ||
"settingName": "current", | ||
"defenderForStorageSetting": { | ||
"properties": { | ||
"isEnabled": true, | ||
"malwareScanning": { | ||
"onUpload": { | ||
"isEnabled": true, | ||
"capGBPerMonth": -1 | ||
}, | ||
"scanResultsEventGridTopicResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic" | ||
}, | ||
"sensitiveDataDiscovery": { | ||
"isEnabled": true | ||
}, | ||
"overrideSubscriptionLevelSettings": true | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount/providers/Microsoft.Security/defenderForStorageSettings/current", | ||
"type": "Microsoft.Security/defenderForStorageSettings", | ||
"name": "current", | ||
"properties": { | ||
"isEnabled": true, | ||
"malwareScanning": { | ||
"onUpload": { | ||
"isEnabled": true, | ||
"capGBPerMonth": -1 | ||
}, | ||
"scanResultsEventGridTopicResourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic", | ||
"operationStatus": { | ||
"code": "Succeeded" | ||
} | ||
}, | ||
"sensitiveDataDiscovery": { | ||
"isEnabled": true, | ||
"operationStatus": { | ||
"code": "Succeeded" | ||
} | ||
}, | ||
"overrideSubscriptionLevelSettings": true | ||
} | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount/providers/Microsoft.Security/defenderForStorageSettings/current", | ||
"type": "Microsoft.Security/defenderForStorageSettings", | ||
"name": "current", | ||
"properties": { | ||
"isEnabled": true, | ||
"malwareScanning": { | ||
"onUpload": { | ||
"isEnabled": false, | ||
"capGBPerMonth": -1 | ||
}, | ||
"operationStatus": { | ||
"code": "UnknownError", | ||
"message": "Failed to setup data scanner." | ||
} | ||
}, | ||
"sensitiveDataDiscovery": { | ||
"isEnabled": false, | ||
"operationStatus": { | ||
"code": "UnknownError", | ||
"message": "Failed to setup data scanner." | ||
} | ||
}, | ||
"overrideSubscriptionLevelSettings": true | ||
} | ||
} | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...rity/preview/2024-10-01-preview/examples/DefenderForStorage/StartMalwareScan_example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2024-10-01-preview", | ||
"resourceId": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.Storage/storageAccounts/samplestorageaccount", | ||
"settingName": "current" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"properties": { | ||
"scanId": "fc831479-412f-4bc2-8333-a8edda751a80", | ||
"scanStatus": "Queued", | ||
"scanStatusMessage": "The scan request has been queued for scanning" | ||
} | ||
} | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...osoft.Security/preview/2024-10-01-preview/examples/Operations/ListOperations_example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2024-10-01-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"name": "Microsoft.Security/defenderforstoragesettings/read", | ||
"display": { | ||
"provider": "Microsoft Security", | ||
"resource": "DefenderForStorageSettings", | ||
"operation": "Get defenderForStorageSettings", | ||
"description": "Gets the defenderforstoragesettings for the scope" | ||
}, | ||
"origin": "user" | ||
}, | ||
{ | ||
"name": "Microsoft.Security/defenderforstoragesettings/write", | ||
"display": { | ||
"provider": "Microsoft Security", | ||
"resource": "DefenderForStorageSettings", | ||
"operation": "Update defenderForStorageSettings", | ||
"description": "Creates or updates the defenderforstoragesettings for the scope" | ||
}, | ||
"origin": "user" | ||
}, | ||
{ | ||
"name": "Microsoft.Security/defenderforstoragesettings/delete", | ||
"display": { | ||
"provider": "Microsoft Security", | ||
"resource": "DefenderForStorageSettings", | ||
"operation": "Delete defenderForStorageSettings", | ||
"description": "Deletes the defenderforstoragesettings for the scope" | ||
}, | ||
"origin": "user" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
...n/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/operations.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Microsoft Defender for Cloud", | ||
"description": "API spec for Microsoft.Security (Microsoft Defender for Cloud) resource provider", | ||
"version": "2024-10-01-preview" | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"flow": "implicit", | ||
"description": "Azure Active Directory OAuth2 Flow", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/providers/Microsoft.Security/operations": { | ||
"get": { | ||
"x-ms-examples": { | ||
"List the operations for the Microsoft.Security (Microsoft Defender for Cloud) resource provider": { | ||
"$ref": "./examples/Operations/ListOperations_example.json" | ||
} | ||
}, | ||
"tags": [ | ||
"Operations" | ||
], | ||
"description": "Exposes all available operations for discovery purposes.", | ||
"operationId": "Operations_List", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/OperationListResult" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters