Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting

The subscription ID that identifies an Azure subscription.
, ---
The ID of the target subscription.
).
Error: '$.parameters.SubscriptionIdParameter.description' has incompatible values (---
The subscription ID that identifies an Azure subscription.
, ---
The ID of the target subscription.
).

when I referenced common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter and didn't know how to fix that.

Copy link
Contributor

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

Copy link
Contributor Author

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

},
{
"$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": {}
}
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": {}
}
}
4 changes: 4 additions & 0 deletions specification/sql/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ input-file:
- Microsoft.Sql/preview/2019-06-01-preview/managedInstanceOperations.json
- Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json
- Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json
- Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json

# Needed when there is more than one input file
override-info:
Expand Down Expand Up @@ -241,6 +242,7 @@ input-file:
- Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json
- Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json
- Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json
- Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json

# Needed when there is more than one input file
override-info:
Expand Down Expand Up @@ -333,6 +335,7 @@ input-file:
- Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json
- Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json
- Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json
- Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json

# Needed when there is more than one input file
override-info:
Expand Down Expand Up @@ -503,6 +506,7 @@ input-file:
- ./Microsoft.Sql/preview/2019-06-01-preview/ServerAzureADAdministrators.json
- ./Microsoft.Sql/preview/2019-06-01-preview/syncGroups.json
- ./Microsoft.Sql/preview/2019-06-01-preview/syncMembers.json
- ./Microsoft.Sql/preview/2019-06-01-preview/FailoverManagedInstance.json

# Needed when there is more than one input file
override-info:
Expand Down