diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2025-05-01-preview/examples/View_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2025-05-01-preview/examples/View_example.json new file mode 100644 index 000000000000..23f10ed09bc0 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2025-05-01-preview/examples/View_example.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2025-05-01-preview", + "parameters": { + "scopes": [ + "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6", + "/subscriptions/8e22af33-2b2b-4f43-be9a-82aae2f0c2b5/resourcegroups/cus-test-platform/providers/Microsoft.Security/securityConnectors/TestNotifications" + ], + "scenarioName": "secureScopre/cloudInitiativeMetrics", + "scenarioParameters": { + "startDateTime": "2025-05-06T07:06:02.280Z" + } + } + }, + "responses": { + "200": { + "body": { + "scenarioResult": { + "overtimeMetrics": { + "type": "overtimeMetricsResponse", + "properties": { + "overtimeMetrics": { + "secureScoreOverTime": [ + { + "values": [ + 95.44, + 93.15, + 95.28, + 95.3, + 81.83, + 59.89, + 41.92, + 40.81, + 0, + 0, + 88.86, + 0, + 66.02, + 49.55 + ], + "dates": [ + "2025-04-29T00:00:00Z", + "2025-04-28T00:00:00Z", + "2025-04-27T00:00:00Z", + "2025-04-26T00:00:00Z", + "2025-04-24T00:00:00Z", + "2025-04-23T00:00:00Z", + "2025-04-21T00:00:00Z", + "2025-04-19T00:00:00Z", + "2025-04-18T00:00:00Z", + "2025-04-16T00:00:00Z", + "2025-04-14T00:00:00Z", + "2025-04-13T00:00:00Z", + "2025-04-12T00:00:00Z", + "2025-04-10T00:00:00Z" + ] + } + ] + } + } + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2025-05-01-preview/view.json b/specification/security/resource-manager/Microsoft.Security/preview/2025-05-01-preview/view.json new file mode 100644 index 000000000000..27a87da6a8ab --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2025-05-01-preview/view.json @@ -0,0 +1,176 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft Defender for Cloud", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2025-05-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/view": { + "post": { + "tags": [ + "View" + ], + "description": "Fetch Microsoft Defender for Cloud data over a specified view", + "operationId": "View", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "name": "parameters", + "in": "body", + "schema": { + "$ref": "#/definitions/ParametersSchema" + }, + "description": "Additional parameters supplied to the operation." + } + ], + "responses": { + "200": { + "description": "Result of the query operation", + "schema": { + "$ref": "#/definitions/ScenarioResponse" + } + }, + "default": { + "description": "An error occurred while processing the request. See the error.code parameter to identify the specific error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "View example": { + "$ref": "./examples/View_example.json" + } + } + } + } + }, + "definitions": { + "ParametersSchema": { + "description": "Schema for operation parameters.", + "type": "object", + "properties": { + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of scopes for which the data is requested" + }, + "scenarioName": { + "type": "string", + "description": "The name of the scenario for which the data is requested" + }, + "scenarioParameters": { + "type": "object", + "description": "The parameters for the specified scenario and view" + } + }, + "required": [ + "scopes", + "scenarioName", + "scenarioParameters" + ] + }, + "ScenarioResponse": { + "description": "Query result.", + "type": "object", + "properties": { + "scenarioResult": { + "type": "object", + "description": "The result of the query operation." + } + } + }, + "ErrorResponse": { + "title": "Error response.", + "type": "object", + "description": "An error response from the API.", + "properties": { + "error": { + "$ref": "#/definitions/Error", + "description": "Error information." + } + }, + "required": [ + "error" + ] + }, + "Error": { + "title": "Error info.", + "type": "object", + "description": "Error details.", + "properties": { + "code": { + "type": "string", + "description": "Error code identifying the specific error." + }, + "message": { + "type": "string", + "description": "A human readable error message." + }, + "details": { + "type": "array", + "description": "Error details", + "items": { + "$ref": "#/definitions/ErrorDetails" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "code", + "message" + ] + }, + "ErrorDetails": { + "title": "Error details.", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error code identifying the specific error." + }, + "message": { + "type": "string", + "description": "A human readable error message." + } + }, + "required": [ + "code", + "message" + ] + } + } +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 84af9f227181..0dda9952959b 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -106,6 +106,15 @@ tag: package-composite-v3 The following packages may be composed from multiple api-versions. +### Tag: package-preview-2025-05 + +These settings apply only when `--tag=package-preview-2025-05` is specified on the command line. + +```yaml $(tag) == 'package-preview-2025-05' +input-file: + - Microsoft.Security/preview/2025-05-01-preview/view.json +``` + ### Tag: package-2025-03 These settings apply only when `--tag=package-2025-03` is specified on the command line. @@ -579,6 +588,7 @@ input-file: - Microsoft.Security/preview/2023-12-01-preview/securityContacts.json - Microsoft.Security/preview/2024-08-01-preview/securityConnectors.json - Microsoft.Security/preview/2024-10-01-preview/operations.json +- Microsoft.Security/preview/2025-05-01-preview/view.json - Microsoft.Security/stable/2017-08-01/complianceResults.json - Microsoft.Security/stable/2019-01-01/advancedThreatProtectionSettings.json - Microsoft.Security/stable/2019-08-01/deviceSecurityGroups.json