From 0bc701c49de8ea0f3387c92b2e27a91719aa8826 Mon Sep 17 00:00:00 2001 From: Vipul Hattiwale <49791946+vipulha@users.noreply.github.com> Date: Wed, 26 Jun 2019 17:15:48 +0530 Subject: [PATCH] Add start & shutdown Hana APIs to swagger spec. (#6428) * Add Start & Shutdown APIs to HanaOnAzure Swagger spec. * Add Start & Shutdown APIs to HanaOnAzure Swagger spec. * Update the example description * Add default response. --- .../examples/HanaInstances_Shutdown.json | 12 ++ .../examples/HanaInstances_Start.json | 12 ++ .../2017-11-03-preview/hanaonazure.json | 104 ++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/HanaInstances_Shutdown.json create mode 100644 specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/HanaInstances_Start.json diff --git a/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/HanaInstances_Shutdown.json b/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/HanaInstances_Shutdown.json new file mode 100644 index 000000000000..ecfa2c7e10c3 --- /dev/null +++ b/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/HanaInstances_Shutdown.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2017-11-03-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "hanaInstanceName": "myHanaInstance" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/HanaInstances_Start.json b/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/HanaInstances_Start.json new file mode 100644 index 000000000000..ecfa2c7e10c3 --- /dev/null +++ b/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/HanaInstances_Start.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2017-11-03-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "hanaInstanceName": "myHanaInstance" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/hanaonazure.json b/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/hanaonazure.json index 4937fc445a20..4c30a097377c 100644 --- a/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/hanaonazure.json +++ b/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/hanaonazure.json @@ -377,6 +377,110 @@ }, "202": { "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/start": { + "post": { + "tags": [ + "HanaOnAzure" + ], + "operationId": "HanaInstances_Start", + "x-ms-long-running-operation": true, + "description": "The operation to start a SAP HANA instance.", + "x-ms-examples": { + "Start a HANA instance": { + "$ref": "./examples/HanaInstances_Start.json" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/HanaInstanceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown": { + "post": { + "tags": [ + "HanaOnAzure" + ], + "operationId": "HanaInstances_Shutdown", + "x-ms-long-running-operation": true, + "description": "The operation to shutdown a SAP HANA instance.", + "x-ms-examples": { + "Shutdown a HANA instance": { + "$ref": "./examples/HanaInstances_Shutdown.json" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/HanaInstanceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } } }