diff --git a/src/Sql/Sql.Test/Sql.Test.csproj b/src/Sql/Sql.Test/Sql.Test.csproj
index 519f8a4f1b35..265028f1d448 100644
--- a/src/Sql/Sql.Test/Sql.Test.csproj
+++ b/src/Sql/Sql.Test/Sql.Test.csproj
@@ -19,7 +19,7 @@
-
+
diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md
index c82d049941ed..6436ac3f2bd3 100644
--- a/src/Sql/Sql/ChangeLog.md
+++ b/src/Sql/Sql/ChangeLog.md
@@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Upcoming Release
+* Added UsePrivateLinkConnection to `New-AzSqlSyncGroup`, `Update-AzSqlSyncGroup`, `New-AzSqlSyncMember` and `Update-AzSqlSyncMember`
+* Added SyncMemberAzureDatabaseResourceId to `New-AzSqlSyncMember` and `Update-AzSqlSyncMember`
## Version 2.6.1
* Enhance performance of:
diff --git a/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncGroup.cs b/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncGroup.cs
index 048a9548b1c0..daa35d17cdeb 100644
--- a/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncGroup.cs
+++ b/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncGroup.cs
@@ -17,7 +17,7 @@
using System.Linq;
using Microsoft.Azure.Commands.Sql.DataSync.Model;
using Microsoft.Azure.Management.Sql.Models;
-using Hyak.Common;
+using Microsoft.Rest.Azure;
using Newtonsoft.Json.Linq;
using System.IO;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
@@ -95,6 +95,12 @@ public class NewAzureSqlSyncGroup : AzureSqlSyncGroupCmdletBase
[ValidateNotNullOrEmpty]
public string SchemaFile { get; set; }
+ ///
+ /// Gets or sets if private link should be used
+ ///
+ [Parameter(Mandatory = false, HelpMessage = "Use a private link connection when connecting to the hub of this sync group.")]
+ public SwitchParameter UsePrivateLinkConnection { get; set; }
+
///
/// The id of database used to store sync related metadata
///
@@ -153,6 +159,8 @@ protected override IEnumerable ApplyUserInputToModel(IEn
newModel.IntervalInSeconds = this.IntervalInSeconds;
}
+ newModel.UsePrivateLinkConnection = UsePrivateLinkConnection.IsPresent;
+
if (MyInvocation.BoundParameters.ContainsKey("SyncDatabaseResourceGroupName")
&& MyInvocation.BoundParameters.ContainsKey("SyncDatabaseServerName")
&& MyInvocation.BoundParameters.ContainsKey("SyncDatabaseName"))
diff --git a/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncMember.cs b/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncMember.cs
index e3a96dce1ee8..0a14f3a58574 100644
--- a/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncMember.cs
+++ b/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncMember.cs
@@ -16,7 +16,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
-using Hyak.Common;
+using Microsoft.Rest.Azure;
using Microsoft.Azure.Commands.Sql.DataSync.Model;
using Microsoft.Azure.Commands.Sql.Properties;
using Microsoft.Azure.Management.Sql.LegacySdk.Models;
@@ -146,6 +146,24 @@ public class NewAzureSqlSyncMember : AzureSqlSyncMemberCmdletBase
[ValidateSet("Bidirectional", "OneWayMemberToHub", "OneWayHubToMember", IgnoreCase = true)]
public string SyncDirection { get; set; }
+ ///
+ /// Gets or sets a value indicating whether to use private link connection
+ ///
+ [Parameter(Mandatory = false, HelpMessage = "Use a private link connection when connecting to this sync member.")]
+ public SwitchParameter UsePrivateLinkConnection { get; set; }
+
+ ///
+ /// Gets or sets the sync member resource Id
+ ///
+ ///
+ /// The sync member database id (only for sync member using Azure SQL Database), e.g. "subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncMemberServer01}/databases/{syncMemberDatabaseName01}"
+ ///
+ ///
+ /// This needs to be a sync member sql azure database id (i.e. full arm uri) so that we can validate calling user's R/W access to this database via RBAC.
+ ///
+ [Parameter(Mandatory = false, HelpMessage = "The resource ID for the sync member database, used if UsePrivateLinkConnection is set to true.")]
+ public string SyncMemberAzureDatabaseResourceId { get; set; }
+
///
/// The id of the sync agent which is connected by the on-premises SQL server.
///
@@ -198,6 +216,18 @@ protected override IEnumerable ApplyUserInputToModel(IE
SyncDirection = this.SyncDirection,
MemberDatabaseType = this.MemberDatabaseType
};
+
+ if (UsePrivateLinkConnection.IsPresent)
+ {
+ if (!MyInvocation.BoundParameters.ContainsKey(nameof(SyncMemberAzureDatabaseResourceId)))
+ {
+ throw new PSArgumentException(
+ Microsoft.Azure.Commands.Sql.Properties.Resources.SyncMemberIdRequired, nameof(SyncMemberAzureDatabaseResourceId));
+ }
+
+ newModel.UsePrivateLinkConnection = true;
+ newModel.SyncMemberAzureDatabaseResourceId = this.SyncMemberAzureDatabaseResourceId;
+ }
if(ParameterSetName == AzureSqlSet)
{
diff --git a/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncGroup.cs b/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncGroup.cs
index f83d3bb89fa5..4c3f4f4f0039 100644
--- a/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncGroup.cs
+++ b/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncGroup.cs
@@ -56,6 +56,12 @@ public class UpdateAzureSqlSyncGroup : AzureSqlSyncGroupCmdletBase
[Parameter(Mandatory = false, HelpMessage = "The path of the schema file.")]
public string SchemaFile { get; set; }
+ ///
+ /// Gets or sets if private link should be used
+ ///
+ [Parameter(Mandatory = false, HelpMessage = "Whether to use a private link connection when connecting to the hub of this sync group.")]
+ public bool UsePrivateLinkConnection { get; set; }
+
///
/// Get the entities from the service
///
@@ -81,6 +87,11 @@ protected override IEnumerable ApplyUserInputToModel(IEn
newModel.IntervalInSeconds = this.IntervalInSeconds;
}
+ if (MyInvocation.BoundParameters.ContainsKey(nameof(UsePrivateLinkConnection)))
+ {
+ newModel.UsePrivateLinkConnection = this.UsePrivateLinkConnection;
+ }
+
if (MyInvocation.BoundParameters.ContainsKey("DatabaseCredential"))
{
newModel.HubDatabaseUserName = this.DatabaseCredential.UserName;
diff --git a/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncMember.cs b/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncMember.cs
index 972b73ba7da6..0301ba307d07 100644
--- a/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncMember.cs
+++ b/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncMember.cs
@@ -40,10 +40,27 @@ public class UpdateAzureSqlSyncMember : AzureSqlSyncMemberCmdletBase
///
/// Gets or sets the credential (username and password) of the Azure SQL Database.
///
- [Parameter(Mandatory = true, HelpMessage = "The credential (username and password) of the Azure SQL Database.")]
- [ValidateNotNull]
+ [Parameter(Mandatory = false, HelpMessage = "The credential (username and password) of the Azure SQL Database.")]
public PSCredential MemberDatabaseCredential { get; set; }
+ ///
+ /// Gets or sets a value indicating whether to use private link connection
+ ///
+ [Parameter(Mandatory = false, HelpMessage = "Whether to use private link when connecting to this sync member.")]
+ public bool? UsePrivateLinkConnection { get; set; }
+
+ ///
+ /// Gets or sets the sync member resource Id
+ ///
+ ///
+ /// The sync member database id (only for sync member using Azure SQL Database), e.g. "subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncMemberServer01}/databases/{syncMemberDatabaseName01}"
+ ///
+ ///
+ /// This needs to be a sync member sql azure database id (i.e. full arm uri) so that we can validate calling user's R/W access to this database via RBAC.
+ ///
+ [Parameter(Mandatory = false, HelpMessage = "The resource ID for the sync member database, used if UsePrivateLinkConnection is set to true.")]
+ public string SyncMemberAzureDatabaseResourceId { get; set; }
+
///
/// Get the entities from the service
///
@@ -64,6 +81,18 @@ protected override IEnumerable ApplyUserInputToModel(IE
{
AzureSqlSyncMemberModel newModel = model.First();
+ if (MyInvocation.BoundParameters.ContainsKey(nameof(UsePrivateLinkConnection)))
+ {
+ if (this.UsePrivateLinkConnection.GetValueOrDefault() && !MyInvocation.BoundParameters.ContainsKey(nameof(SyncMemberAzureDatabaseResourceId)))
+ {
+ throw new PSArgumentException(
+ Microsoft.Azure.Commands.Sql.Properties.Resources.SyncMemberIdRequired, nameof(SyncMemberAzureDatabaseResourceId));
+ }
+
+ newModel.UsePrivateLinkConnection = this.UsePrivateLinkConnection;
+ newModel.SyncMemberAzureDatabaseResourceId = this.SyncMemberAzureDatabaseResourceId;
+ }
+
if (MyInvocation.BoundParameters.ContainsKey("MemberDatabaseCredential"))
{
newModel.MemberDatabaseUserName = this.MemberDatabaseCredential.UserName;
diff --git a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupModel.cs b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupModel.cs
index ec6bfcdff9f8..889cc5b9573e 100644
--- a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupModel.cs
+++ b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupModel.cs
@@ -14,7 +14,7 @@
using System;
using System.Security;
-using Microsoft.Azure.Management.Sql.LegacySdk.Models;
+using Microsoft.Azure.Management.Sql.Models;
namespace Microsoft.Azure.Commands.Sql.DataSync.Model
{
@@ -88,6 +88,11 @@ public class AzureSqlSyncGroupModel
///
public AzureSqlSyncGroupSchemaModel Schema { get; set; }
+ ///
+ /// Gets or sets if private link connection should be used
+ ///
+ public bool? UsePrivateLinkConnection { get; set; }
+
///
/// Construct AzureSqlSyncGroupModel
///
@@ -110,13 +115,14 @@ public AzureSqlSyncGroupModel(string resourceGroupName, string serverName, strin
DatabaseName = databaseName;
ResourceId = syncGroup.Id;
SyncGroupName = syncGroup.Name;
- IntervalInSeconds = syncGroup.Properties.Interval;
- SyncDatabaseId = syncGroup.Properties.SyncDatabaseId;
- HubDatabaseUserName = syncGroup.Properties.HubDatabaseUserName;
- ConflictResolutionPolicy = syncGroup.Properties.ConflictResolutionPolicy == null ? null : syncGroup.Properties.ConflictResolutionPolicy.ToString();
- SyncState = syncGroup.Properties.SyncState;
- LastSyncTime = syncGroup.Properties.LastSyncTime;
- Schema = syncGroup.Properties.Schema == null ? null : new AzureSqlSyncGroupSchemaModel(syncGroup.Properties.Schema);
+ IntervalInSeconds = syncGroup.Interval;
+ SyncDatabaseId = syncGroup.SyncDatabaseId;
+ HubDatabaseUserName = syncGroup.HubDatabaseUserName;
+ ConflictResolutionPolicy = syncGroup.ConflictResolutionPolicy == null ? null : syncGroup.ConflictResolutionPolicy.ToString();
+ SyncState = syncGroup.SyncState;
+ LastSyncTime = syncGroup.LastSyncTime;
+ Schema = syncGroup.Schema == null ? null : new AzureSqlSyncGroupSchemaModel(syncGroup.Schema);
+ UsePrivateLinkConnection = syncGroup.UsePrivateLinkConnection;
}
}
}
diff --git a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaColumnModel.cs b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaColumnModel.cs
index 18752ac38b37..b52fe9a83ebe 100644
--- a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaColumnModel.cs
+++ b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaColumnModel.cs
@@ -14,7 +14,7 @@
using System;
using System.Collections.Generic;
-using Microsoft.Azure.Management.Sql.LegacySdk.Models;
+using Microsoft.Azure.Management.Sql.Models;
namespace Microsoft.Azure.Commands.Sql.DataSync.Model
{
@@ -50,16 +50,16 @@ public AzureSqlSyncGroupSchemaColumnModel()
/// Construct AzureSqlSyncGroupSchemaColumnModel
///
/// sync group schema column
- public AzureSqlSyncGroupSchemaColumnModel(SyncGroupSchemaColumn column)
+ public AzureSqlSyncGroupSchemaColumnModel(SyncGroupSchemaTableColumn column)
{
QuotedName = column != null ? column.QuotedName : null;
DataSize = column != null ? column.DataSize : null;
DataType = column != null ? column.DataType : null;
}
- public SyncGroupSchemaColumn ToSyncGroupSchemaColumn()
+ public SyncGroupSchemaTableColumn ToSyncGroupSchemaColumn()
{
- return new SyncGroupSchemaColumn
+ return new SyncGroupSchemaTableColumn
{
DataSize = this.DataSize,
DataType = this.DataType,
diff --git a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaModel.cs b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaModel.cs
index 5d61eaf5c93e..54f048660279 100644
--- a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaModel.cs
+++ b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaModel.cs
@@ -14,7 +14,7 @@
using System;
using System.Collections.Generic;
-using Microsoft.Azure.Management.Sql.LegacySdk.Models;
+using Microsoft.Azure.Management.Sql.Models;
namespace Microsoft.Azure.Commands.Sql.DataSync.Model
{
diff --git a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaTableModel.cs b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaTableModel.cs
index 0df9a9513e71..b16b90cfa8bb 100644
--- a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaTableModel.cs
+++ b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupSchemaTableModel.cs
@@ -14,7 +14,7 @@
using System;
using System.Collections.Generic;
-using Microsoft.Azure.Management.Sql.LegacySdk.Models;
+using Microsoft.Azure.Management.Sql.Models;
namespace Microsoft.Azure.Commands.Sql.DataSync.Model
{
@@ -64,10 +64,10 @@ public AzureSqlSyncGroupSchemaTableModel(SyncGroupSchemaTable table)
/// The result SyncGroupSchemaTable
public SyncGroupSchemaTable ToSyncGroupSchemaTable()
{
- List syncGroupSchemaColumns = null;
+ List syncGroupSchemaColumns = null;
if (Columns != null)
{
- syncGroupSchemaColumns = new List();
+ syncGroupSchemaColumns = new List();
foreach (var column in Columns)
{
syncGroupSchemaColumns.Add(column.ToSyncGroupSchemaColumn());
diff --git a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncMemberModel.cs b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncMemberModel.cs
index 408a536ed873..4375e8726510 100644
--- a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncMemberModel.cs
+++ b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncMemberModel.cs
@@ -13,7 +13,7 @@
// ----------------------------------------------------------------------------------
using System.Security;
-using Microsoft.Azure.Management.Sql.LegacySdk.Models;
+using Microsoft.Azure.Management.Sql.Models;
namespace Microsoft.Azure.Commands.Sql.DataSync.Model
{
@@ -97,6 +97,16 @@ public class AzureSqlSyncMemberModel
///
public string SyncState { get; set; }
+ ///
+ /// Gets or sets the sync member resource Id
+ ///
+ public string SyncMemberAzureDatabaseResourceId { get; set; }
+
+ ///
+ /// Gets or sets whether to use private link connection
+ ///
+ public bool? UsePrivateLinkConnection { get; set; }
+
///
/// Construct AzureSqlSyncMemberModel
///
@@ -120,14 +130,16 @@ public AzureSqlSyncMemberModel(string resourceGroup, string serverName, string d
ResourceId = syncMember.Id;
SyncGroupName = syncGroupName;
SyncMemberName = syncMember.Name;
- SyncDirection = syncMember.Properties.SyncDirection == null ? null : syncMember.Properties.SyncDirection.ToString();
- SyncAgentId = syncMember.Properties.SyncAgentId;
- SqlServerDatabaseId = syncMember.Properties.SqlServerDatabaseId;
- MemberServerName = syncMember.Properties.ServerName;
- MemberDatabaseName = syncMember.Properties.DatabaseName;
- MemberDatabaseUserName = syncMember.Properties.UserName;
- MemberDatabaseType = syncMember.Properties.DatabaseType == null ? null : syncMember.Properties.DatabaseType.ToString();
- SyncState = syncMember.Properties.SyncState;
+ SyncDirection = syncMember.SyncDirection == null ? null : syncMember.SyncDirection.ToString();
+ SyncAgentId = syncMember.SyncAgentId;
+ SqlServerDatabaseId = syncMember.SqlServerDatabaseId == null ? null : syncMember.SqlServerDatabaseId.ToString();
+ MemberServerName = syncMember.ServerName;
+ MemberDatabaseName = syncMember.DatabaseName;
+ MemberDatabaseUserName = syncMember.UserName;
+ MemberDatabaseType = syncMember.DatabaseType == null ? null : syncMember.DatabaseType.ToString();
+ SyncState = syncMember.SyncState;
+ UsePrivateLinkConnection = syncMember.UsePrivateLinkConnection;
+ SyncMemberAzureDatabaseResourceId = syncMember.SyncMemberAzureDatabaseResourceId;
}
}
}
diff --git a/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncAdapter.cs b/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncAdapter.cs
index 7f5ca1bd3493..2a0499e11b09 100644
--- a/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncAdapter.cs
+++ b/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncAdapter.cs
@@ -164,21 +164,18 @@ public void InvokeSyncMemberSchemaRefresh(string resourceGroupName, string serve
/// Created AzureSqlSyncGroupModel object
internal AzureSqlSyncGroupModel CreateSyncGroup(AzureSqlSyncGroupModel model, string syncDatabaseId)
{
- var resp = Communicator.CreateSyncGroup(model.ResourceGroupName, model.ServerName, model.DatabaseName, syncDatabaseId, new SyncGroupCreateOrUpdateParameters()
+ var createResp = Communicator.CreateSyncGroup(model.ResourceGroupName, model.ServerName, model.DatabaseName, syncDatabaseId, model.SyncGroupName, new Management.Sql.Models.SyncGroup()
{
- SyncGroupName = model.SyncGroupName,
- Properties = new SyncGroupCreateOrUpdateProperties
- {
- ConflictResolutionPolicy = (ConflictResolutionPolicyType)(model.ConflictResolutionPolicy != null ? Enum.Parse(typeof(ConflictResolutionPolicyType), model.ConflictResolutionPolicy, true) : null),
- Interval = model.IntervalInSeconds,
- HubDatabaseUserName = model.HubDatabaseUserName,
- HubDatabasePassword = model.HubDatabasePassword == null ? null : AzureSqlServerAdapter.Decrypt(model.HubDatabasePassword),
- Schema = model.Schema == null ? null : model.Schema.ToSyncGroupSchema(),
- },
+ ConflictResolutionPolicy = model.ConflictResolutionPolicy,
+ Interval = model.IntervalInSeconds,
+ HubDatabaseUserName = model.HubDatabaseUserName,
+ HubDatabasePassword = model.HubDatabasePassword == null ? null : AzureSqlServerAdapter.Decrypt(model.HubDatabasePassword),
+ Schema = model.Schema == null ? null : model.Schema.ToSyncGroupSchema(),
+ UsePrivateLinkConnection = model.UsePrivateLinkConnection,
});
// Workaround for Rest API return response value incorrect issue. Remove this line after backend fix is deployed
- resp = Communicator.GetSyncGroup(model.ResourceGroupName, model.ServerName, model.DatabaseName, model.SyncGroupName);
+ var resp = Communicator.GetSyncGroup(model.ResourceGroupName, model.ServerName, model.DatabaseName, model.SyncGroupName);
return CreateSyncGroupModelFromResponse(model.ResourceGroupName, model.ServerName, model.DatabaseName, resp);
}
@@ -189,20 +186,17 @@ internal AzureSqlSyncGroupModel CreateSyncGroup(AzureSqlSyncGroupModel model, st
/// Updated AzureSqlSyncGroupModel object
internal AzureSqlSyncGroupModel UpdateSyncGroup(AzureSqlSyncGroupModel model)
{
- var resp = Communicator.UpdateSyncGroup(model.ResourceGroupName, model.ServerName, model.DatabaseName, new SyncGroupCreateOrUpdateParameters()
+ var updateResp = Communicator.UpdateSyncGroup(model.ResourceGroupName, model.ServerName, model.DatabaseName, model.SyncGroupName, new Management.Sql.Models.SyncGroup()
{
- SyncGroupName = model.SyncGroupName,
- Properties = new SyncGroupCreateOrUpdateProperties
- {
- Interval = model.IntervalInSeconds,
- HubDatabaseUserName = model.HubDatabaseUserName,
- HubDatabasePassword = model.HubDatabasePassword == null ? null: AzureSqlServerAdapter.Decrypt(model.HubDatabasePassword),
- Schema = model.Schema == null ? null : model.Schema.ToSyncGroupSchema(),
- },
+ Interval = model.IntervalInSeconds,
+ HubDatabaseUserName = model.HubDatabaseUserName,
+ HubDatabasePassword = model.HubDatabasePassword == null ? null: AzureSqlServerAdapter.Decrypt(model.HubDatabasePassword),
+ Schema = model.Schema == null ? null : model.Schema.ToSyncGroupSchema(),
+ UsePrivateLinkConnection = model.UsePrivateLinkConnection,
});
// Workaround for Rest API return response value incorrect issue. Remove this line after backend fix is deployed
- resp = Communicator.GetSyncGroup(model.ResourceGroupName, model.ServerName, model.DatabaseName, model.SyncGroupName);
+ var resp = Communicator.GetSyncGroup(model.ResourceGroupName, model.ServerName, model.DatabaseName, model.SyncGroupName);
return CreateSyncGroupModelFromResponse(model.ResourceGroupName, model.ServerName, model.DatabaseName, resp);
}
@@ -306,32 +300,30 @@ public void RemoveSyncMember(string resourceGroupName, string serverName, string
/// Created AzureSqlSyncGroupModel object
internal AzureSqlSyncMemberModel CreateSyncMember(AzureSqlSyncMemberModel model, string syncAgentId)
{
- SyncMemberCreateOrUpdateProperties properties = new SyncMemberCreateOrUpdateProperties()
+ Management.Sql.Models.SyncMember properties = new Management.Sql.Models.SyncMember()
{
- SyncDirection = (SyncDirectionEnum?)(model.SyncDirection != null ? Enum.Parse(typeof(SyncDirectionEnum), model.SyncDirection, true) : null),
- DatabaseType = (DatabaseTypeEnum)(model.MemberDatabaseType != null ? Enum.Parse(typeof(DatabaseTypeEnum), model.MemberDatabaseType, true) : null)
+ SyncDirection = model.SyncDirection,
+ DatabaseType = model.MemberDatabaseType,
};
- if (properties.DatabaseType == DatabaseTypeEnum.AzureSqlDatabase)
+
+ if (properties.DatabaseType == DatabaseTypeEnum.AzureSqlDatabase.ToString())
{
properties.DatabaseName = model.MemberDatabaseName;
properties.ServerName = model.MemberServerName;
properties.UserName = model.MemberDatabaseUserName;
properties.Password = model.MemberDatabasePassword == null ? null : AzureSqlServerAdapter.Decrypt(model.MemberDatabasePassword);
+ properties.UsePrivateLinkConnection = model.UsePrivateLinkConnection;
+ properties.SyncMemberAzureDatabaseResourceId = model.SyncMemberAzureDatabaseResourceId;
}
else
{
- properties.SqlServerDatabaseId = model.SqlServerDatabaseId;
+ properties.SqlServerDatabaseId = model.SqlServerDatabaseId == null ? null : (Guid?)Guid.Parse(model.SqlServerDatabaseId);
properties.SyncAgentId = model.SyncAgentId;
}
- var resp = Communicator.CreateSyncMember(model.ResourceGroupName, model.ServerName, model.DatabaseName, syncAgentId, new SyncMemberCreateOrUpdateParameters()
- {
- SyncGroupName = model.SyncGroupName,
- SyncMemberName = model.SyncMemberName,
- Properties = properties,
- });
+ var createResp = Communicator.CreateSyncMember(model.ResourceGroupName, model.ServerName, model.DatabaseName, model.SyncGroupName, model.SyncMemberName, syncAgentId, properties);
// Workaround for Rest API return response value incorrect issue. Remove this line after backend fix is deployed
- resp = Communicator.GetSyncMember(model.ResourceGroupName, model.ServerName, model.DatabaseName, new SyncMemberGeneralParameters()
+ var resp = Communicator.GetSyncMember(model.ResourceGroupName, model.ServerName, model.DatabaseName, new SyncMemberGeneralParameters()
{
SyncGroupName = model.SyncGroupName,
SyncMemberName = model.SyncMemberName,
@@ -348,23 +340,20 @@ internal AzureSqlSyncMemberModel CreateSyncMember(AzureSqlSyncMemberModel model,
/// Updated AzureSqlSyncGroupModel object
internal AzureSqlSyncMemberModel UpdateSyncMember(AzureSqlSyncMemberModel model)
{
- SyncMemberCreateOrUpdateProperties properties = new SyncMemberCreateOrUpdateProperties()
+ Management.Sql.Models.SyncMember properties = new Management.Sql.Models.SyncMember()
{
- DatabaseType = (DatabaseTypeEnum)(model.MemberDatabaseType != null ? Enum.Parse(typeof(DatabaseTypeEnum), model.MemberDatabaseType, true) : null),
+ DatabaseType = model.MemberDatabaseType,
DatabaseName = model.MemberDatabaseName,
ServerName = model.MemberServerName,
UserName = model.MemberDatabaseUserName,
- Password = model.MemberDatabasePassword == null ? null : AzureSqlServerAdapter.Decrypt(model.MemberDatabasePassword)
+ Password = model.MemberDatabasePassword == null ? null : AzureSqlServerAdapter.Decrypt(model.MemberDatabasePassword),
+ UsePrivateLinkConnection = model.UsePrivateLinkConnection,
+ SyncMemberAzureDatabaseResourceId = model.SyncMemberAzureDatabaseResourceId
};
- var resp = Communicator.UpdateSyncMember(model.ResourceGroupName, model.ServerName, model.DatabaseName, new SyncMemberCreateOrUpdateParameters()
- {
- SyncGroupName = model.SyncGroupName,
- SyncMemberName = model.SyncMemberName,
- Properties = properties
- });
+ var updateResp = Communicator.UpdateSyncMember(model.ResourceGroupName, model.ServerName, model.DatabaseName, model.SyncGroupName, model.SyncMemberName, properties);
// Workaround for Rest API return response value incorrect issue. Remove this line after backend fix is deployed
- resp = Communicator.GetSyncMember(model.ResourceGroupName, model.ServerName, model.DatabaseName, new SyncMemberGeneralParameters()
+ var resp = Communicator.GetSyncMember(model.ResourceGroupName, model.ServerName, model.DatabaseName, new SyncMemberGeneralParameters()
{
SyncGroupName = model.SyncGroupName,
SyncMemberName = model.SyncMemberName,
@@ -487,7 +476,7 @@ internal ICollection ListSyncAgentLinkedDa
/// The name of the database
/// The sync group object from the response
/// The converted model
- public static AzureSqlSyncGroupModel CreateSyncGroupModelFromResponse(string resourceGroupName, string serverName, string databaseName, SyncGroup syncGroup)
+ public static AzureSqlSyncGroupModel CreateSyncGroupModelFromResponse(string resourceGroupName, string serverName, string databaseName, Management.Sql.Models.SyncGroup syncGroup)
{
return new AzureSqlSyncGroupModel(resourceGroupName, serverName, databaseName, syncGroup);
}
@@ -510,7 +499,7 @@ public static AzureSqlSyncGroupLogModel CreateSyncGroupLogModelFromResponse(Sync
/// The name of the database
/// The sync member object from the response
/// The converted model
- public static AzureSqlSyncMemberModel CreateSyncMemberModelFromResponse(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncMember syncMember)
+ public static AzureSqlSyncMemberModel CreateSyncMemberModelFromResponse(string resourceGroupName, string serverName, string databaseName, string syncGroupName, Management.Sql.Models.SyncMember syncMember)
{
return new AzureSqlSyncMemberModel(resourceGroupName, serverName, databaseName, syncGroupName, syncMember);
}
diff --git a/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncCommunicator.cs b/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncCommunicator.cs
index 9c3948d744a9..a498f2d08988 100644
--- a/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncCommunicator.cs
+++ b/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncCommunicator.cs
@@ -16,6 +16,7 @@
using Microsoft.Azure.Management.Sql.LegacySdk.Models;
using System.Linq;
using System.Collections.Generic;
+using Microsoft.Azure.Management.Sql;
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
@@ -29,7 +30,7 @@ public class AzureSqlDataSyncCommunicator
///
/// The Sql client to be used by this end points communicator
///
- private static SqlManagementClient LegacySqlClient { get; set; }
+ private static Management.Sql.LegacySdk.SqlManagementClient LegacySqlClient { get; set; }
///
/// Gets or set the Azure subscription
@@ -39,7 +40,7 @@ public class AzureSqlDataSyncCommunicator
///
/// Gets or sets the Azure profile
///
- public IAzureContext Context { get; set; }
+ public static IAzureContext Context { get; set; }
///
/// Creates a communicator for Azure Sql Data Sync
@@ -107,35 +108,35 @@ public void RemoveSyncGroup(string resourceGroupName, string serverName, string
///
/// Create a sync group
///
- public SyncGroup CreateSyncGroup(string resourceGroupName, string serverName, string databaseName, string syncDatabaseId, SyncGroupCreateOrUpdateParameters parameters)
+ public Management.Sql.Models.SyncGroup CreateSyncGroup(string resourceGroupName, string serverName, string databaseName, string syncDatabaseId, string syncGroupName, Management.Sql.Models.SyncGroup parameters)
{
- SqlManagementClient client = GetLegacySqlClient();
- parameters.Properties.SyncDatabaseId = syncDatabaseId == null ? null : string.Format("/subscriptions/{0}/{1}", client.Credentials.SubscriptionId, syncDatabaseId);
- return client.DataSync.CreateOrUpdateSyncGroup(resourceGroupName, serverName, databaseName, parameters).SyncGroup;
+ Management.Sql.SqlManagementClient client = GetCurrentSqlClient();
+ parameters.SyncDatabaseId = syncDatabaseId == null ? null : string.Format("/subscriptions/{0}/{1}", Subscription.Id, syncDatabaseId);
+ return client.SyncGroups.CreateOrUpdate(resourceGroupName, serverName, databaseName, syncGroupName, parameters);
}
///
/// Update a sync group
///
- public SyncGroup UpdateSyncGroup(string resourceGroupName, string serverName, string databaseName, SyncGroupCreateOrUpdateParameters parameters)
+ public Management.Sql.Models.SyncGroup UpdateSyncGroup(string resourceGroupName, string serverName, string databaseName, string syncGroupName, Management.Sql.Models.SyncGroup parameters)
{
- return GetLegacySqlClient().DataSync.UpdateSyncGroup(resourceGroupName, serverName, databaseName, parameters).SyncGroup;
+ return GetCurrentSqlClient().SyncGroups.Update(resourceGroupName, serverName, databaseName, syncGroupName, parameters);
}
///
/// Get a sync group
///
- public SyncGroup GetSyncGroup(string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ public Management.Sql.Models.SyncGroup GetSyncGroup(string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- return GetLegacySqlClient().DataSync.GetSyncGroup(resourceGroupName, serverName, databaseName, syncGroupName).SyncGroup;
+ return GetCurrentSqlClient().SyncGroups.Get(resourceGroupName, serverName, databaseName, syncGroupName);
}
///
/// List all sync groups
///
- public IList ListSyncGroups(string resourceGroupName, string serverName, string databaseName)
+ public IEnumerable ListSyncGroups(string resourceGroupName, string serverName, string databaseName)
{
- return GetLegacySqlClient().DataSync.ListSyncGroup(resourceGroupName, serverName, databaseName).SyncGroups;
+ return GetCurrentSqlClient().SyncGroups.ListByDatabase(resourceGroupName, serverName, databaseName);
}
///
@@ -174,17 +175,17 @@ public SyncFullSchema GetSyncHubSchema(string resourceGroupName, string serverNa
///
/// Get a sync group
///
- public SyncMember GetSyncMember(string resourceGroupName, string serverName, string databaseName, SyncMemberGeneralParameters parameters)
+ public Management.Sql.Models.SyncMember GetSyncMember(string resourceGroupName, string serverName, string databaseName, SyncMemberGeneralParameters parameters)
{
- return GetLegacySqlClient().DataSync.GetSyncMember(resourceGroupName, serverName, databaseName, parameters).SyncMember;
+ return GetCurrentSqlClient().SyncMembers.Get(resourceGroupName, serverName, databaseName, parameters.SyncGroupName, parameters.SyncMemberName);
}
///
/// List all sync members
///
- public IList ListSyncMembers(string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ public IEnumerable ListSyncMembers(string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- return GetLegacySqlClient().DataSync.ListSyncMember(resourceGroupName, serverName, databaseName, syncGroupName).SyncMembers;
+ return GetCurrentSqlClient().SyncMembers.ListBySyncGroup(resourceGroupName, serverName, databaseName, syncGroupName);
}
///
@@ -198,22 +199,22 @@ public void RemoveSyncMember(string resourceGroupName, string serverName, string
///
/// Create a new sync member
///
- public SyncMember CreateSyncMember(string resourceGroupName, string serverName, string databaseName, string syncAgentId, SyncMemberCreateOrUpdateParameters parameters)
+ public Management.Sql.Models.SyncMember CreateSyncMember(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, string syncAgentId, Management.Sql.Models.SyncMember parameters)
{
- SqlManagementClient client = GetLegacySqlClient();
+ Management.Sql.SqlManagementClient client = GetCurrentSqlClient();
if (syncAgentId != null)
{
- parameters.Properties.SyncAgentId = string.Format("/subscriptions/{0}/{1}", client.Credentials.SubscriptionId, syncAgentId);
+ parameters.SyncAgentId = string.Format("/subscriptions/{0}/{1}", Subscription.Id, syncAgentId);
}
- return client.DataSync.CreateOrUpdateSyncMember(resourceGroupName, serverName, databaseName, parameters).SyncMember;
+ return client.SyncMembers.CreateOrUpdate(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters);
}
///
/// Update an existing sync member
///
- public SyncMember UpdateSyncMember(string resourceGroupName, string serverName, string databaseName, SyncMemberCreateOrUpdateParameters parameters)
+ public Management.Sql.Models.SyncMember UpdateSyncMember(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, Management.Sql.Models.SyncMember parameters)
{
- return GetLegacySqlClient().DataSync.UpdateSyncMember(resourceGroupName, serverName, databaseName, parameters).SyncMember;
+ return GetCurrentSqlClient().SyncMembers.Update(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters);
}
///
@@ -245,7 +246,7 @@ public void RemoveSyncAgent(string resourceGroupName, string serverName, string
///
public SyncAgent CreateSyncAgent(string resourceGroupName, string serverName, string syncAgentName, string syncDatabaseId, SyncAgentCreateOrUpdateParameters parameters)
{
- SqlManagementClient client = GetLegacySqlClient();
+ Management.Sql.LegacySdk.SqlManagementClient client = GetLegacySqlClient();
if (syncDatabaseId != null)
{
parameters.Properties.SyncDatabaseId = string.Format("/subscriptions/{0}/{1}", client.Credentials.SubscriptionId, syncDatabaseId);
@@ -261,6 +262,19 @@ public SyncAgentKeyResponse CreateSyncAgentKey(string resourceGroupName, string
return GetLegacySqlClient().DataSync.CreateSyncAgentKey(resourceGroupName, serverName, syncAgentName);
}
+ ///
+ /// Retrieve the SQL Management client for the currently selected subscription, adding the session and request
+ /// id tracing headers for the current cmdlet invocation.
+ ///
+ /// The SQL Management client for the currently selected subscription.
+ public static Management.Sql.SqlManagementClient GetCurrentSqlClient()
+ {
+ // Get the SQL management client for the current subscription
+ // Note: client is not cached in static field because that causes ObjectDisposedException in functional tests.
+ var sqlClient = AzureSession.Instance.ClientFactory.CreateArmClient(Context, AzureEnvironment.Endpoint.ResourceManager);
+ return sqlClient;
+ }
+
///
/// Retrieve the SQL Management client for the currently selected subscription, adding the session and request
/// id tracing headers for the current cmdlet invocation.
diff --git a/src/Sql/Sql/Properties/Resources.Designer.cs b/src/Sql/Sql/Properties/Resources.Designer.cs
index fc40503d5aa4..a8e4a79d0fd7 100644
--- a/src/Sql/Sql/Properties/Resources.Designer.cs
+++ b/src/Sql/Sql/Properties/Resources.Designer.cs
@@ -1455,6 +1455,15 @@ internal static string SyncGroupNameExists {
}
}
+ ///
+ /// Looks up a localized string similar to SyncMemberAzureDatabaseResourceId is a required parameter when UsePrivateLinkConnection is set to true. Please explicitly provide it..
+ ///
+ internal static string SyncMemberIdRequired {
+ get {
+ return ResourceManager.GetString("SyncMemberIdRequired", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Sync Member with name: ‘{0}' already exists in Sync Group '{1}'..
///
diff --git a/src/Sql/Sql/Properties/Resources.resx b/src/Sql/Sql/Properties/Resources.resx
index a115f7681c2d..9a37cf5d4b1e 100644
--- a/src/Sql/Sql/Properties/Resources.resx
+++ b/src/Sql/Sql/Properties/Resources.resx
@@ -622,4 +622,7 @@
Adding Storage Blob Data Contributor role for storage account {0} is forbidden
+
+ SyncMemberAzureDatabaseResourceId is a required parameter when UsePrivateLinkConnection is set to true. Please explicitly provide it.
+
\ No newline at end of file
diff --git a/src/Sql/Sql/Sql.csproj b/src/Sql/Sql/Sql.csproj
index 746cb2603bf0..ac135d9ea292 100644
--- a/src/Sql/Sql/Sql.csproj
+++ b/src/Sql/Sql/Sql.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/src/Sql/Sql/help/New-AzSqlSyncGroup.md b/src/Sql/Sql/help/New-AzSqlSyncGroup.md
index aade5d9029c7..9741d812b44a 100644
--- a/src/Sql/Sql/help/New-AzSqlSyncGroup.md
+++ b/src/Sql/Sql/help/New-AzSqlSyncGroup.md
@@ -15,9 +15,9 @@ Creates an Azure SQL Database Sync Group.
```
New-AzSqlSyncGroup [-Name] -SyncDatabaseName -SyncDatabaseServerName
-SyncDatabaseResourceGroupName [-IntervalInSeconds ] [-DatabaseCredential ]
- [-ConflictResolutionPolicy ] [-SchemaFile ] [-ServerName] [-DatabaseName]
- [-ResourceGroupName] [-DefaultProfile ] [-WhatIf] [-Confirm]
- []
+ [-ConflictResolutionPolicy ] [-SchemaFile ] [-UsePrivateLinkConnection] [-ServerName]
+ [-DatabaseName] [-ResourceGroupName] [-DefaultProfile ] [-WhatIf]
+ [-Confirm] []
```
## DESCRIPTION
@@ -236,6 +236,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
+### -UsePrivateLinkConnection
+Use a private link connection when connecting to the hub of this sync group.
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
### -Confirm
Prompts you for confirmation before running the cmdlet.
diff --git a/src/Sql/Sql/help/New-AzSqlSyncMember.md b/src/Sql/Sql/help/New-AzSqlSyncMember.md
index 2f2e1d5bec59..7dabb6c1c6b5 100644
--- a/src/Sql/Sql/help/New-AzSqlSyncMember.md
+++ b/src/Sql/Sql/help/New-AzSqlSyncMember.md
@@ -16,7 +16,8 @@ Creates an Azure SQL Database Sync Member.
```
New-AzSqlSyncMember -Name -MemberDatabaseType -MemberServerName
-MemberDatabaseName -MemberDatabaseCredential [-SyncDirection ]
- [-SyncGroupName] [-ServerName] [-DatabaseName] [-ResourceGroupName]
+ [-UsePrivateLinkConnection] [-SyncMemberAzureDatabaseResourceId ] [-SyncGroupName]
+ [-ServerName] [-DatabaseName] [-ResourceGroupName]
[-DefaultProfile ] [-WhatIf] [-Confirm] []
```
@@ -24,14 +25,16 @@ New-AzSqlSyncMember -Name -MemberDatabaseType -MemberServerNam
```
New-AzSqlSyncMember -Name -MemberDatabaseType -SyncAgentResourceGroupName
-SyncAgentServerName -SyncAgentName -SqlServerDatabaseId [-SyncDirection ]
- [-SyncGroupName] [-ServerName] [-DatabaseName] [-ResourceGroupName]
+ [-UsePrivateLinkConnection] [-SyncMemberAzureDatabaseResourceId ] [-SyncGroupName]
+ [-ServerName] [-DatabaseName] [-ResourceGroupName]
[-DefaultProfile ] [-WhatIf] [-Confirm] []
```
### OnPremisesDatabaseSyncAgentResourceID
```
New-AzSqlSyncMember -Name -MemberDatabaseType -SqlServerDatabaseId
- -SyncAgentResourceID [-SyncDirection ] [-SyncGroupName] [-ServerName]
+ -SyncAgentResourceID [-SyncDirection ] [-UsePrivateLinkConnection]
+ [-SyncMemberAzureDatabaseResourceId ] [-SyncGroupName] [-ServerName]
[-DatabaseName] [-ResourceGroupName] [-DefaultProfile ] [-WhatIf]
[-Confirm] []
```
@@ -334,6 +337,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
+### -SyncMemberAzureDatabaseResourceId
+The resource ID for the sync member database, used if UsePrivateLinkConnection is set to true.
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -UsePrivateLinkConnection
+Use a private link connection when connecting to this sync member.
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
### -Confirm
Prompts you for confirmation before running the cmdlet.
diff --git a/src/Sql/Sql/help/Update-AzSqlSyncGroup.md b/src/Sql/Sql/help/Update-AzSqlSyncGroup.md
index 01fa4654eac0..c9021d72b350 100644
--- a/src/Sql/Sql/help/Update-AzSqlSyncGroup.md
+++ b/src/Sql/Sql/help/Update-AzSqlSyncGroup.md
@@ -14,8 +14,9 @@ Updates an Azure SQL Database Sync Group.
```
Update-AzSqlSyncGroup [-Name] [-IntervalInSeconds ] [-DatabaseCredential ]
- [-SchemaFile ] [-ServerName] [-DatabaseName] [-ResourceGroupName]
- [-DefaultProfile ] [-WhatIf] [-Confirm] []
+ [-SchemaFile ] [-UsePrivateLinkConnection ] [-ServerName] [-DatabaseName]
+ [-ResourceGroupName] [-DefaultProfile ] [-WhatIf] [-Confirm]
+ []
```
## DESCRIPTION
@@ -172,6 +173,21 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
+### -UsePrivateLinkConnection
+Whether to use a private link connection when connecting to the hub of this sync group.
+
+```yaml
+Type: System.Boolean
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
### -Confirm
Prompts you for confirmation before running the cmdlet.
diff --git a/src/Sql/Sql/help/Update-AzSqlSyncMember.md b/src/Sql/Sql/help/Update-AzSqlSyncMember.md
index 7a412251ba20..c9022b26ffb1 100644
--- a/src/Sql/Sql/help/Update-AzSqlSyncMember.md
+++ b/src/Sql/Sql/help/Update-AzSqlSyncMember.md
@@ -13,7 +13,8 @@ Updates an Azure SQL Database Sync Member.
## SYNTAX
```
-Update-AzSqlSyncMember -Name -MemberDatabaseCredential [-SyncGroupName]
+Update-AzSqlSyncMember -Name -MemberDatabaseCredential
+ [-UsePrivateLinkConnection ] [-SyncMemberAzureDatabaseResourceId ] [-SyncGroupName]
[-ServerName] [-DatabaseName] [-ResourceGroupName]
[-DefaultProfile ] [-WhatIf] [-Confirm] []
```
@@ -154,6 +155,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
+### -SyncMemberAzureDatabaseResourceId
+The resource ID for the sync member database, used if UsePrivateLinkConnection is set to true.
+
+```yaml
+Type: System.String
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -UsePrivateLinkConnection
+Whether to use private link when connecting to this sync member.
+
+```yaml
+Type: System.Nullable`1[System.Boolean]
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
### -Confirm
Prompts you for confirmation before running the cmdlet.