From 555097ecd35b2c0e930750091c74b6ddd3682449 Mon Sep 17 00:00:00 2001 From: Ravindra Kasireddy Date: Thu, 21 Feb 2019 11:37:14 -0800 Subject: [PATCH 1/5] SDK for server restart --- .../2017-12-01/examples/ServerRestart.json | 12 ++++++ .../stable/2017-12-01/mysql.json | 38 +++++++++++++++++++ .../2017-12-01/examples/ServerRestart.json | 12 ++++++ .../stable/2017-12-01/postgresql.json | 38 +++++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/examples/ServerRestart.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerRestart.json diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/examples/ServerRestart.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/examples/ServerRestart.json new file mode 100644 index 000000000000..bc355a010136 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/examples/ServerRestart.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2017-12-01", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": {}, + "202": {} + } + } \ No newline at end of file diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json index 582ae3f83679..3e19aea25756 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json @@ -286,6 +286,44 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/restart": { + "post": { + "tags": [ + "ServerRestart" + ], + "operationId": "Server_Restart", + "x-ms-examples": { + "ServerRestart": { "$ref": "./examples/ServerRestart.json" } + }, + "description": "Restarts a server.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ProviderParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/replicas": { "get": { "tags": [ diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerRestart.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerRestart.json new file mode 100644 index 000000000000..bc355a010136 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerRestart.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2017-12-01", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": {}, + "202": {} + } + } \ No newline at end of file diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json index 622db149a3aa..f10e80a3f823 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json @@ -283,6 +283,44 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/restart": { + "post": { + "tags": [ + "ServerRestart" + ], + "operationId": "Server_Restart", + "x-ms-examples": { + "ServerRestart": { "$ref": "./examples/ServerRestart.json" } + }, + "description": "Restarts a server.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ProviderParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}": { "put": { "tags": [ From ea3fd47083be0750f53afa9c08c58a6d46447fff Mon Sep 17 00:00:00 2001 From: Ravindra Kasireddy Date: Thu, 21 Feb 2019 12:48:47 -0800 Subject: [PATCH 2/5] server restart changes2 --- .../Microsoft.DBforMySQL/stable/2017-12-01/mysql.json | 3 --- .../stable/2017-12-01/postgresql.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json index 3e19aea25756..dc9386f22b66 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json @@ -300,9 +300,6 @@ { "$ref": "#/parameters/ApiVersionParameter" }, - { - "$ref": "#/parameters/ProviderParameter" - }, { "$ref": "#/parameters/SubscriptionIdParameter" }, diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json index f10e80a3f823..ac7555be9d8c 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json @@ -297,9 +297,6 @@ { "$ref": "#/parameters/ApiVersionParameter" }, - { - "$ref": "#/parameters/ProviderParameter" - }, { "$ref": "#/parameters/SubscriptionIdParameter" }, From f4a5bea9460b32f10d02acf8b30e85e775fe3d57 Mon Sep 17 00:00:00 2001 From: Ravindra Kasireddy Date: Fri, 22 Feb 2019 10:53:02 -0800 Subject: [PATCH 3/5] server restart changes 3 --- .../Microsoft.DBforMySQL/stable/2017-12-01/mysql.json | 2 +- .../Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json index dc9386f22b66..90c88c0cfba2 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json @@ -291,7 +291,7 @@ "tags": [ "ServerRestart" ], - "operationId": "Server_Restart", + "operationId": "Servers_Restart", "x-ms-examples": { "ServerRestart": { "$ref": "./examples/ServerRestart.json" } }, diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json index ac7555be9d8c..21ef632fe8a9 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json @@ -288,7 +288,7 @@ "tags": [ "ServerRestart" ], - "operationId": "Server_Restart", + "operationId": "Servers_Restart", "x-ms-examples": { "ServerRestart": { "$ref": "./examples/ServerRestart.json" } }, From 517ef876682c88a58342f72eb583818173e2a335 Mon Sep 17 00:00:00 2001 From: Ravindra Kasireddy Date: Fri, 22 Feb 2019 17:30:59 -0800 Subject: [PATCH 4/5] server restart changes 4 --- .../Microsoft.DBforMySQL/stable/2017-12-01/mysql.json | 6 ++++++ .../stable/2017-12-01/postgresql.json | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json index 90c88c0cfba2..37ff8ec25d62 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json @@ -316,6 +316,12 @@ }, "202": { "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-long-running-operation": true diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json index 21ef632fe8a9..5b712d86861a 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json @@ -313,6 +313,12 @@ }, "202": { "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-long-running-operation": true From ff2dd2a4eb33128c1be0aa26d416b01a046af1e2 Mon Sep 17 00:00:00 2001 From: Ravindra Kasireddy Date: Mon, 25 Feb 2019 16:57:37 -0800 Subject: [PATCH 5/5] server restart changes 5 --- .../stable/2017-12-01/mysql.json | 36 ++++++++++++++++++- .../stable/2017-12-01/postgresql.json | 34 ++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json index 37ff8ec25d62..29e2f1dc6fc1 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2017-12-01/mysql.json @@ -2224,7 +2224,41 @@ "x-ms-client-flatten": true } } - } + }, + "CloudError": { + "x-ms-external": true, + "properties": { + "error": { + "$ref": "#/definitions/CloudErrorBody" + } + }, + "description": "An error response from the Batch service." + }, + "CloudErrorBody": { + "x-ms-external": true, + "properties": { + "code": { + "type": "string", + "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." + }, + "message": { + "type": "string", + "description": "A message describing the error, intended to be suitable for display in a user interface." + }, + "target": { + "type": "string", + "description": "The target of the particular error. For example, the name of the property in error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudErrorBody" + }, + "description": "A list of additional details about the error." + } + }, + "description": "An error response from the Batch service." + } }, "parameters": { "SubscriptionIdParameter": { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json index 5b712d86861a..6c17b50a8be3 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json @@ -2148,6 +2148,40 @@ "x-ms-client-flatten": true } } + }, + "CloudError": { + "x-ms-external": true, + "properties": { + "error": { + "$ref": "#/definitions/CloudErrorBody" + } + }, + "description": "An error response from the Batch service." + }, + "CloudErrorBody": { + "x-ms-external": true, + "properties": { + "code": { + "type": "string", + "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." + }, + "message": { + "type": "string", + "description": "A message describing the error, intended to be suitable for display in a user interface." + }, + "target": { + "type": "string", + "description": "The target of the particular error. For example, the name of the property in error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudErrorBody" + }, + "description": "A list of additional details about the error." + } + }, + "description": "An error response from the Batch service." } }, "parameters": {