-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Failover database and elastic pool swagger changes #6365
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
534fc87
Merge pull request #1 from Azure/master
emgu-ms b0579c9
Add swagger changes for failover databases and failover elastic pools
emgu-ms 7a96d32
Fixed api version for FailoverDatabases
emgu-ms a866a82
Add examples
emgu-ms ac2a0cd
Add to read me
emgu-ms f12f8c2
Merge upstream
emgu-ms 39b2424
Remove BOM from files
emgu-ms 23564cc
Merge conflicts
emgu-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
164 changes: 164 additions & 0 deletions
164
...tion/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/FailoverDatabases.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,164 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "version": "2018-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/servers/{serverName}/databases/{databaseName}/failover": { | ||
| "post": { | ||
| "tags": [ | ||
| "FailoverDatabases" | ||
| ], | ||
| "description": "Failovers a database.", | ||
| "operationId": "Databases_Failover", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/ResourceGroupParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ServerNameParameter" | ||
| }, | ||
| { | ||
| "name": "databaseName", | ||
| "in": "path", | ||
| "description": "The name of the database to failover.", | ||
| "required": true, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successfully completed database failover." | ||
| }, | ||
| "default": { | ||
| "description": "*** Error Responses: ***\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 DatabaseFailoverThrottled - There was a recent failover on the database or pool if database belongs in an elastic pool.\n\n * 400 DatabaseFailoverNotSupported - This database type does not support customer initiated failovers.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 DatabaseNotInStateToFailover - The database is currently in a state such that failover cannot be issued." | ||
| }, | ||
| "202": { | ||
| "description": "Database failover is in progress." | ||
| } | ||
| }, | ||
| "x-ms-long-running-operation": true, | ||
| "x-ms-examples": { | ||
| "Failover an database": { | ||
| "$ref": "./examples/FailoverDatabase.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": { | ||
| "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" | ||
| } | ||
| } | ||
| } | ||
| } | ||
164 changes: 164 additions & 0 deletions
164
...n/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/FailoverElasticPools.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,164 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "version": "2018-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/servers/{serverName}/elasticPools/{elasticPoolName}/failover": { | ||
| "post": { | ||
| "tags": [ | ||
| "FailoverElasticPools" | ||
| ], | ||
| "description": "Failovers an elastic pool.", | ||
| "operationId": "ElasticPools_Failover", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/ResourceGroupParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ServerNameParameter" | ||
| }, | ||
| { | ||
| "name": "elasticPoolName", | ||
| "in": "path", | ||
| "description": "The name of the elastic pool to failover.", | ||
| "required": true, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successfully completed elastic pool failover." | ||
| }, | ||
| "default": { | ||
| "description": "*** Error Responses: ***\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 ElasticPoolFailoverThrottled - There was a recent failover on the elastic pool.\n\n * 400 ElasticPoolFailoverNotSupported - This elastic pool type or a database type within the elastic pool does not support customer initiated failovers.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ElasticPoolNotInStateToFailover - The elastic pool or a database within the elastic pool is currently in a state such that failover cannot be issued." | ||
| }, | ||
| "202": { | ||
| "description": "Elastic pool failover is in progress." | ||
| } | ||
| }, | ||
| "x-ms-long-running-operation": true, | ||
| "x-ms-examples": { | ||
| "Failover an elastic pool": { | ||
| "$ref": "./examples/FailoverElasticPool.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": { | ||
| "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" | ||
| } | ||
| } | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
.../resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/FailoverDatabase.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
| "resourceGroupName": "group1", | ||
| "serverName": "testServer", | ||
| "databaseName": "testDatabase", | ||
| "api-version": "2018-06-01-preview" | ||
| }, | ||
| "responses": { | ||
| "200": {}, | ||
| "202": {} | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
...source-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/FailoverElasticPool.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
| "resourceGroupName": "group1", | ||
| "serverName": "testServer", | ||
| "elasticPoolName": "testElasticPool", | ||
| "api-version": "2018-06-01-preview" | ||
| }, | ||
| "responses": { | ||
| "200": {}, | ||
| "202": {} | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails a database over?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there is any less jargony way to describe this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API is available in production, I will go ahead and add to the readme.md. For failover database, customers know what a failover is. We originally had restart database but opted for failover instead as in the future we're thinking about doing planned and unplanned failovers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok in that case please add to all package-composite-v*, and also the package-pure- which matches the api version.