From 697d0fcc7cb65998b2dc60860fb6e0499831a324 Mon Sep 17 00:00:00 2001 From: Assaf Akrabi Date: Mon, 28 Oct 2024 12:36:27 +0200 Subject: [PATCH] Add Swagger for Defender for Storage new on-demand malware scan API (#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 --- .../defenderForStorageSettings.json | 476 ++++++++++++++++++ .../CancelMalwareScan_example.json | 19 + ...GetDefenderForStorageSettings_example.json | 30 ++ .../GetMalwareScan_example.json | 29 ++ ...PutDefenderForStorageSettings_example.json | 80 +++ .../StartMalwareScan_example.json | 18 + .../Operations/ListOperations_example.json | 43 ++ .../2024-10-01-preview/operations.json | 74 +++ .../security/resource-manager/readme.md | 12 +- 9 files changed, 780 insertions(+), 1 deletion(-) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/defenderForStorageSettings.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/CancelMalwareScan_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/GetDefenderForStorageSettings_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/GetMalwareScan_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/PutDefenderForStorageSettings_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/StartMalwareScan_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/Operations/ListOperations_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/operations.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/defenderForStorageSettings.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/defenderForStorageSettings.json new file mode 100644 index 000000000000..20ebdd1dfe6e --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/defenderForStorageSettings.json @@ -0,0 +1,476 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) 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": { + "/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}": { + "get": { + "x-ms-examples": { + "Gets the Defender for Storage settings for the specified resource.": { + "$ref": "./examples/DefenderForStorage/GetDefenderForStorageSettings_example.json" + } + }, + "tags": [ + "DefenderForStorage" + ], + "description": "Gets the Defender for Storage settings for the specified storage account.", + "operationId": "DefenderForStorage_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceId" + }, + { + "$ref": "#/parameters/DefenderForStorageSettingName" + } + ], + "responses": { + "200": { + "description": "Successful request to get Defender for Storage settings.", + "schema": { + "$ref": "#/definitions/DefenderForStorageSetting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "put": { + "x-ms-examples": { + "Creates or updates the Defender for Storage settings on a specified resource.": { + "$ref": "./examples/DefenderForStorage/PutDefenderForStorageSettings_example.json" + } + }, + "tags": [ + "DefenderForStorage" + ], + "description": "Creates or updates the Defender for Storage settings on a specified storage account.", + "operationId": "DefenderForStorage_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceId" + }, + { + "$ref": "#/parameters/DefenderForStorageSettingName" + }, + { + "$ref": "#/parameters/DefenderForStorageSetting" + } + ], + "responses": { + "200": { + "description": "Successful request to create or update Defender for Storage settings.", + "schema": { + "$ref": "#/definitions/DefenderForStorageSetting" + } + }, + "201": { + "description": "Request to create or update Defender for Storage settings partially succeeded.", + "schema": { + "$ref": "#/definitions/DefenderForStorageSetting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}/startMalwareScan": { + "post": { + "x-ms-examples": { + "Initiate a Defender for Storage malware scan for the specified storage account.": { + "$ref": "./examples/DefenderForStorage/StartMalwareScan_example.json" + } + }, + "tags": [ + "DefenderForStorage", + "Antimalware", + "Scan" + ], + "description": "Initiate a Defender for Storage malware scan for the specified storage account.", + "operationId": "DefenderForStorage_StartMalwareScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceId" + }, + { + "$ref": "#/parameters/DefenderForStorageSettingName" + } + ], + "responses": { + "200": { + "description": "The status of the malware scan operation.", + "schema": { + "$ref": "#/definitions/MalwareScan" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}/malwareScans/{scanId}/cancelMalwareScan": { + "post": { + "x-ms-examples": { + "Cancel a Defender for Storage malware scan for the specified storage resource.": { + "$ref": "./examples/DefenderForStorage/CancelMalwareScan_example.json" + } + }, + "tags": [ + "DefenderForStorage", + "Antimalware", + "Scan" + ], + "description": "Cancels a Defender for Storage malware scan for the specified storage account.", + "operationId": "DefenderForStorage_CancelMalwareScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceId" + }, + { + "$ref": "#/parameters/DefenderForStorageSettingName" + }, + { + "$ref": "#/parameters/ScanId" + } + ], + "responses": { + "200": { + "description": "The status of the malware scan operation.", + "schema": { + "$ref": "#/definitions/MalwareScan" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/{resourceId}/providers/Microsoft.Security/defenderForStorageSettings/{settingName}/malwareScans/{scanId}": { + "get": { + "x-ms-examples": { + "Gets the Defender for Storage malware scan for the specified storage resource.": { + "$ref": "./examples/DefenderForStorage/GetMalwareScan_example.json" + } + }, + "tags": [ + "DefenderForStorage", + "Antimalware", + "Scan" + ], + "description": "Gets the Defender for Storage malware scan for the specified storage resource.", + "operationId": "DefenderForStorage_GetMalwareScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceId" + }, + { + "$ref": "#/parameters/DefenderForStorageSettingName" + }, + { + "$ref": "#/parameters/ScanId" + } + ], + "responses": { + "200": { + "description": "The state of the malware scan operation.", + "schema": { + "$ref": "#/definitions/MalwareScan" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "DefenderForStorageSetting": { + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DefenderForStorageSettingProperties" + } + }, + "description": "The Defender for Storage resource." + }, + "DefenderForStorageSettingProperties": { + "type": "object", + "properties": { + "isEnabled": { + "type": "boolean", + "description": "Indicates whether Defender for Storage is enabled on this storage account." + }, + "malwareScanning": { + "$ref": "#/definitions/MalwareScanningProperties" + }, + "sensitiveDataDiscovery": { + "$ref": "#/definitions/SensitiveDataDiscoveryProperties" + }, + "overrideSubscriptionLevelSettings": { + "type": "boolean", + "description": "Indicates whether the settings defined for this storage account should override the settings defined for the subscription." + } + }, + "description": "Defender for Storage resource properties." + }, + "MalwareScanningProperties": { + "type": "object", + "properties": { + "onUpload": { + "$ref": "#/definitions/OnUploadProperties" + }, + "scanResultsEventGridTopicResourceId": { + "type": "string", + "description": "Optional. Resource id of an Event Grid Topic to send scan results to." + }, + "operationStatus": { + "type": "object", + "$ref": "#/definitions/OperationStatus", + "readOnly": true, + "description": "Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation." + } + }, + "description": "Properties of Malware Scanning." + }, + "OnUploadProperties": { + "type": "object", + "properties": { + "isEnabled": { + "type": "boolean", + "description": "Indicates whether On Upload malware scanning should be enabled." + }, + "capGBPerMonth": { + "type": "integer", + "format": "int32", + "description": "Defines the max GB to be scanned per Month. Set to -1 if no capping is needed." + } + }, + "description": "Properties of On Upload malware scanning." + }, + "SensitiveDataDiscoveryProperties": { + "type": "object", + "properties": { + "isEnabled": { + "type": "boolean", + "description": "Indicates whether Sensitive Data Discovery should be enabled." + }, + "operationStatus": { + "type": "object", + "$ref": "#/definitions/OperationStatus", + "readOnly": true, + "description": "Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation." + } + }, + "description": "Properties of Sensitive Data Discovery." + }, + "OperationStatus": { + "type": "object", + "description": "A status describing the success/failure of the enablement/disablement operation.", + "properties": { + "code": { + "type": "string", + "description": "The operation status code." + }, + "message": { + "type": "string", + "description": "Additional information regarding the success/failure of the operation." + } + } + }, + "MalwareScan": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/MalwareScanProperties" + } + }, + "description": "Describes the state of a malware scan operation." + }, + "MalwareScanProperties": { + "type": "object", + "properties": { + "scanId": { + "type": "string", + "description": "The identifier of the scan." + }, + "scanStatus": { + "type": "string", + "description": "A status code of the scan operation." + }, + "scanStatusMessage": { + "type": "string", + "description": "A description of the status of the scan." + }, + "scanStartTime": { + "type": "string", + "description": "The time at which the scan had been initiated." + }, + "scanEndTime": { + "type": "string", + "description": "The time at which the scan has ended. Only available for a scan which has terminated." + }, + "scanSummary": { + "type": "object", + "$ref": "#/definitions/ScanSummary", + "description": "A summary of the scan results." + } + } + }, + "ScanSummary": { + "type": "object", + "description": "A summary of the scan results.", + "properties": { + "blobs": { + "type": "object", + "$ref": "#/definitions/BlobsScanSummary", + "description": "A summary of the scan results of the blobs that were scanned." + }, + "estimatedScanCostUSD": { + "type": "number", + "format": "double", + "description": "The estimated cost of the scan. Only available for a scan which has terminated." + } + } + }, + "BlobsScanSummary": { + "type": "object", + "description": "A summary of the scan results of the blobs that were scanned.", + "properties": { + "totalBlobsScanned": { + "type": "integer", + "format": "int64", + "description": "The total number of blobs that were scanned." + }, + "maliciousBlobsCount": { + "type": "integer", + "format": "int64", + "description": "The number of malicious blobs that were detected during the scan." + }, + "skippedBlobsCount": { + "type": "integer", + "format": "int64", + "description": "The number of blobs that were skipped." + }, + "scannedBlobsInGB": { + "type": "number", + "format": "double", + "description": "The number of gigabytes of data that were scanned." + } + } + } + }, + "parameters": { + "DefenderForStorageSettingName": { + "name": "settingName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-z][a-z0-9]*$", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "settingName", + "modelAsString": true, + "values": [ + { + "value": "current", + "description": "Name of the Defender for Storage Settings name." + } + ] + }, + "description": "Defender for Storage setting name.", + "x-ms-parameter-location": "method" + }, + "DefenderForStorageSetting": { + "name": "defenderForStorageSetting", + "in": "body", + "required": true, + "description": "Defender for Storage Settings", + "schema": { + "$ref": "#/definitions/DefenderForStorageSetting" + }, + "x-ms-parameter-location": "method" + }, + "ScanId": { + "name": "scanId", + "in": "path", + "required": true, + "type": "string", + "pattern": "^(latest|[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})$", + "description": "The identifier of the scan. Can be either 'latest' or a GUID.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/CancelMalwareScan_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/CancelMalwareScan_example.json new file mode 100644 index 000000000000..ae4bc92b81a3 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/CancelMalwareScan_example.json @@ -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" + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/GetDefenderForStorageSettings_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/GetDefenderForStorageSettings_example.json new file mode 100644 index 000000000000..04e14ec48bc3 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/GetDefenderForStorageSettings_example.json @@ -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 + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/GetMalwareScan_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/GetMalwareScan_example.json new file mode 100644 index 000000000000..757e01e44a94 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/GetMalwareScan_example.json @@ -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 + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/PutDefenderForStorageSettings_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/PutDefenderForStorageSettings_example.json new file mode 100644 index 000000000000..379632b7ed48 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/PutDefenderForStorageSettings_example.json @@ -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 + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/StartMalwareScan_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/StartMalwareScan_example.json new file mode 100644 index 000000000000..0b9990c9d7e5 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/DefenderForStorage/StartMalwareScan_example.json @@ -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" + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/Operations/ListOperations_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/Operations/ListOperations_example.json new file mode 100644 index 000000000000..3b155971e613 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/examples/Operations/ListOperations_example.json @@ -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" + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/operations.json b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/operations.json new file mode 100644 index 000000000000..27ad6fe10600 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2024-10-01-preview/operations.json @@ -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" + } + } + } + } +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index c590d0d7c1a8..8af5c1af91bd 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -99,13 +99,23 @@ These are the global settings for the Security API. title: SecurityCenter description: API spec for Microsoft.Security (Azure Security Center) resource provider openapi-type: arm -tag: package-composite-v3 +tag: package-preview-2024-10 ``` ### Composite packages The following packages may be composed from multiple api-versions. +### Tag: package-preview-2024-10 + +These settings apply only when `--tag=package-preview-2024-10` is specified on the command line. + +```yaml $(tag) == 'package-preview-2024-10' +input-file: + - Microsoft.Security/preview/2024-10-01-preview/defenderForStorageSettings.json + - Microsoft.Security/preview/2024-10-01-preview/operations.json +``` + ### Tag: package-2024-08 These settings apply only when `--tag=package-2024-08` is specified on the command line.