From f7448108ed8a3df63f37740570ddc3a7757af6e9 Mon Sep 17 00:00:00 2001 From: Jovana Toroman Date: Mon, 9 Dec 2019 16:55:25 +0100 Subject: [PATCH 01/15] Swahger for canceling MI management operations --- .../ManagedInstanceOperations.json | 358 ++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json new file mode 100644 index 000000000000..8fb51ec914cc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json @@ -0,0 +1,358 @@ +{ + "swagger": "2.0", + "info": { + "version": "2019-06-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel": { + "post": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Cancels the asynchronous operation on the managed instance.", + "operationId": "ManagedInstanceOperations_Cancel", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for cancel has been executed successfully." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-examples": { + "Cancel the managed instance management operation": { + "$ref": "./examples/CancelManagedInstanceOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations": { + "get": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Gets a list of operations performed on the managed instance.", + "operationId": "ManagedInstanceOperations_ListByManagedInstance", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting managed instance operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/ManagedInstanceOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the managed instance management operations": { + "$ref": "./examples/ListManagedInstanceOperations.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceOperationListResult": { + "description": "The response to a list managed instance operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceOperationProperties": { + "description": "The properties of a managed instance operation.", + "type": "object", + "properties": { + "managedInstanceName": { + "description": "The name of the managed instance the operation is being performed on.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "ManagedInstanceOperation": { + "description": "A managed instance operation.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "BlobAuditingPolicyNameParameter": { + "name": "blobAuditingPolicyName", + "in": "path", + "description": "The name of the blob auditing policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineInstanceNameParameter": { + "name": "sqlVirtualMachineInstanceName", + "in": "path", + "description": "The name of the SqlVirtualMachineInstance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineContainerNameParameter": { + "name": "sqlVirtualMachineContainerName", + "in": "path", + "description": "The name of the SqlVirtualMachineContainer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "VirtualClusterNameParameter": { + "name": "virtualClusterName", + "in": "path", + "description": "The name of the virtual cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} \ No newline at end of file From 1e90632463f30333f84aa57f2ec15094f54ba809 Mon Sep 17 00:00:00 2001 From: Jovana Toroman Date: Mon, 9 Dec 2019 17:13:22 +0100 Subject: [PATCH 02/15] Adding examples --- .../ListManagedInstanceOperations.json | 117 +++++++++--------- .../CancelManagedInstanceOperation.json | 20 +++ .../ListManagedInstanceOperations.json | 73 +++++++++++ 3 files changed, 152 insertions(+), 58 deletions(-) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json index 93f89f4eee86..4859b9b5587e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json @@ -7,66 +7,67 @@ }, "responses": { "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", - "name": "11111111-1111-1111-1111-111111111111", - "type": "Microsoft.Sql/managedInstances/operations", - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "MANAGED SERVER UPDATE", - "percentComplete": 0, - "startTime": "2017-06-01T09:10:08.10Z", - "state": "InProgress" - } + "value": [ + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", - "name": "22222222-2222-2222-2222-222222222222", - "type": "Microsoft.Sql/managedInstances/operations", - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "MANAGED SERVER UPDATE", - "percentComplete": 100, - "startTime": "2019-09-23T08:05:28.687Z", - "state": "Succeeded" - } + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 50, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "InProgress", + "isCancellable": true }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333", - "name": "33333333-3333-3333-3333-333333333333", - "type": "Microsoft.Sql/managedInstances/operations", - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "MANAGED SERVER UPDATE", - "percentComplete": 55, - "startTime": "2019-09-23T08:05:28.687Z", - "state": "Failed", - "errorCode": 45157, - "errorDescription": "Server 'testcl' is busy with another operation. Please try your operation later.", - "errorSeverity": 16, - "isUserError": true - } + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T14:48:34.583Z", + "state": "Failed", + "errorCode": 45157, + "errorDescription": "Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later.", + "errorSeverity": 16, + "isUserError": true, + "isCancellable": false }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444", - "name": "44444444-4444-4444-4444-444444444444", - "type": "Microsoft.Sql/managedInstances/operations", - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "MakeAllManagedDatabasesAccessible", - "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE", - "percentComplete": 100, - "startTime": "2017-06-01T09:00:08.10Z", - "state": "Succeeded" - } - } - ] - } + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333", + "name": "33333333-3333-3333-3333-333333333333", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "MakeAllManagedDatabasesAccessible", + "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE", + "percentComplete": 100, + "startTime": "2017-06-01T09:00:08.10Z", + "state": "Succeeded" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444", + "name": "44444444-4444-4444-4444-444444444444", + "type": "Microsoft.Sql/managedInstances/operations" + } + ] } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json new file mode 100644 index 000000000000..4e2a3026be82 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "operationId": "11111111-1111-1111-1111-111111111111", + "api-version": "2019-06-01-preview" + }, + "responses": { + "200": { + "body": "" + }, + "405": { + "error": { + "code": "CannotCancelOperation", + "message": "Cannot cancel management operation '11111111-1111-1111-1111-111111111111' in the current state." + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json new file mode 100644 index 000000000000..4859b9b5587e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "value": [ + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 50, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "InProgress", + "isCancellable": true + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T14:48:34.583Z", + "state": "Failed", + "errorCode": 45157, + "errorDescription": "Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later.", + "errorSeverity": 16, + "isUserError": true, + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333", + "name": "33333333-3333-3333-3333-333333333333", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "MakeAllManagedDatabasesAccessible", + "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE", + "percentComplete": 100, + "startTime": "2017-06-01T09:00:08.10Z", + "state": "Succeeded" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444", + "name": "44444444-4444-4444-4444-444444444444", + "type": "Microsoft.Sql/managedInstances/operations" + } + ] + } + } +} \ No newline at end of file From 4730398fd9d756d246e6c83edd012bf5174498da Mon Sep 17 00:00:00 2001 From: Jovana Toroman Date: Tue, 10 Dec 2019 08:59:59 +0100 Subject: [PATCH 03/15] Fixing swagger file --- .../preview/2019-06-01-preview/ManagedInstanceOperations.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json index 8fb51ec914cc..a347f438db81 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json @@ -355,4 +355,4 @@ } } } -} \ No newline at end of file +} From 73094a42099946e4e89f4e67dd71593e0ed32db6 Mon Sep 17 00:00:00 2001 From: Jovana Toroman Date: Tue, 10 Dec 2019 09:39:39 +0100 Subject: [PATCH 04/15] Runned pretier edit --- .../examples/ListManagedInstanceOperations.json | 2 +- .../examples/CancelManagedInstanceOperation.json | 2 +- .../examples/ListManagedInstanceOperations.json | 2 +- specification/sql/resource-manager/readme.md | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json index 4859b9b5587e..955fea3055f8 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json @@ -70,4 +70,4 @@ ] } } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json index 4e2a3026be82..79e1723321bc 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json @@ -17,4 +17,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json index 4859b9b5587e..955fea3055f8 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json @@ -70,4 +70,4 @@ ] } } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index f1dd994be110..94dade3ea6ce 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -492,6 +492,7 @@ input-file: - ./Microsoft.Sql/preview/2019-06-01-preview/serverOperations.json - ./Microsoft.Sql/preview/2019-06-01-preview/WorkloadGroups.json - ./Microsoft.Sql/preview/2019-06-01-preview/WorkloadClassifiers.json + - ./Microsoft.Sql/preview/2019-06-01-preview/managedInstanceOperations.json # Needed when there is more than one input file override-info: From f70a5e9ccd851a0c2bb223af80aae00ce1cfaf44 Mon Sep 17 00:00:00 2001 From: Jovana Toroman Date: Tue, 10 Dec 2019 10:41:58 +0100 Subject: [PATCH 05/15] Modifing examples --- .../ListManagedInstanceOperations.json | 118 +++++++++--------- .../CancelManagedInstanceOperation.json | 6 - .../ListManagedInstanceOperations.json | 118 +++++++++--------- 3 files changed, 120 insertions(+), 122 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json index 955fea3055f8..82409de378c6 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ListManagedInstanceOperations.json @@ -7,67 +7,69 @@ }, "responses": { "200": { - "value": [ - { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "UPDATE MANAGED SERVER", - "percentComplete": 100, - "startTime": "2019-12-06T11:08:44.49Z", - "state": "Cancelled", - "isCancellable": false + "body": { + "value": [ + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", - "name": "11111111-1111-1111-1111-111111111111", - "type": "Microsoft.Sql/managedInstances/operations" - }, - { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "UPDATE MANAGED SERVER", - "percentComplete": 50, - "startTime": "2019-12-06T11:08:44.49Z", - "state": "InProgress", - "isCancellable": true + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 50, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "InProgress", + "isCancellable": true + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.Sql/managedInstances/operations" }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", - "name": "22222222-2222-2222-2222-222222222222", - "type": "Microsoft.Sql/managedInstances/operations" - }, - { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "UPDATE MANAGED SERVER", - "percentComplete": 100, - "startTime": "2019-12-06T14:48:34.583Z", - "state": "Failed", - "errorCode": 45157, - "errorDescription": "Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later.", - "errorSeverity": 16, - "isUserError": true, - "isCancellable": false + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T14:48:34.583Z", + "state": "Failed", + "errorCode": 45157, + "errorDescription": "Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later.", + "errorSeverity": 16, + "isUserError": true, + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333", + "name": "33333333-3333-3333-3333-333333333333", + "type": "Microsoft.Sql/managedInstances/operations" }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333", - "name": "33333333-3333-3333-3333-333333333333", - "type": "Microsoft.Sql/managedInstances/operations" - }, - { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "MakeAllManagedDatabasesAccessible", - "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE", - "percentComplete": 100, - "startTime": "2017-06-01T09:00:08.10Z", - "state": "Succeeded" - }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444", - "name": "44444444-4444-4444-4444-444444444444", - "type": "Microsoft.Sql/managedInstances/operations" - } - ] + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "MakeAllManagedDatabasesAccessible", + "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE", + "percentComplete": 100, + "startTime": "2017-06-01T09:00:08.10Z", + "state": "Succeeded" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444", + "name": "44444444-4444-4444-4444-444444444444", + "type": "Microsoft.Sql/managedInstances/operations" + } + ] + } } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json index 79e1723321bc..450ead3f2338 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json @@ -9,12 +9,6 @@ "responses": { "200": { "body": "" - }, - "405": { - "error": { - "code": "CannotCancelOperation", - "message": "Cannot cancel management operation '11111111-1111-1111-1111-111111111111' in the current state." - } } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json index 955fea3055f8..82409de378c6 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/ListManagedInstanceOperations.json @@ -7,67 +7,69 @@ }, "responses": { "200": { - "value": [ - { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "UPDATE MANAGED SERVER", - "percentComplete": 100, - "startTime": "2019-12-06T11:08:44.49Z", - "state": "Cancelled", - "isCancellable": false + "body": { + "value": [ + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", - "name": "11111111-1111-1111-1111-111111111111", - "type": "Microsoft.Sql/managedInstances/operations" - }, - { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "UPDATE MANAGED SERVER", - "percentComplete": 50, - "startTime": "2019-12-06T11:08:44.49Z", - "state": "InProgress", - "isCancellable": true + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 50, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "InProgress", + "isCancellable": true + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.Sql/managedInstances/operations" }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", - "name": "22222222-2222-2222-2222-222222222222", - "type": "Microsoft.Sql/managedInstances/operations" - }, - { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "UPDATE MANAGED SERVER", - "percentComplete": 100, - "startTime": "2019-12-06T14:48:34.583Z", - "state": "Failed", - "errorCode": 45157, - "errorDescription": "Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later.", - "errorSeverity": 16, - "isUserError": true, - "isCancellable": false + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T14:48:34.583Z", + "state": "Failed", + "errorCode": 45157, + "errorDescription": "Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later.", + "errorSeverity": 16, + "isUserError": true, + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333", + "name": "33333333-3333-3333-3333-333333333333", + "type": "Microsoft.Sql/managedInstances/operations" }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333", - "name": "33333333-3333-3333-3333-333333333333", - "type": "Microsoft.Sql/managedInstances/operations" - }, - { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "MakeAllManagedDatabasesAccessible", - "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE", - "percentComplete": 100, - "startTime": "2017-06-01T09:00:08.10Z", - "state": "Succeeded" - }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444", - "name": "44444444-4444-4444-4444-444444444444", - "type": "Microsoft.Sql/managedInstances/operations" - } - ] + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "MakeAllManagedDatabasesAccessible", + "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE", + "percentComplete": 100, + "startTime": "2017-06-01T09:00:08.10Z", + "state": "Succeeded" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444", + "name": "44444444-4444-4444-4444-444444444444", + "type": "Microsoft.Sql/managedInstances/operations" + } + ] + } } } } From 166579141bed5de3ec70ef7ef0d63d2f602baa73 Mon Sep 17 00:00:00 2001 From: Jovana Toroman Date: Tue, 10 Dec 2019 10:48:01 +0100 Subject: [PATCH 06/15] Fixed readme file --- specification/sql/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 94dade3ea6ce..89d240a85254 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -514,7 +514,7 @@ input-file: - ./Microsoft.Sql/preview/2018-06-01-preview/DatabaseSecurityAlertPolicies.json - ./Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json - ./Microsoft.Sql/preview/2018-06-01-preview/ManagedInstanceVulnerabilityAssessments.json - - ./Microsoft.Sql/preview/2018-06-01-preview/managedInstanceOperations.json + - ./Microsoft.Sql/preview/2018-06-01-preview/ManagedInstanceOperations.json - ./Microsoft.Sql/preview/2018-06-01-preview/ServerVulnerabilityAssessments.json - ./Microsoft.Sql/preview/2018-06-01-preview/instancePools.json - ./Microsoft.Sql/preview/2018-06-01-preview/usages.json From a1e24ed60b17547432dc190ad82710c4869be3d1 Mon Sep 17 00:00:00 2001 From: Jovana Toroman Date: Tue, 10 Dec 2019 10:59:20 +0100 Subject: [PATCH 07/15] Fixed example for cancel --- .../examples/CancelManagedInstanceOperation.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json index 450ead3f2338..7348925c6166 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json @@ -7,8 +7,6 @@ "api-version": "2019-06-01-preview" }, "responses": { - "200": { - "body": "" - } + "200": {} } -} +} \ No newline at end of file From 6f5714fd785e2891c42567b23a0ed91c65095fed Mon Sep 17 00:00:00 2001 From: Jovana Toroman Date: Tue, 10 Dec 2019 11:01:03 +0100 Subject: [PATCH 08/15] Fixed example for cancel operation --- .../examples/CancelManagedInstanceOperation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json index 7348925c6166..0892244a049d 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/CancelManagedInstanceOperation.json @@ -9,4 +9,4 @@ "responses": { "200": {} } -} \ No newline at end of file +} From db4f6148f63b27fc164553742720b55ba08e3ef9 Mon Sep 17 00:00:00 2001 From: Jovana Toroman Date: Tue, 10 Dec 2019 11:16:37 +0100 Subject: [PATCH 09/15] Fixed readme --- specification/sql/resource-manager/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 89d240a85254..12bb1151a1a7 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -492,7 +492,7 @@ input-file: - ./Microsoft.Sql/preview/2019-06-01-preview/serverOperations.json - ./Microsoft.Sql/preview/2019-06-01-preview/WorkloadGroups.json - ./Microsoft.Sql/preview/2019-06-01-preview/WorkloadClassifiers.json - - ./Microsoft.Sql/preview/2019-06-01-preview/managedInstanceOperations.json + - ./Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json # Needed when there is more than one input file override-info: @@ -514,7 +514,7 @@ input-file: - ./Microsoft.Sql/preview/2018-06-01-preview/DatabaseSecurityAlertPolicies.json - ./Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json - ./Microsoft.Sql/preview/2018-06-01-preview/ManagedInstanceVulnerabilityAssessments.json - - ./Microsoft.Sql/preview/2018-06-01-preview/ManagedInstanceOperations.json + - ./Microsoft.Sql/preview/2018-06-01-preview/managedInstanceOperations.json - ./Microsoft.Sql/preview/2018-06-01-preview/ServerVulnerabilityAssessments.json - ./Microsoft.Sql/preview/2018-06-01-preview/instancePools.json - ./Microsoft.Sql/preview/2018-06-01-preview/usages.json From 93abafe0e91d638658df068aa6512695642eec61 Mon Sep 17 00:00:00 2001 From: toki95 <35834415+toki95@users.noreply.github.com> Date: Mon, 27 Jan 2020 17:51:18 +0100 Subject: [PATCH 10/15] Add files via upload Addressing comments --- GetManagedInstanceOperation.json | 27 +++ ManagedInstanceOperations.json | 404 +++++++++++++++++++++++++++++++ 2 files changed, 431 insertions(+) create mode 100644 GetManagedInstanceOperation.json create mode 100644 ManagedInstanceOperations.json diff --git a/GetManagedInstanceOperation.json b/GetManagedInstanceOperation.json new file mode 100644 index 000000000000..006d81df4377 --- /dev/null +++ b/GetManagedInstanceOperation.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "operationId": "00000000-1111-2222-3333-444444444444", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" + } + } + } +} \ No newline at end of file diff --git a/ManagedInstanceOperations.json b/ManagedInstanceOperations.json new file mode 100644 index 000000000000..bf05605c97d4 --- /dev/null +++ b/ManagedInstanceOperations.json @@ -0,0 +1,404 @@ +{ + "swagger": "2.0", + "info": { + "version": "2019-06-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel": { + "post": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Cancels the asynchronous operation on the managed instance.", + "operationId": "ManagedInstanceOperations_Cancel", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for cancel has been executed successfully." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + } + }, + "x-ms-examples": { + "Cancel the managed instance management operation": { + "$ref": "./examples/CancelManagedInstanceOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations": { + "get": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Gets a list of operations performed on the managed instance.", + "operationId": "ManagedInstanceOperations_ListByManagedInstance", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting managed instance operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/ManagedInstanceOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the managed instance management operations": { + "$ref": "./examples/ListManagedInstanceOperations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}": { + "get": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Gets a management operation on managed instance.", + "operationId": "ManagedInstanceOperations_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstanceOperation" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets the managed instance management operation": { + "$ref": "./examples/GetManagedInstanceOperation.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceOperationListResult": { + "description": "The response to a list managed instance operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceOperationProperties": { + "description": "The properties of a managed instance operation.", + "type": "object", + "properties": { + "managedInstanceName": { + "description": "The name of the managed instance the operation is being performed on.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "ManagedInstanceOperation": { + "description": "A managed instance operation.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "BlobAuditingPolicyNameParameter": { + "name": "blobAuditingPolicyName", + "in": "path", + "description": "The name of the blob auditing policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineInstanceNameParameter": { + "name": "sqlVirtualMachineInstanceName", + "in": "path", + "description": "The name of the SqlVirtualMachineInstance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineContainerNameParameter": { + "name": "sqlVirtualMachineContainerName", + "in": "path", + "description": "The name of the SqlVirtualMachineContainer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "VirtualClusterNameParameter": { + "name": "virtualClusterName", + "in": "path", + "description": "The name of the virtual cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} \ No newline at end of file From b124379c6718c51f74cf1a4501176ac49ac9e967 Mon Sep 17 00:00:00 2001 From: toki95 <35834415+toki95@users.noreply.github.com> Date: Mon, 27 Jan 2020 17:53:50 +0100 Subject: [PATCH 11/15] Delete GetManagedInstanceOperation.json --- GetManagedInstanceOperation.json | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 GetManagedInstanceOperation.json diff --git a/GetManagedInstanceOperation.json b/GetManagedInstanceOperation.json deleted file mode 100644 index 006d81df4377..000000000000 --- a/GetManagedInstanceOperation.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "sqlcrudtest-7398", - "managedInstanceName": "sqlcrudtest-4645", - "operationId": "00000000-1111-2222-3333-444444444444", - "api-version": "2018-06-01-preview" - }, - "responses": { - "200": { - "body": { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "UPDATE MANAGED SERVER", - "percentComplete": 100, - "startTime": "2019-12-06T11:08:44.49Z", - "state": "Cancelled", - "isCancellable": false - }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", - "name": "11111111-1111-1111-1111-111111111111", - "type": "Microsoft.Sql/managedInstances/operations" - } - } - } -} \ No newline at end of file From 0089bf09f1f0b27ee7f3969ae3c2103a14a4b70b Mon Sep 17 00:00:00 2001 From: toki95 <35834415+toki95@users.noreply.github.com> Date: Mon, 27 Jan 2020 17:54:02 +0100 Subject: [PATCH 12/15] Delete ManagedInstanceOperations.json --- ManagedInstanceOperations.json | 404 --------------------------------- 1 file changed, 404 deletions(-) delete mode 100644 ManagedInstanceOperations.json diff --git a/ManagedInstanceOperations.json b/ManagedInstanceOperations.json deleted file mode 100644 index bf05605c97d4..000000000000 --- a/ManagedInstanceOperations.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2019-06-01-preview", - "title": "SqlManagementClient", - "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel": { - "post": { - "tags": [ - "ManagedInstanceOperations" - ], - "description": "Cancels the asynchronous operation on the managed instance.", - "operationId": "ManagedInstanceOperations_Cancel", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ManagedInstanceNameParameter" - }, - { - "name": "operationId", - "in": "path", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The request for cancel has been executed successfully." - }, - "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." - } - }, - "x-ms-examples": { - "Cancel the managed instance management operation": { - "$ref": "./examples/CancelManagedInstanceOperation.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations": { - "get": { - "tags": [ - "ManagedInstanceOperations" - ], - "description": "Gets a list of operations performed on the managed instance.", - "operationId": "ManagedInstanceOperations_ListByManagedInstance", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ManagedInstanceNameParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The request for getting managed instance operations has been executed successfully.", - "schema": { - "$ref": "#/definitions/ManagedInstanceOperationListResult" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "List the managed instance management operations": { - "$ref": "./examples/ListManagedInstanceOperations.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}": { - "get": { - "tags": [ - "ManagedInstanceOperations" - ], - "description": "Gets a management operation on managed instance.", - "operationId": "ManagedInstanceOperations_Get", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ManagedInstanceNameParameter" - }, - { - "name": "operationId", - "in": "path", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved the specified managed instance.", - "schema": { - "$ref": "#/definitions/ManagedInstanceOperation" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." - } - }, - "x-ms-examples": { - "Gets the managed instance management operation": { - "$ref": "./examples/GetManagedInstanceOperation.json" - } - } - } - } - }, - "definitions": { - "ManagedInstanceOperationListResult": { - "description": "The response to a list managed instance operations request", - "type": "object", - "properties": { - "value": { - "description": "Array of results.", - "type": "array", - "items": { - "$ref": "#/definitions/ManagedInstanceOperation" - }, - "readOnly": true - }, - "nextLink": { - "description": "Link to retrieve next page of results.", - "type": "string", - "readOnly": true - } - } - }, - "ManagedInstanceOperationProperties": { - "description": "The properties of a managed instance operation.", - "type": "object", - "properties": { - "managedInstanceName": { - "description": "The name of the managed instance the operation is being performed on.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "The name of operation.", - "type": "string", - "readOnly": true - }, - "operationFriendlyName": { - "description": "The friendly name of operation.", - "type": "string", - "readOnly": true - }, - "percentComplete": { - "format": "int32", - "description": "The percentage of the operation completed.", - "type": "integer", - "readOnly": true - }, - "startTime": { - "format": "date-time", - "description": "The operation start time.", - "type": "string", - "readOnly": true - }, - "state": { - "description": "The operation state.", - "enum": [ - "Pending", - "InProgress", - "Succeeded", - "Failed", - "CancelInProgress", - "Cancelled" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "ManagementOperationState", - "modelAsString": true - } - }, - "errorCode": { - "format": "int32", - "description": "The operation error code.", - "type": "integer", - "readOnly": true - }, - "errorDescription": { - "description": "The operation error description.", - "type": "string", - "readOnly": true - }, - "errorSeverity": { - "format": "int32", - "description": "The operation error severity.", - "type": "integer", - "readOnly": true - }, - "isUserError": { - "description": "Whether or not the error is a user error.", - "type": "boolean", - "readOnly": true - }, - "estimatedCompletionTime": { - "format": "date-time", - "description": "The estimated completion time of the operation.", - "type": "string", - "readOnly": true - }, - "description": { - "description": "The operation description.", - "type": "string", - "readOnly": true - }, - "isCancellable": { - "description": "Whether the operation can be cancelled.", - "type": "boolean", - "readOnly": true - } - } - }, - "Resource": { - "description": "ARM resource.", - "type": "object", - "properties": { - "id": { - "description": "Resource ID.", - "type": "string", - "readOnly": true - }, - "name": { - "description": "Resource name.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "Resource type.", - "type": "string", - "readOnly": true - } - }, - "x-ms-azure-resource": true - }, - "ProxyResource": { - "description": "ARM proxy resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": {} - }, - "ManagedInstanceOperation": { - "description": "A managed instance operation.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/ManagedInstanceOperationProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "description": "The subscription ID that identifies an Azure subscription.", - "required": true, - "type": "string", - "x-ms-parameter-location": "client" - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "description": "The API version to use for the request.", - "required": true, - "type": "string", - "x-ms-parameter-location": "client" - }, - "ResourceGroupParameter": { - "name": "resourceGroupName", - "in": "path", - "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "ServerNameParameter": { - "name": "serverName", - "in": "path", - "description": "The name of the server.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "ManagedInstanceNameParameter": { - "name": "managedInstanceName", - "in": "path", - "description": "The name of the managed instance.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "DatabaseNameParameter": { - "name": "databaseName", - "in": "path", - "description": "The name of the database.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "BlobAuditingPolicyNameParameter": { - "name": "blobAuditingPolicyName", - "in": "path", - "description": "The name of the blob auditing policy.", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-parameter-location": "method" - }, - "SqlVirtualMachineInstanceNameParameter": { - "name": "sqlVirtualMachineInstanceName", - "in": "path", - "description": "The name of the SqlVirtualMachineInstance.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "SqlVirtualMachineContainerNameParameter": { - "name": "sqlVirtualMachineContainerName", - "in": "path", - "description": "The name of the SqlVirtualMachineContainer.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "VirtualClusterNameParameter": { - "name": "virtualClusterName", - "in": "path", - "description": "The name of the virtual cluster.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - } - }, - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "description": "Azure Active Directory OAuth2 Flow", - "flow": "implicit", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - } -} \ No newline at end of file From 79f4e8d09b1a43f700a63b55ff4a5a84b6bb927e Mon Sep 17 00:00:00 2001 From: toki95 <35834415+toki95@users.noreply.github.com> Date: Mon, 27 Jan 2020 17:59:57 +0100 Subject: [PATCH 13/15] Update ManagedInstanceOperations.json --- .../ManagedInstanceOperations.json | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json index a347f438db81..0cd67f90f221 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ManagedInstanceOperations.json @@ -100,6 +100,52 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}": { + "get": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Gets a management operation on managed instance.", + "operationId": "ManagedInstanceOperations_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstanceOperation" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets the managed instance management operation": { + "$ref": "./examples/GetManagedInstanceOperation.json" + } + } + } } }, "definitions": { From 8caad0acbf4da264568b2c84cafcce64d03d0bff Mon Sep 17 00:00:00 2001 From: toki95 <35834415+toki95@users.noreply.github.com> Date: Mon, 27 Jan 2020 18:02:58 +0100 Subject: [PATCH 14/15] Create GetManagedInstanceOperation Added example for getting MI operation. --- .../examples/GetManagedInstanceOperation | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/GetManagedInstanceOperation diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/GetManagedInstanceOperation b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/GetManagedInstanceOperation new file mode 100644 index 000000000000..31329721508f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/GetManagedInstanceOperation @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "operationId": "00000000-1111-2222-3333-444444444444", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" + } + } + } +} From a18554ab1a209fcd25fe5a760049b5cfc06e351f Mon Sep 17 00:00:00 2001 From: toki95 <35834415+toki95@users.noreply.github.com> Date: Mon, 27 Jan 2020 18:07:06 +0100 Subject: [PATCH 15/15] Delete GetManagedInstanceOperation --- .../examples/GetManagedInstanceOperation | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/GetManagedInstanceOperation diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/GetManagedInstanceOperation b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/GetManagedInstanceOperation deleted file mode 100644 index 31329721508f..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/GetManagedInstanceOperation +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "sqlcrudtest-7398", - "managedInstanceName": "sqlcrudtest-4645", - "operationId": "00000000-1111-2222-3333-444444444444", - "api-version": "2018-06-01-preview" - }, - "responses": { - "200": { - "body": { - "properties": { - "managedInstanceName": "sqlcrudtest-4645", - "operation": "UpsertManagedServer", - "operationFriendlyName": "UPDATE MANAGED SERVER", - "percentComplete": 100, - "startTime": "2019-12-06T11:08:44.49Z", - "state": "Cancelled", - "isCancellable": false - }, - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", - "name": "11111111-1111-1111-1111-111111111111", - "type": "Microsoft.Sql/managedInstances/operations" - } - } - } -}