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,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."
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{

Check notice on line 1 in specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/operationResults.json

View workflow job for this annotation

GitHub Actions / TypeSpec Requirement

Your service description will soon be required to convert from OpenAPI to TypeSpec. See https://aka.ms/azsdk/typespec.
"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": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When reading the operation resource entity, the status code should always be 200. The response payload indicates if the async operation is still running or has completed (successfully or with a failure).

See here:
https://github.com/cloud-and-ai-microsoft/resource-provider-contract/blob/master/v1.0/async-api-reference.md#asynchronous-operations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the table at https://github.com/cloud-and-ai-microsoft/resource-provider-contract/blob/master/v1.0/async-api-reference.md#example-flow
operation results has 202 and Location, RetryAfter support. tried to map it again and updated the PR accordingly

"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"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{

Check notice on line 1 in specification/security/resource-manager/Microsoft.Security/preview/2025-10-01-preview/operationStatuses.json

View workflow job for this annotation

GitHub Actions / TypeSpec Requirement

Your service description will soon be required to convert from OpenAPI to TypeSpec. See https://aka.ms/azsdk/typespec.
"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"
}
}
}
}
}
}
}
Loading
Loading