diff --git a/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/examples/Accounts_GetStatus_ModelingExists.json b/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/examples/Accounts_GetStatus_ModelingExists.json new file mode 100644 index 000000000000..b67053a9c669 --- /dev/null +++ b/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/examples/Accounts_GetStatus_ModelingExists.json @@ -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" + } + ] + } + ] + } + } + } +} diff --git a/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/examples/Accounts_GetStatus_NoModelingExists.json b/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/examples/Accounts_GetStatus_NoModelingExists.json new file mode 100644 index 000000000000..9444f125ab7d --- /dev/null +++ b/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/examples/Accounts_GetStatus_NoModelingExists.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2021-02-01-preview", + "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "resourceGroupName": "rg", + "accountName": "sampleAccount" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/recommendationsservice.json b/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/recommendationsservice.json index 7e2d2637244c..38788d99686a 100644 --- a/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/recommendationsservice.json +++ b/specification/recommendationsservice/resource-manager/Microsoft.RecommendationsService/preview/2021-02-01-preview/recommendationsservice.json @@ -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", @@ -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": {