diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json index fb5d96911be7..c31d094836da 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-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,13 @@ "$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" }, { - "name": "replicationLinkName", + "name": "linkId", "in": "path", "description": "The name of the replication link.", "required": true, @@ -138,11 +122,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,7 +135,7 @@ "200": { "description": "Successfully retrieved the list of replication links.", "schema": { - "$ref": "#/definitions/ReplicationLinksListResult" + "$ref": "#/definitions/ReplicationLinkListResult" } }, "default": { @@ -174,7 +154,7 @@ } }, "definitions": { - "ReplicationLinksListResult": { + "ReplicationLinkListResult": { "description": "A list of replication links.", "type": "object", "properties": { @@ -214,13 +194,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 +243,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.", @@ -251,8 +263,16 @@ }, "linkType": { "description": "Link type (GEO, NAMED).", + "enum": [ + "GEO", + "NAMED" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } } } }, @@ -273,7 +293,24 @@ } } }, - "parameters": {}, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, "securityDefinitions": { "azure_auth": { "type": "oauth2", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkGet.json index dd33bc425033..02f0485b4438 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ReplicationLinkGet.json @@ -4,7 +4,7 @@ "resourceGroupName": "Default", "serverName": "sourcesvr", "databaseName": "gamma-db", - "replicationLinkName": "4891ca10-ebd0-47d7-9182-c722651780fb", + "linkId": "4891ca10-ebd0-47d7-9182-c722651780fb", "api-version": "2021-02-01-preview" }, "responses": { diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 2e836179d4f8..ee7a8066aa93 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -120,7 +120,6 @@ input-file: - ./Microsoft.Sql/preview/2020-11-01-preview/PrivateEndpointConnections.json - ./Microsoft.Sql/preview/2020-11-01-preview/PrivateLinkResources.json - ./Microsoft.Sql/preview/2020-11-01-preview/RecoverableManagedDatabases.json -- ./Microsoft.Sql/preview/2020-11-01-preview/ReplicationLinks.json - ./Microsoft.Sql/preview/2020-11-01-preview/RestorePoints.json - ./Microsoft.Sql/preview/2020-11-01-preview/SensitivityLabels.json - ./Microsoft.Sql/preview/2020-11-01-preview/ServerAdvisors.json @@ -151,6 +150,7 @@ input-file: - ./Microsoft.Sql/preview/2021-02-01-preview/DatabaseUsages.json - ./Microsoft.Sql/preview/2021-02-01-preview/LedgerDigestUploads.json - ./Microsoft.Sql/preview/2021-02-01-preview/OutboundFirewallRules.json +- ./Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json - ./Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedDatabases.json - ./Microsoft.Sql/preview/2021-02-01-preview/RestorableDroppedManagedDatabases.json - ./Microsoft.Sql/preview/2021-02-01-preview/Servers.json