-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Managed Instance failover swagger #8911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
82a70c0
ee4077c
6f59f4b
b26e06e
176d170
9c57f6f
cb712d7
f6d6161
c921290
d7ea882
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,177 @@ | ||
| { | ||
| "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}/failover": { | ||
| "post": { | ||
| "tags": [ | ||
| "ManagedInstances" | ||
| ], | ||
| "description": "Failovers a managed instance.", | ||
| "operationId": "ManagedInstances_Failover", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/ResourceGroupParameter" | ||
| }, | ||
| { | ||
| "name": "managedInstanceName", | ||
| "in": "path", | ||
| "description": "The name of the managed instance to failover.", | ||
| "required": true, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "name": "replicaType", | ||
| "in": "query", | ||
| "description": "The type of replica to be failed over.", | ||
| "required": false, | ||
| "type": "string", | ||
| "enum": [ | ||
| "Primary", | ||
| "ReadableSecondary" | ||
| ], | ||
| "x-ms-enum": { | ||
| "name": "ReplicaType", | ||
| "modelAsString": true | ||
| } | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
|
milanbrkic-ms marked this conversation as resolved.
Outdated
|
||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successfully completed managed instance failover." | ||
| }, | ||
| "202": { | ||
| "description": "Managed instance failover is in progress." | ||
| }, | ||
| "default": { | ||
| "description": "*** Error Responses: ***\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 ManagedInstanceFailoverThrottled - There was a recent failover on the managed instance.\n\n * 400 ManagedInstanceFailoverNotSupportedOnSKU - This type of customer initiated failover is not supported on the given SKU.\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 * 409 ManagedInstanceNotInStateToFailover - The managed instance is currently in a state such that failover cannot be issued." | ||
| } | ||
| }, | ||
| "x-ms-long-running-operation": true, | ||
| "x-ms-examples": { | ||
| "Failover a managed instance.": { | ||
| "$ref": "./examples/FailoverManagedInstance.json" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": {}, | ||
| "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": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are many unused and duplicate definitions here. They should be removed. I looked over other json in SQL, seems there are copy and paste since they exhibit same pattern. This creates problems in our codegen(autorest) and producing duplicate class schemas. I opened an issue on our side to work with you to clean up these swaggers in the future. |
||
| "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": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: We would like to standardize |
||
| "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" | ||
| } | ||
| } | ||
| }, | ||
| "responses": {} | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
| "resourceGroupName": "testrg", | ||
| "managedInstanceName": "testinstance", | ||
| "replicaType": "Primary", | ||
| "api-version": "2019-06-01-preview" | ||
| }, | ||
| "responses": { | ||
| "200": {}, | ||
| "202": {} | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.