Skip to content

Commit 4f3d4fe

Browse files
author
Ami Hollander
committed
operation results and statuses
1 parent 50ac73c commit 4f3d4fe

File tree

5 files changed

+328
-0
lines changed

5 files changed

+328
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
4+
"location": "eastus",
5+
"operationId": "00000000-0000-0000-0000-000000000000",
6+
"api-version": "2025-10-01-preview"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {
11+
"headers": {
12+
"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",
13+
"Retry-After": "10"
14+
}
15+
},
16+
"204": {},
17+
"default": {
18+
"body": {
19+
"error": {
20+
"code": "OperationNotFound",
21+
"message": "The requested operation was not found.",
22+
"target": "operationId",
23+
"details": [
24+
{
25+
"code": "InvalidOperationId",
26+
"message": "The operation ID '00000000-0000-0000-0000-000000000000' does not exist or has expired."
27+
}
28+
]
29+
}
30+
}
31+
}
32+
}
33+
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
4+
"location": "eastus",
5+
"operationId": "00000000-0000-0000-0000-000000000000",
6+
"api-version": "2025-10-01-preview"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/eastus/operationStatuses/00000000-0000-0000-0000-000000000000",
12+
"name": "00000000-0000-0000-0000-000000000000",
13+
"status": "Succeeded",
14+
"startTime": "2025-10-01T10:00:00.000Z",
15+
"endTime": "2025-10-01T10:05:00.000Z",
16+
"percentComplete": 100.0
17+
},
18+
"description": "Status: Succeeded"
19+
},
20+
"default": {
21+
"body": {
22+
"error": {
23+
"code": "OperationNotFound",
24+
"message": "The requested operation was not found.",
25+
"target": "operationId",
26+
"details": [
27+
{
28+
"code": "InvalidOperationId",
29+
"message": "The operation ID does not exist or has expired."
30+
}
31+
]
32+
}
33+
}
34+
}
35+
},
36+
"examples": {
37+
"InProgress": {
38+
"parameters": {
39+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
40+
"location": "eastus",
41+
"operationId": "11111111-1111-1111-1111-111111111111",
42+
"api-version": "2025-10-01-preview"
43+
},
44+
"responses": {
45+
"200": {
46+
"body": {
47+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/eastus/operationStatuses/11111111-1111-1111-1111-111111111111",
48+
"name": "11111111-1111-1111-1111-111111111111",
49+
"status": "InProgress",
50+
"startTime": "2025-10-01T10:00:00.000Z",
51+
"percentComplete": 45.5
52+
}
53+
}
54+
}
55+
},
56+
"Failed": {
57+
"parameters": {
58+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
59+
"location": "eastus",
60+
"operationId": "22222222-2222-2222-2222-222222222222",
61+
"api-version": "2025-10-01-preview"
62+
},
63+
"responses": {
64+
"200": {
65+
"body": {
66+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/eastus/operationStatuses/22222222-2222-2222-2222-222222222222",
67+
"name": "22222222-2222-2222-2222-222222222222",
68+
"status": "Failed",
69+
"startTime": "2025-10-01T10:00:00.000Z",
70+
"endTime": "2025-10-01T10:02:30.000Z",
71+
"percentComplete": 100.0,
72+
"error": {
73+
"code": "ResourceValidationFailed",
74+
"message": "The resource validation failed with the following error: Invalid configuration provided.",
75+
"target": "privateLink",
76+
"details": [
77+
{
78+
"code": "InvalidParameter",
79+
"message": "The parameter 'groupIds' is invalid.",
80+
"target": "groupIds"
81+
}
82+
]
83+
}
84+
}
85+
}
86+
}
87+
},
88+
"Canceled": {
89+
"parameters": {
90+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
91+
"location": "westus",
92+
"operationId": "33333333-3333-3333-3333-333333333333",
93+
"api-version": "2025-10-01-preview"
94+
},
95+
"responses": {
96+
"200": {
97+
"body": {
98+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westus/operationStatuses/33333333-3333-3333-3333-333333333333",
99+
"name": "33333333-3333-3333-3333-333333333333",
100+
"status": "Canceled",
101+
"startTime": "2025-10-01T09:00:00.000Z",
102+
"endTime": "2025-10-01T09:01:15.000Z",
103+
"percentComplete": 25.0
104+
}
105+
}
106+
}
107+
}
108+
}
109+
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Microsoft Defender for Cloud",
5+
"description": "API spec for Microsoft Defender for Cloud operation results.",
6+
"version": "2025-10-01-preview"
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"security": [
19+
{
20+
"azure_auth": [
21+
"user_impersonation"
22+
]
23+
}
24+
],
25+
"securityDefinitions": {
26+
"azure_auth": {
27+
"type": "oauth2",
28+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
29+
"flow": "implicit",
30+
"description": "Azure Active Directory OAuth2 Flow",
31+
"scopes": {
32+
"user_impersonation": "impersonate your user account"
33+
}
34+
}
35+
},
36+
"paths": {
37+
"/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{location}/operationResults/{operationId}": {
38+
"get": {
39+
"x-ms-examples": {
40+
"Get operation result": {
41+
"$ref": "./examples/OperationResults/GetOperationResult.json"
42+
}
43+
},
44+
"tags": [
45+
"OperationResults"
46+
],
47+
"description": "Returns operation results for long running operations.",
48+
"operationId": "OperationResults_Get",
49+
"parameters": [
50+
{
51+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter"
52+
},
53+
{
54+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/LocationParameter"
55+
},
56+
{
57+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/OperationIdParameter"
58+
},
59+
{
60+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter"
61+
}
62+
],
63+
"responses": {
64+
"200": {
65+
"description": "The operation has completed successfully."
66+
},
67+
"202": {
68+
"description": "The operation is still in progress.",
69+
"headers": {
70+
"Location": {
71+
"description": "URL to query for status of the operation.",
72+
"type": "string"
73+
},
74+
"Retry-After": {
75+
"description": "The recommended number of seconds to wait before calling the URI specified in the Location header.",
76+
"type": "integer",
77+
"format": "int32"
78+
}
79+
}
80+
},
81+
"204": {
82+
"description": "The operation has completed successfully with no content."
83+
},
84+
"default": {
85+
"description": "Error response describing why the operation failed.",
86+
"schema": {
87+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse"
88+
}
89+
}
90+
}
91+
}
92+
}
93+
}
94+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Microsoft Defender for Cloud",
5+
"description": "API spec for Microsoft Defender for Cloud operation statuses.",
6+
"version": "2025-10-01-preview"
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"security": [
19+
{
20+
"azure_auth": [
21+
"user_impersonation"
22+
]
23+
}
24+
],
25+
"securityDefinitions": {
26+
"azure_auth": {
27+
"type": "oauth2",
28+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
29+
"flow": "implicit",
30+
"description": "Azure Active Directory OAuth2 Flow",
31+
"scopes": {
32+
"user_impersonation": "impersonate your user account"
33+
}
34+
}
35+
},
36+
"paths": {
37+
"/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{location}/operationStatuses/{operationId}": {
38+
"get": {
39+
"x-ms-examples": {
40+
"Get operation status": {
41+
"$ref": "./examples/OperationStatuses/GetOperationStatus.json"
42+
}
43+
},
44+
"tags": [
45+
"OperationStatuses"
46+
],
47+
"description": "Get the status of a long running azure asynchronous operation.",
48+
"operationId": "OperationStatuses_Get",
49+
"parameters": [
50+
{
51+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter"
52+
},
53+
{
54+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/LocationParameter"
55+
},
56+
{
57+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/OperationIdParameter"
58+
},
59+
{
60+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter"
61+
}
62+
],
63+
"responses": {
64+
"200": {
65+
"description": "OK. Operation status.",
66+
"schema": {
67+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/OperationStatusResult"
68+
}
69+
},
70+
"default": {
71+
"description": "Error response describing why the operation failed.",
72+
"schema": {
73+
"$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse"
74+
}
75+
}
76+
}
77+
}
78+
}
79+
}
80+
}

