From 6c1e041c08a7b2475b7e807b0c2a813cf77dcf89 Mon Sep 17 00:00:00 2001 From: brpanask Date: Fri, 15 May 2020 16:02:11 -0400 Subject: [PATCH] Add async operation's api to storage cache RP --- .../examples/AscOperations_Get.json | 20 ++++ .../stable/2020-03-01/storagecache.json | 98 +++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2020-03-01/examples/AscOperations_Get.json diff --git a/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2020-03-01/examples/AscOperations_Get.json b/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2020-03-01/examples/AscOperations_Get.json new file mode 100644 index 000000000000..783476d2d00e --- /dev/null +++ b/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2020-03-01/examples/AscOperations_Get.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60", + "location": "West US", + "operationId": "testoperationid", + "api-version": "2020-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/id/locations/westus/ascOperations/testoperationid", + "name": "testoperationid", + "startTime": "2020-03-01T13:13:13.933Z", + "endTime": "2020-03-01T16:13:13.933Z", + "status": "Succeeded" + } + } + } +} diff --git a/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2020-03-01/storagecache.json b/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2020-03-01/storagecache.json index 3549bc83126f..2e1cdcb3872d 100644 --- a/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2020-03-01/storagecache.json +++ b/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2020-03-01/storagecache.json @@ -158,6 +158,59 @@ "operationId": "UsageModels_List" } }, + "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/ascOperations/{operationId}": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The region name which the operation will lookup into." + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The operation id which uniquely identifies the asynchronous operation." + } + ], + "responses": { + "200": { + "description": "Gets the status of an asynchronous operation for the Azure HPC cache", + "schema": { + "$ref": "#/definitions/AscOperation" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "AscOperations_Get": { + "$ref": "./examples/AscOperations_Get.json" + } + }, + "tags": [ + "AscOperations" + ], + "description": "Gets the status of an asynchronous operation for the Azure HPC cache", + "operationId": "AscOperations_Get" + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/caches": { "get": { "produces": [ @@ -1097,6 +1150,51 @@ }, "type": "object" }, + "AscOperation": { + "description": "The status of operation.", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The operation Id." + }, + "name": { + "type": "string", + "description": "The operation name." + }, + "startTime": { + "type": "string", + "description": "The start time of the operation." + }, + "endTime": { + "type": "string", + "description": "The end time of the operation." + }, + "status": { + "type": "string", + "description": "The status of the operation." + }, + "error": { + "type": "object", + "description": "The error detail of the operation if any.", + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, "Cache": { "description": "A Cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md", "properties": {