Skip to content

Commit

Permalink
Microsoft.RecommendationsService: Add a new custom action (#5363)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
yosal authored Nov 11, 2021
1 parent e352d7a commit 4ed9e32
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"resourceGroupName": "rg",
"accountName": "sampleAccount"
},
"responses": {
"200": {
"body": {
"scopesStatuses": [
{
"scope": "modeling1",
"statuses": [
{
"stage": "DataAccess",
"status": "Success",
"time": "2021-08-31T17:15:31.2485861Z"
},
{
"stage": "DataValidation",
"status": "Failed",
"time": "2021-08-31T17:16:31.2485861Z"
},
{
"stage": "Model",
"status": "Pending",
"time": "2021-08-31T17:17:31.2485861Z"
}
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"resourceGroupName": "rg",
"accountName": "sampleAccount"
},
"responses": {
"200": {
"body": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,48 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecommendationsService/accounts/{accountName}/status": {
"post": {
"operationId": "Accounts_GetStatus",
"description": "Returns RecommendationsService Account status.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/AccountNameParameter"
}
],
"responses": {
"200": {
"description": "The status of the account.",
"schema": {
"$ref": "#/definitions/AccountStatus"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Get RecommendationsService Account status - Modeling resource exists": {
"$ref": "./examples/Accounts_GetStatus_ModelingExists.json"
},
"Get account status - no Modeling resource exists": {
"$ref": "./examples/Accounts_GetStatus_NoModelingExists.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecommendationsService/accounts/{accountName}/modeling": {
"get": {
"operationId": "Modeling_ListByAccountResource",
Expand Down Expand Up @@ -1301,6 +1343,55 @@
"$ref": "#/definitions/Tags"
}
}
},
"AccountStatus": {
"description": "Account status.",
"type": "object",
"properties": {
"scopesStatuses": {
"description": "The list of scopes statuses.",
"type": "array",
"items": {
"$ref": "#/definitions/ScopeStatuses"
}
}
}
},
"ScopeStatuses": {
"description": "Scope statuses.",
"type": "object",
"properties": {
"scope": {
"description": "The scope that the statuses refers to.",
"type": "string"
},
"statuses": {
"description": "Scope stage statuses.",
"type": "array",
"items": {
"$ref": "#/definitions/StageStatus"
}
}
}
},
"StageStatus": {
"description": "Stage status.",
"type": "object",
"properties": {
"stage": {
"description": "The stage name.",
"type": "string"
},
"status": {
"description": "The status of the stage.",
"type": "string"
},
"time": {
"description": "The time of the status.",
"type": "string",
"format": "date-time"
}
}
}
},
"parameters": {
Expand Down

0 comments on commit 4ed9e32

Please sign in to comment.