specification/security/resource-manager/readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ tag: package-composite-v3
106106
107107
The following packages may be composed from multiple api-versions.
108108
109+
### Tag: package-preview-2025-10-01-preview
110+
111+
These settings apply only when `--tag=package-preview-2025-10-01-preview` is specified on the command line.
112+
113+
```yaml $(tag) == 'package-preview-2025-10-01-preview'
114+
input-file:
115+
- Microsoft.Security/preview/2025-10-01-preview/operationResults.json
116+
- Microsoft.Security/preview/2025-10-01-preview/operationStatuses.json
117+
```
118+
109119
### Tag: package-preview-2025-09-01-preview
110120

111121
These settings apply only when `--tag=package-preview-2025-09-01-preview` is specified on the command line.
@@ -629,6 +639,8 @@ input-file:
629639
- Microsoft.Security/preview/2025-05-04-preview/assessmentMetadata.json
630640
- Microsoft.Security/preview/2025-05-04-preview/assessments.json
631641
- Microsoft.Security/preview/2025-09-01-preview/privateLinks.json
642+
- Microsoft.Security/preview/2025-10-01-preview/operationResults.json
643+
- Microsoft.Security/preview/2025-10-01-preview/operationStatuses.json
632644
- Microsoft.Security/stable/2017-08-01/complianceResults.json
633645
- Microsoft.Security/stable/2019-01-01/advancedThreatProtectionSettings.json
634646
- Microsoft.Security/stable/2019-08-01/deviceSecurityGroups.json

0 commit comments

Comments
 (0)