From 1bc2b745732634228721848e3edf5bcd5b871005 Mon Sep 17 00:00:00 2001 From: subhrob Date: Wed, 27 Apr 2022 08:05:49 +0530 Subject: [PATCH] Add ReplicationLinks for older versions --- .../2015-05-01-preview/ReplicationLinks.json | 277 ++++++++++ .../2017-03-01-preview/ReplicationLinks.json | 277 ++++++++++ .../2017-10-01-preview/ReplicationLinks.json | 475 ++++++++++++++++++ .../2018-06-01-preview/ReplicationLinks.json | 475 ++++++++++++++++++ .../2019-06-01-preview/ReplicationLinks.json | 475 ++++++++++++++++++ .../2020-02-02-preview/ReplicationLinks.json | 287 +++++++++-- .../2020-08-01-preview/ReplicationLinks.json | 287 +++++++++-- .../2020-11-01-preview/ReplicationLinks.json | 287 +++++++++-- .../2021-05-01-preview/ReplicationLinks.json | 166 +++++- .../2021-08-01-preview/ReplicationLinks.json | 166 +++++- .../2021-11-01-preview/ReplicationLinks.json | 15 +- 11 files changed, 2976 insertions(+), 211 deletions(-) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/ReplicationLinks.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/ReplicationLinks.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ReplicationLinks.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ReplicationLinks.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ReplicationLinks.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/ReplicationLinks.json new file mode 100644 index 000000000000..46d58a367739 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/ReplicationLinks.json @@ -0,0 +1,277 @@ +{ + "swagger": "2.0", + "info": { + "version": "2015-05-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}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" + } + } + } + } + }, + "definitions": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkProperties": { + "description": "Properties of a replication link.", + "type": "object", + "properties": { + "partnerServer": { + "description": "Resource partner server.", + "type": "string", + "readOnly": true + }, + "partnerDatabase": { + "description": "Resource partner database.", + "type": "string", + "readOnly": true + }, + "partnerLocation": { + "description": "Resource partner location.", + "type": "string", + "readOnly": true + }, + "role": { + "description": "Local replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "partnerRole": { + "description": "Partner replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "replicationMode": { + "description": "Replication mode.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Time at which the link was created.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "Seeding completion percentage for the link.", + "type": "integer", + "readOnly": true + }, + "replicationState": { + "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "enum": [ + "PENDING", + "SEEDING", + "CATCH_UP", + "SUSPENDED" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + } + }, + "isTerminationAllowed": { + "description": "Whether the user is currently allowed to terminate the link.", + "type": "boolean", + "readOnly": true + }, + "linkType": { + "description": "Link type (GEO, NAMED, STANDBY).", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "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" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/ReplicationLinks.json new file mode 100644 index 000000000000..cab56f1ca99e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/ReplicationLinks.json @@ -0,0 +1,277 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-03-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}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" + } + } + } + } + }, + "definitions": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkProperties": { + "description": "Properties of a replication link.", + "type": "object", + "properties": { + "partnerServer": { + "description": "Resource partner server.", + "type": "string", + "readOnly": true + }, + "partnerDatabase": { + "description": "Resource partner database.", + "type": "string", + "readOnly": true + }, + "partnerLocation": { + "description": "Resource partner location.", + "type": "string", + "readOnly": true + }, + "role": { + "description": "Local replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "partnerRole": { + "description": "Partner replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "replicationMode": { + "description": "Replication mode.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Time at which the link was created.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "Seeding completion percentage for the link.", + "type": "integer", + "readOnly": true + }, + "replicationState": { + "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "enum": [ + "PENDING", + "SEEDING", + "CATCH_UP", + "SUSPENDED" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + } + }, + "isTerminationAllowed": { + "description": "Whether the user is currently allowed to terminate the link.", + "type": "boolean", + "readOnly": true + }, + "linkType": { + "description": "Link type (GEO, NAMED, STANDBY).", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "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" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ReplicationLinks.json new file mode 100644 index 000000000000..0cdb2e10d822 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ReplicationLinks.json @@ -0,0 +1,475 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-10-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}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links on database.", + "operationId": "ReplicationLinks_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server on database.": { + "$ref": "./examples/ReplicationLinkListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a replication link.", + "operationId": "ReplicationLinks_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Gets the replication link.": { + "$ref": "./examples/ReplicationLinkGet.json" + } + } + }, + "delete": { + "tags": [ + "ReplicationLinks" + ], + "description": "Deletes the replication link.", + "operationId": "ReplicationLinks_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the replication link." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Delete replication link on server": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links.", + "operationId": "ReplicationLinks_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server": { + "$ref": "./examples/ReplicationLinkListByServer.json" + } + } + } + } + }, + "definitions": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkListResult": { + "description": "A list of replication links.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ReplicationLink" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ReplicationLinkProperties": { + "description": "Properties of a replication link.", + "type": "object", + "properties": { + "partnerServer": { + "description": "Resource partner server.", + "type": "string", + "readOnly": true + }, + "partnerDatabase": { + "description": "Resource partner database.", + "type": "string", + "readOnly": true + }, + "partnerLocation": { + "description": "Resource partner location.", + "type": "string", + "readOnly": true + }, + "role": { + "description": "Local replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "partnerRole": { + "description": "Partner replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "replicationMode": { + "description": "Replication mode.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Time at which the link was created.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "Seeding completion percentage for the link.", + "type": "integer", + "readOnly": true + }, + "replicationState": { + "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "enum": [ + "PENDING", + "SEEDING", + "CATCH_UP", + "SUSPENDED" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + } + }, + "isTerminationAllowed": { + "description": "Whether the user is currently allowed to terminate the link.", + "type": "boolean", + "readOnly": true + }, + "linkType": { + "description": "Link type (GEO, NAMED, STANDBY).", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "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" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ReplicationLinks.json new file mode 100644 index 000000000000..2ffe8f664a41 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ReplicationLinks.json @@ -0,0 +1,475 @@ +{ + "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}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links on database.", + "operationId": "ReplicationLinks_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server on database.": { + "$ref": "./examples/ReplicationLinkListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a replication link.", + "operationId": "ReplicationLinks_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Gets the replication link.": { + "$ref": "./examples/ReplicationLinkGet.json" + } + } + }, + "delete": { + "tags": [ + "ReplicationLinks" + ], + "description": "Deletes the replication link.", + "operationId": "ReplicationLinks_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the replication link." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Delete replication link on server": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links.", + "operationId": "ReplicationLinks_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server": { + "$ref": "./examples/ReplicationLinkListByServer.json" + } + } + } + } + }, + "definitions": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkListResult": { + "description": "A list of replication links.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ReplicationLink" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ReplicationLinkProperties": { + "description": "Properties of a replication link.", + "type": "object", + "properties": { + "partnerServer": { + "description": "Resource partner server.", + "type": "string", + "readOnly": true + }, + "partnerDatabase": { + "description": "Resource partner database.", + "type": "string", + "readOnly": true + }, + "partnerLocation": { + "description": "Resource partner location.", + "type": "string", + "readOnly": true + }, + "role": { + "description": "Local replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "partnerRole": { + "description": "Partner replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "replicationMode": { + "description": "Replication mode.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Time at which the link was created.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "Seeding completion percentage for the link.", + "type": "integer", + "readOnly": true + }, + "replicationState": { + "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "enum": [ + "PENDING", + "SEEDING", + "CATCH_UP", + "SUSPENDED" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + } + }, + "isTerminationAllowed": { + "description": "Whether the user is currently allowed to terminate the link.", + "type": "boolean", + "readOnly": true + }, + "linkType": { + "description": "Link type (GEO, NAMED, STANDBY).", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "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" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ReplicationLinks.json new file mode 100644 index 000000000000..65a0bae3db78 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/ReplicationLinks.json @@ -0,0 +1,475 @@ +{ + "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/servers/{serverName}/databases/{databaseName}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links on database.", + "operationId": "ReplicationLinks_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server on database.": { + "$ref": "./examples/ReplicationLinkListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a replication link.", + "operationId": "ReplicationLinks_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Gets the replication link.": { + "$ref": "./examples/ReplicationLinkGet.json" + } + } + }, + "delete": { + "tags": [ + "ReplicationLinks" + ], + "description": "Deletes the replication link.", + "operationId": "ReplicationLinks_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the replication link." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Delete replication link on server": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links.", + "operationId": "ReplicationLinks_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server": { + "$ref": "./examples/ReplicationLinkListByServer.json" + } + } + } + } + }, + "definitions": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkListResult": { + "description": "A list of replication links.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ReplicationLink" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ReplicationLinkProperties": { + "description": "Properties of a replication link.", + "type": "object", + "properties": { + "partnerServer": { + "description": "Resource partner server.", + "type": "string", + "readOnly": true + }, + "partnerDatabase": { + "description": "Resource partner database.", + "type": "string", + "readOnly": true + }, + "partnerLocation": { + "description": "Resource partner location.", + "type": "string", + "readOnly": true + }, + "role": { + "description": "Local replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "partnerRole": { + "description": "Partner replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "replicationMode": { + "description": "Replication mode.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Time at which the link was created.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "Seeding completion percentage for the link.", + "type": "integer", + "readOnly": true + }, + "replicationState": { + "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "enum": [ + "PENDING", + "SEEDING", + "CATCH_UP", + "SUSPENDED" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + } + }, + "isTerminationAllowed": { + "description": "Whether the user is currently allowed to terminate the link.", + "type": "boolean", + "readOnly": true + }, + "linkType": { + "description": "Link type (GEO, NAMED, STANDBY).", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "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" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ReplicationLinks.json index 9cc2a52c843f..7a6853f7284b 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ReplicationLinks.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ReplicationLinks.json @@ -28,18 +28,10 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server containing the replication link.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { - "name": "databaseName", - "in": "path", - "description": "The name of the database containing the replication link.", - "required": true, - "type": "string" + "$ref": "#/parameters/DatabaseNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" @@ -52,7 +44,7 @@ "200": { "description": "Successfully retrieved the list of replication links.", "schema": { - "$ref": "#/definitions/ReplicationLinksListResult" + "$ref": "#/definitions/ReplicationLinkListResult" } }, "default": { @@ -69,7 +61,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{replicationLinkName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}": { "get": { "tags": [ "ReplicationLinks" @@ -81,21 +73,105 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", "in": "path", - "description": "The name of the server containing the replication link.", + "description": "The name of the replication link.", "required": true, "type": "string" }, { - "name": "databaseName", + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Gets the replication link.": { + "$ref": "./examples/ReplicationLinkGet.json" + } + } + }, + "delete": { + "tags": [ + "ReplicationLinks" + ], + "description": "Deletes the replication link.", + "operationId": "ReplicationLinks_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", "in": "path", - "description": "The name of the database containing the replication link.", "required": true, "type": "string" }, { - "name": "replicationLinkName", + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the replication link." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Delete replication link on server": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, @@ -110,18 +186,75 @@ ], "responses": { "200": { - "description": "Successfully retrieved the specified replication link.", + "description": "Successfully failed over.", "schema": { "$ref": "#/definitions/ReplicationLink" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." } }, + "x-ms-long-running-operation": true, "x-ms-examples": { - "Gets the replication link.": { - "$ref": "./examples/ReplicationLinkGet.json" + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" } } } @@ -138,11 +271,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server containing the replication link.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" @@ -155,11 +284,11 @@ "200": { "description": "Successfully retrieved the list of replication links.", "schema": { - "$ref": "#/definitions/ReplicationLinksListResult" + "$ref": "#/definitions/ReplicationLinkListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-pageable": { @@ -174,7 +303,23 @@ } }, "definitions": { - "ReplicationLinksListResult": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkListResult": { "description": "A list of replication links.", "type": "object", "properties": { @@ -214,13 +359,35 @@ }, "role": { "description": "Local replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } }, "partnerRole": { "description": "Partner replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } }, "replicationMode": { "description": "Replication mode.", @@ -241,8 +408,18 @@ }, "replicationState": { "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "enum": [ + "PENDING", + "SEEDING", + "CATCH_UP", + "SUSPENDED" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + } }, "isTerminationAllowed": { "description": "Whether the user is currently allowed to terminate the link.", @@ -250,30 +427,40 @@ "readOnly": true }, "linkType": { - "description": "Link type (GEO, NAMED).", + "description": "Link type (GEO, NAMED, STANDBY).", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } } } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" }, - "ReplicationLink": { - "description": "A replication link.", - "type": "object", - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/ReplicationLinkProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } }, - "parameters": {}, "securityDefinitions": { "azure_auth": { "type": "oauth2", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ReplicationLinks.json index 0f943691370a..6a489a755df7 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ReplicationLinks.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ReplicationLinks.json @@ -28,18 +28,10 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server containing the replication link.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { - "name": "databaseName", - "in": "path", - "description": "The name of the database containing the replication link.", - "required": true, - "type": "string" + "$ref": "#/parameters/DatabaseNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" @@ -52,7 +44,7 @@ "200": { "description": "Successfully retrieved the list of replication links.", "schema": { - "$ref": "#/definitions/ReplicationLinksListResult" + "$ref": "#/definitions/ReplicationLinkListResult" } }, "default": { @@ -69,7 +61,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{replicationLinkName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}": { "get": { "tags": [ "ReplicationLinks" @@ -81,21 +73,105 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", "in": "path", - "description": "The name of the server containing the replication link.", + "description": "The name of the replication link.", "required": true, "type": "string" }, { - "name": "databaseName", + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Gets the replication link.": { + "$ref": "./examples/ReplicationLinkGet.json" + } + } + }, + "delete": { + "tags": [ + "ReplicationLinks" + ], + "description": "Deletes the replication link.", + "operationId": "ReplicationLinks_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", "in": "path", - "description": "The name of the database containing the replication link.", "required": true, "type": "string" }, { - "name": "replicationLinkName", + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the replication link." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Delete replication link on server": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, @@ -110,18 +186,75 @@ ], "responses": { "200": { - "description": "Successfully retrieved the specified replication link.", + "description": "Successfully failed over.", "schema": { "$ref": "#/definitions/ReplicationLink" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." } }, + "x-ms-long-running-operation": true, "x-ms-examples": { - "Gets the replication link.": { - "$ref": "./examples/ReplicationLinkGet.json" + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" } } } @@ -138,11 +271,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server containing the replication link.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" @@ -155,11 +284,11 @@ "200": { "description": "Successfully retrieved the list of replication links.", "schema": { - "$ref": "#/definitions/ReplicationLinksListResult" + "$ref": "#/definitions/ReplicationLinkListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-pageable": { @@ -174,7 +303,23 @@ } }, "definitions": { - "ReplicationLinksListResult": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkListResult": { "description": "A list of replication links.", "type": "object", "properties": { @@ -214,13 +359,35 @@ }, "role": { "description": "Local replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } }, "partnerRole": { "description": "Partner replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } }, "replicationMode": { "description": "Replication mode.", @@ -241,8 +408,18 @@ }, "replicationState": { "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "enum": [ + "PENDING", + "SEEDING", + "CATCH_UP", + "SUSPENDED" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + } }, "isTerminationAllowed": { "description": "Whether the user is currently allowed to terminate the link.", @@ -250,30 +427,40 @@ "readOnly": true }, "linkType": { - "description": "Link type (GEO, NAMED).", + "description": "Link type (GEO, NAMED, STANDBY).", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } } } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" }, - "ReplicationLink": { - "description": "A replication link.", - "type": "object", - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/ReplicationLinkProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } }, - "parameters": {}, "securityDefinitions": { "azure_auth": { "type": "oauth2", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/ReplicationLinks.json index 011ac45a9c8e..31c92147a96e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/ReplicationLinks.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/ReplicationLinks.json @@ -28,18 +28,10 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server containing the replication link.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { - "name": "databaseName", - "in": "path", - "description": "The name of the database containing the replication link.", - "required": true, - "type": "string" + "$ref": "#/parameters/DatabaseNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" @@ -52,7 +44,7 @@ "200": { "description": "Successfully retrieved the list of replication links.", "schema": { - "$ref": "#/definitions/ReplicationLinksListResult" + "$ref": "#/definitions/ReplicationLinkListResult" } }, "default": { @@ -69,7 +61,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{replicationLinkName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}": { "get": { "tags": [ "ReplicationLinks" @@ -81,21 +73,105 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", "in": "path", - "description": "The name of the server containing the replication link.", + "description": "The name of the replication link.", "required": true, "type": "string" }, { - "name": "databaseName", + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Gets the replication link.": { + "$ref": "./examples/ReplicationLinkGet.json" + } + } + }, + "delete": { + "tags": [ + "ReplicationLinks" + ], + "description": "Deletes the replication link.", + "operationId": "ReplicationLinks_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", "in": "path", - "description": "The name of the database containing the replication link.", "required": true, "type": "string" }, { - "name": "replicationLinkName", + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the replication link." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Delete replication link on server": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, @@ -110,18 +186,75 @@ ], "responses": { "200": { - "description": "Successfully retrieved the specified replication link.", + "description": "Successfully failed over.", "schema": { "$ref": "#/definitions/ReplicationLink" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." } }, + "x-ms-long-running-operation": true, "x-ms-examples": { - "Gets the replication link.": { - "$ref": "./examples/ReplicationLinkGet.json" + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" } } } @@ -138,11 +271,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server containing the replication link.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" @@ -155,11 +284,11 @@ "200": { "description": "Successfully retrieved the list of replication links.", "schema": { - "$ref": "#/definitions/ReplicationLinksListResult" + "$ref": "#/definitions/ReplicationLinkListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-pageable": { @@ -174,7 +303,23 @@ } }, "definitions": { - "ReplicationLinksListResult": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkListResult": { "description": "A list of replication links.", "type": "object", "properties": { @@ -214,13 +359,35 @@ }, "role": { "description": "Local replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } }, "partnerRole": { "description": "Partner replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } }, "replicationMode": { "description": "Replication mode.", @@ -241,8 +408,18 @@ }, "replicationState": { "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "enum": [ + "PENDING", + "SEEDING", + "CATCH_UP", + "SUSPENDED" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + } }, "isTerminationAllowed": { "description": "Whether the user is currently allowed to terminate the link.", @@ -250,30 +427,40 @@ "readOnly": true }, "linkType": { - "description": "Link type (GEO, NAMED).", + "description": "Link type (GEO, NAMED, STANDBY).", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } } } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" }, - "ReplicationLink": { - "description": "A replication link.", - "type": "object", - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/ReplicationLinkProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } }, - "parameters": {}, "securityDefinitions": { "azure_auth": { "type": "oauth2", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/ReplicationLinks.json index bb87cb319b13..6ea72cce57de 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/ReplicationLinks.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/ReplicationLinks.json @@ -100,7 +100,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-examples": { @@ -143,7 +143,118 @@ "description": "Successfully deleted the replication link." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Delete replication link on server": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" } } } @@ -177,7 +288,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-pageable": { @@ -192,6 +303,22 @@ } }, "definitions": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, "ReplicationLinkListResult": { "description": "A list of replication links.", "type": "object", @@ -300,10 +427,11 @@ "readOnly": true }, "linkType": { - "description": "Link type (GEO, NAMED).", + "description": "Link type (GEO, NAMED, STANDBY).", "enum": [ "GEO", - "NAMED" + "NAMED", + "STANDBY" ], "type": "string", "readOnly": true, @@ -313,37 +441,21 @@ } } } - }, - "ReplicationLink": { - "description": "A replication link.", - "type": "object", - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/ReplicationLinkProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } } }, "parameters": { - "ServerNameParameter": { - "name": "serverName", + "DatabaseNameParameter": { + "name": "databaseName", "in": "path", - "description": "The name of the server.", + "description": "The name of the database.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, - "DatabaseNameParameter": { - "name": "databaseName", + "ServerNameParameter": { + "name": "serverName", "in": "path", - "description": "The name of the database.", + "description": "The name of the server.", "required": true, "type": "string", "x-ms-parameter-location": "method" diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/ReplicationLinks.json index d0f47c5a0a4a..88709ac777be 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/ReplicationLinks.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/ReplicationLinks.json @@ -100,7 +100,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-examples": { @@ -143,7 +143,118 @@ "description": "Successfully deleted the replication link." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." + } + }, + "x-ms-examples": { + "Delete replication link on server": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" } } } @@ -177,7 +288,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-pageable": { @@ -192,6 +303,22 @@ } }, "definitions": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, "ReplicationLinkListResult": { "description": "A list of replication links.", "type": "object", @@ -300,10 +427,11 @@ "readOnly": true }, "linkType": { - "description": "Link type (GEO, NAMED).", + "description": "Link type (GEO, NAMED, STANDBY).", "enum": [ "GEO", - "NAMED" + "NAMED", + "STANDBY" ], "type": "string", "readOnly": true, @@ -313,37 +441,21 @@ } } } - }, - "ReplicationLink": { - "description": "A replication link.", - "type": "object", - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/ReplicationLinkProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } } }, "parameters": { - "ServerNameParameter": { - "name": "serverName", + "DatabaseNameParameter": { + "name": "databaseName", "in": "path", - "description": "The name of the server.", + "description": "The name of the database.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, - "DatabaseNameParameter": { - "name": "databaseName", + "ServerNameParameter": { + "name": "serverName", "in": "path", - "description": "The name of the database.", + "description": "The name of the server.", "required": true, "type": "string", "x-ms-parameter-location": "method" diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/ReplicationLinks.json index d9d7192d59cd..904bc6ddd679 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/ReplicationLinks.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/ReplicationLinks.json @@ -100,7 +100,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-examples": { @@ -143,7 +143,7 @@ "description": "Successfully deleted the replication link." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-examples": { @@ -192,7 +192,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Failover operation is in progress." @@ -245,7 +245,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation." }, "202": { "description": "Failover operation is in progress." @@ -288,7 +288,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found." + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 404 ResourceNotFound - The requested resource was not found.\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." } }, "x-ms-pageable": { @@ -427,10 +427,11 @@ "readOnly": true }, "linkType": { - "description": "Link type (GEO, NAMED).", + "description": "Link type (GEO, NAMED, STANDBY).", "enum": [ "GEO", - "NAMED" + "NAMED", + "STANDBY" ], "type": "string", "readOnly": true,