Skip to content

Commit 4ed9e32

Browse files
authored
Microsoft.RecommendationsService: Add a new custom action (#5363)
* Add a new custom action which returns the current status of the IR account * Add newline in the end of the files * Removed vscode dir * Fixed Json using Prettier * add a missing description to the object * moved description to be first property in the object * Fixed typo
1 parent e352d7a commit 4ed9e32

File tree

3 files changed

+140
-0
lines changed

3 files changed

+140
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-02-01-preview",
4+
"subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
5+
"resourceGroupName": "rg",
6+
"accountName": "sampleAccount"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"scopesStatuses": [
12+
{
13+
"scope": "modeling1",
14+
"statuses": [
15+
{
16+
"stage": "DataAccess",
17+
"status": "Success",
18+
"time": "2021-08-31T17:15:31.2485861Z"
19+
},
20+
{
21+
"stage": "DataValidation",
22+
"status": "Failed",
23+
"time": "2021-08-31T17:16:31.2485861Z"
24+
},
25+
{
26+
"stage": "Model",
27+
"status": "Pending",
28+
"time": "2021-08-31T17:17:31.2485861Z"
29+
}
30+
]
31+
}
32+
]
33+
}
34+
}
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-02-01-preview",
4+
"subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
5+
"resourceGroupName": "rg",
6+
"accountName": "sampleAccount"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {}
11+
}
12+
}
13+
}

specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/recommendationsservice.json

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,48 @@
349349
}
350350
}
351351
},
352+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecommendationsService/accounts/{accountName}/status": {
353+
"post": {
354+
"operationId": "Accounts_GetStatus",
355+
"description": "Returns RecommendationsService Account status.",
356+
"parameters": [
357+
{
358+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
359+
},
360+
{
361+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
362+
},
363+
{
364+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
365+
},
366+
{
367+
"$ref": "#/parameters/AccountNameParameter"
368+
}
369+
],
370+
"responses": {
371+
"200": {
372+
"description": "The status of the account.",
373+
"schema": {
374+
"$ref": "#/definitions/AccountStatus"
375+
}
376+
},
377+
"default": {
378+
"description": "Error response describing why the operation failed.",
379+
"schema": {
380+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
381+
}
382+
}
383+
},
384+
"x-ms-examples": {
385+
"Get RecommendationsService Account status - Modeling resource exists": {
386+
"$ref": "./examples/Accounts_GetStatus_ModelingExists.json"
387+
},
388+
"Get account status - no Modeling resource exists": {
389+
"$ref": "./examples/Accounts_GetStatus_NoModelingExists.json"
390+
}
391+
}
392+
}
393+
},
352394
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecommendationsService/accounts/{accountName}/modeling": {
353395
"get": {
354396
"operationId": "Modeling_ListByAccountResource",
@@ -1301,6 +1343,55 @@
13011343
"$ref": "#/definitions/Tags"
13021344
}
13031345
}
1346+
},
1347+
"AccountStatus": {
1348+
"description": "Account status.",
1349+
"type": "object",
1350+
"properties": {
1351+
"scopesStatuses": {
1352+
"description": "The list of scopes statuses.",
1353+
"type": "array",
1354+
"items": {
1355+
"$ref": "#/definitions/ScopeStatuses"
1356+
}
1357+
}
1358+
}
1359+
},
1360+
"ScopeStatuses": {
1361+
"description": "Scope statuses.",
1362+
"type": "object",
1363+
"properties": {
1364+
"scope": {
1365+
"description": "The scope that the statuses refers to.",
1366+
"type": "string"
1367+
},
1368+
"statuses": {
1369+
"description": "Scope stage statuses.",
1370+
"type": "array",
1371+
"items": {
1372+
"$ref": "#/definitions/StageStatus"
1373+
}
1374+
}
1375+
}
1376+
},
1377+
"StageStatus": {
1378+
"description": "Stage status.",
1379+
"type": "object",
1380+
"properties": {
1381+
"stage": {
1382+
"description": "The stage name.",
1383+
"type": "string"
1384+
},
1385+
"status": {
1386+
"description": "The status of the stage.",
1387+
"type": "string"
1388+
},
1389+
"time": {
1390+
"description": "The time of the status.",
1391+
"type": "string",
1392+
"format": "date-time"
1393+
}
1394+
}
13041395
}
13051396
},
13061397
"parameters": {

0 commit comments

Comments
 (0)