diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/examples/OperationResults/GetOperationResult.json b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/examples/OperationResults/GetOperationResult.json new file mode 100644 index 000000000000..5c8c3252b8a2 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/examples/OperationResults/GetOperationResult.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "eastus", + "operationId": "00000000-0000-0000-0000-000000000000", + "api-version": "2025-10-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2025-10-01-preview", + "Retry-After": "10" + } + }, + "204": {}, + "default": { + "body": { + "error": { + "code": "OperationNotFound", + "message": "The requested operation was not found.", + "target": "operationId", + "details": [ + { + "code": "InvalidOperationId", + "message": "The operation ID '00000000-0000-0000-0000-000000000000' does not exist or has expired." + } + ] + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/examples/OperationStatuses/GetOperationStatus.json b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/examples/OperationStatuses/GetOperationStatus.json new file mode 100644 index 000000000000..99a4b679160e --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/examples/OperationStatuses/GetOperationStatus.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "eastus", + "operationId": "00000000-0000-0000-0000-000000000000", + "api-version": "2025-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/eastus/operationStatuses/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000000", + "status": "Succeeded", + "startTime": "2025-10-01T10:00:00.000Z", + "endTime": "2025-10-01T10:05:00.000Z", + "percentComplete": 100.0 + }, + "description": "Status: Succeeded" + }, + "default": { + "body": { + "error": { + "code": "OperationNotFound", + "message": "The requested operation was not found.", + "target": "operationId", + "details": [ + { + "code": "InvalidOperationId", + "message": "The operation ID does not exist or has expired." + } + ] + } + } + } + }, + "examples": { + "InProgress": { + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "eastus", + "operationId": "11111111-1111-1111-1111-111111111111", + "api-version": "2025-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/eastus/operationStatuses/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "status": "InProgress", + "startTime": "2025-10-01T10:00:00.000Z", + "percentComplete": 45.5 + } + } + } + }, + "Failed": { + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "eastus", + "operationId": "22222222-2222-2222-2222-222222222222", + "api-version": "2025-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/eastus/operationStatuses/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "status": "Failed", + "startTime": "2025-10-01T10:00:00.000Z", + "endTime": "2025-10-01T10:02:30.000Z", + "percentComplete": 100.0, + "error": { + "code": "ResourceValidationFailed", + "message": "The resource validation failed with the following error: Invalid configuration provided.", + "target": "privateLink", + "details": [ + { + "code": "InvalidParameter", + "message": "The parameter 'groupIds' is invalid.", + "target": "groupIds" + } + ] + } + } + } + } + }, + "Canceled": { + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "westus", + "operationId": "33333333-3333-3333-3333-333333333333", + "api-version": "2025-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westus/operationStatuses/33333333-3333-3333-3333-333333333333", + "name": "33333333-3333-3333-3333-333333333333", + "status": "Canceled", + "startTime": "2025-10-01T09:00:00.000Z", + "endTime": "2025-10-01T09:01:15.000Z", + "percentComplete": 25.0 + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/examples/Operations/ListOperations_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/examples/Operations/ListOperations_example.json new file mode 100644 index 000000000000..e2700d9b58a2 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/examples/Operations/ListOperations_example.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2025-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/2025-10-01-preview/operationResults.json b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/operationResults.json new file mode 100644 index 000000000000..6ed8a207d68c --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/operationResults.json @@ -0,0 +1,94 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft Defender for Cloud", + "description": "API spec for Microsoft Defender for Cloud operation results.", + "version": "2025-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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{location}/operationResults/{operationId}": { + "get": { + "x-ms-examples": { + "Get operation result": { + "$ref": "./examples/OperationResults/GetOperationResult.json" + } + }, + "tags": [ + "OperationResults" + ], + "description": "Returns operation results for long running operations.", + "operationId": "OperationResults_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/LocationParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/OperationIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The operation has completed successfully." + }, + "202": { + "description": "The operation is still in progress.", + "headers": { + "Location": { + "description": "URL to query for status of the operation.", + "type": "string" + }, + "Retry-After": { + "description": "The recommended number of seconds to wait before calling the URI specified in the Location header.", + "type": "integer", + "format": "int32" + } + } + }, + "204": { + "description": "The operation has completed successfully with no content." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/operationStatuses.json b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/operationStatuses.json new file mode 100644 index 000000000000..bd6ad39af796 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/operationStatuses.json @@ -0,0 +1,80 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft Defender for Cloud", + "description": "API spec for Microsoft Defender for Cloud operation statuses.", + "version": "2025-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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{location}/operationStatuses/{operationId}": { + "get": { + "x-ms-examples": { + "Get operation status": { + "$ref": "./examples/OperationStatuses/GetOperationStatus.json" + } + }, + "tags": [ + "OperationStatuses" + ], + "description": "Get the status of a long running azure asynchronous operation.", + "operationId": "OperationStatuses_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/LocationParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/OperationIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Operation status.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/OperationStatusResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/operations.json b/specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/operations.json new file mode 100644 index 000000000000..6bc622881aae --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2025-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": "2025-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 465aa93d0e1f..b7c002ff2837 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -106,6 +106,17 @@ tag: package-composite-v3 The following packages may be composed from multiple api-versions. +### Tag: package-preview-2025-10-01-preview + +These settings apply only when `--tag=package-preview-2025-10-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-preview-2025-10-01-preview' +input-file: + - Microsoft.Security/preview/2025-10-01-preview/operations.json + - Microsoft.Security/preview/2025-10-01-preview/operationResults.json + - Microsoft.Security/preview/2025-10-01-preview/operationStatuses.json +``` + ### Tag: package-preview-2025-09-01-preview These settings apply only when `--tag=package-preview-2025-09-01-preview` is specified on the command line. @@ -629,6 +640,9 @@ input-file: - Microsoft.Security/preview/2025-05-04-preview/assessmentMetadata.json - Microsoft.Security/preview/2025-05-04-preview/assessments.json - Microsoft.Security/preview/2025-09-01-preview/privateLinks.json +- Microsoft.Security/preview/2025-10-01-preview/operations.json +- Microsoft.Security/preview/2025-10-01-preview/operationResults.json +- Microsoft.Security/preview/2025-10-01-preview/operationStatuses.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 @@ -653,7 +667,6 @@ input-file: - Microsoft.Security/stable/2024-08-01/customRecommedations.json - Microsoft.Security/stable/2025-03-01/securityConnectorsDevOps.json - Microsoft.Security/stable/2025-06-01/defenderForStorageSettings.json -- Microsoft.Security/stable/2025-06-01/operations.json # Autorest suppressions suppressions: