{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "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.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "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" } } }, "tags": [ { "name": "ReplicationLinks" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks": { "get": { "operationId": "ReplicationLinks_ListByDatabase", "tags": [ "ReplicationLinks" ], "description": "Gets a list of replication links on database.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ReplicationLinkListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List replication links on server on database.": { "$ref": "./examples/ReplicationLinkListByDatabase.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}": { "get": { "operationId": "ReplicationLinks_Get", "tags": [ "ReplicationLinks" ], "description": "Gets a replication link.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ReplicationLink" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets the replication link.": { "$ref": "./examples/ReplicationLinkGet.json" } } }, "put": { "operationId": "ReplicationLinks_CreateOrUpdate", "tags": [ "ReplicationLinks" ], "description": "Updates the replication link type.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "", "required": true, "schema": { "$ref": "#/definitions/ReplicationLink" } } ], "responses": { "200": { "description": "Resource 'ReplicationLink' update operation succeeded", "schema": { "$ref": "#/definitions/ReplicationLink" } }, "202": { "description": "Resource operation accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Updates Replication Link": { "$ref": "./examples/ReplicationLinkCreateOrUpdate.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ReplicationLink" }, "x-ms-long-running-operation": true }, "patch": { "operationId": "ReplicationLinks_Update", "tags": [ "ReplicationLinks" ], "description": "Updates the replication link type.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "", "required": true, "schema": { "$ref": "#/definitions/ReplicationLinkUpdate" } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ReplicationLink" } }, "202": { "description": "Resource update request accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Update Replication Link": { "$ref": "./examples/ReplicationLinkUpdate.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ReplicationLink" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "ReplicationLinks_Delete", "tags": [ "ReplicationLinks" ], "description": "Deletes the replication link.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Resource deleted successfully." }, "202": { "description": "Resource deletion accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete replication link on server": { "$ref": "./examples/ReplicationLinkDelete.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { "post": { "operationId": "ReplicationLinks_Failover", "tags": [ "ReplicationLinks" ], "description": "Fails over from the current primary server to this server.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ReplicationLink" } }, "202": { "description": "Resource operation accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Planned failover of a replication link": { "$ref": "./examples/ReplicationLinkFailover.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ReplicationLink" }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { "post": { "operationId": "ReplicationLinks_FailoverAllowDataLoss", "tags": [ "ReplicationLinks" ], "description": "Fails over from the current primary server to this server allowing data loss.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ReplicationLink" } }, "202": { "description": "Resource operation accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Forced failover of a replication link": { "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ReplicationLink" }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks": { "get": { "operationId": "ReplicationLinks_ListByServer", "tags": [ "ReplicationLinks" ], "description": "Gets a list of replication links.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ReplicationLinkListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List replication links on server": { "$ref": "./examples/ReplicationLinkListByServer.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "ReplicationLink": { "type": "object", "description": "A replication link.", "properties": { "properties": { "$ref": "#/definitions/ReplicationLinkProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "ReplicationLinkListResult": { "type": "object", "description": "The response of a ReplicationLink list operation.", "properties": { "value": { "type": "array", "description": "The ReplicationLink items on this page", "items": { "$ref": "#/definitions/ReplicationLink" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "ReplicationLinkProperties": { "type": "object", "description": "Properties of a replication link.", "properties": { "partnerServer": { "type": "string", "description": "Resource partner server.", "readOnly": true }, "partnerDatabase": { "type": "string", "description": "Resource partner database.", "readOnly": true }, "partnerDatabaseId": { "type": "string", "description": "Resource partner database Id.", "readOnly": true }, "partnerLocation": { "type": "string", "description": "Resource partner location.", "readOnly": true }, "role": { "$ref": "./common.json#/definitions/ReplicationRole", "description": "Local replication role.", "readOnly": true }, "partnerRole": { "$ref": "./common.json#/definitions/ReplicationRole", "description": "Partner replication role.", "readOnly": true }, "replicationMode": { "type": "string", "description": "Replication mode.", "readOnly": true }, "startTime": { "type": "string", "format": "date-time", "description": "Time at which the link was created.", "readOnly": true }, "percentComplete": { "type": "integer", "format": "int32", "description": "Seeding completion percentage for the link.", "readOnly": true }, "replicationState": { "$ref": "./common.json#/definitions/ReplicationState", "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", "readOnly": true }, "isTerminationAllowed": { "type": "boolean", "description": "Whether the user is currently allowed to terminate the link.", "readOnly": true }, "linkType": { "$ref": "./common.json#/definitions/ReplicationLinkType", "description": "Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED." } } }, "ReplicationLinkUpdate": { "type": "object", "description": "A replication link update request.", "properties": { "properties": { "$ref": "#/definitions/ReplicationLinkUpdateProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "ReplicationLinkUpdateProperties": { "type": "object", "description": "Properties of a replication link update.", "properties": { "linkType": { "$ref": "./common.json#/definitions/ReplicationLinkType", "description": "Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED." } } } }, "parameters": {} }