-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Merged
PhoenixHe-NV
merged 10 commits into
Azure:master
from
milanbrkic-ms:instanceFailoverSwagger
Jun 12, 2020
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
82a70c0
Failover managed instance API docs
MDCS-sql ee4077c
fix parameters
MDCS-sql 6f59f4b
typo fix
MDCS-sql b26e06e
fix version
MDCS-sql 176d170
changes in readme.md
MDCS-sql 9c57f6f
pulled master into instanceFailoverSwagger
MDCS-sql cb712d7
Merge branch 'master' of https://github.com/Azure/azure-rest-api-spec…
MDCS-sql f6d6161
Merge branch 'master' into instanceFailoverSwagger
milanbrkic-ms c921290
Removed unused parameters and rearranged little bit
MDCS-sql d7ea882
fixes
MDCS-sql 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
113 changes: 113 additions & 0 deletions
113
...ql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.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,113 @@ | ||
| { | ||
| "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" | ||
| ], | ||
| "security": [ | ||
| { | ||
| "azure_auth": [ | ||
| "user_impersonation" | ||
| ] | ||
| } | ||
| ], | ||
| "securityDefinitions": { | ||
| "azure_auth": { | ||
| "type": "oauth2", | ||
| "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
| "flow": "implicit", | ||
| "description": "Azure Active Directory OAuth2 Flow", | ||
| "scopes": { | ||
| "user_impersonation": "impersonate your user account" | ||
| } | ||
| } | ||
| }, | ||
| "paths": { | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover": { | ||
| "post": { | ||
| "tags": [ | ||
| "ManagedInstances" | ||
| ], | ||
| "description": "Failovers a managed instance.", | ||
| "operationId": "ManagedInstances_Failover", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ManagedInstanceNameParameter" | ||
| }, | ||
| { | ||
| "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 | ||
| } | ||
| } | ||
| ], | ||
| "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" | ||
| }, | ||
| "ManagedInstanceNameParameter": { | ||
| "name": "managedInstanceName", | ||
| "in": "path", | ||
| "description": "The name of the managed instance.", | ||
| "required": true, | ||
| "type": "string", | ||
| "x-ms-parameter-location": "method" | ||
| } | ||
| }, | ||
| "responses": {} | ||
| } | ||
13 changes: 13 additions & 0 deletions
13
...ce-manager/Microsoft.Sql/preview/2019-06-01-preview/examples/FailoverManagedInstance.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": "testrg", | ||
| "managedInstanceName": "testinstance", | ||
| "replicaType": "Primary", | ||
| "api-version": "2019-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.
I was getting
when I referenced
common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameterand didn't know how to fix that.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.
Can you try update this to common-type AND remove the subscription id definition below on Line 95? I think that should do it. In the meantime, I remove the change requested status. Thx
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 did try, but I was getting the error when execute
autorest specification\sql\resource-manager\readme.md --azure-validator=true(I pasted error in comment above).Can we just leave it as is? I would really appreciate to merge this changes, so I could continue with client SDKs