diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentity.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentity.cs
new file mode 100644
index 000000000000..8f3890254580
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentity.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ ///
+ /// Azure Active Directory identity configuration for a resource.
+ ///
+ public partial class DataSyncParticipantIdentity
+ {
+ ///
+ /// Initializes a new instance of the DataSyncParticipantIdentity class.
+ ///
+ public DataSyncParticipantIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DataSyncParticipantIdentity class.
+ ///
+
+ /// The Datasync identity type
+ /// Possible values include: 'None', 'SystemAssigned', 'UserAssigned',
+ /// 'SystemAssignedUserAssigned'
+
+ /// The DataSync participant identity tenant id
+ ///
+
+ /// The resource ids of the user assigned identities to use
+ ///
+ public DataSyncParticipantIdentity(string type, System.Guid? tenantId = default(System.Guid?), System.Collections.Generic.IDictionary userAssignedIdentities = default(System.Collections.Generic.IDictionary))
+
+ {
+ this.Type = type;
+ this.TenantId = tenantId;
+ this.UserAssignedIdentities = userAssignedIdentities;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets the Datasync identity type Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "type")]
+ public string Type {get; set; }
+
+ ///
+ /// Gets or sets the DataSync participant identity tenant id
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")]
+ public System.Guid? TenantId {get; set; }
+
+ ///
+ /// Gets or sets the resource ids of the user assigned identities to use
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentities")]
+ public System.Collections.Generic.IDictionary UserAssignedIdentities {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Type == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Type");
+ }
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentityType.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentityType.cs
new file mode 100644
index 000000000000..9ef22aa9fa23
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentityType.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+
+ ///
+ /// Defines values for DataSyncParticipantIdentityType.
+ ///
+
+
+ public static class DataSyncParticipantIdentityType
+ {
+ public const string None = "None";
+ public const string SystemAssigned = "SystemAssigned";
+ public const string UserAssigned = "UserAssigned";
+ public const string SystemAssignedUserAssigned = "SystemAssignedUserAssigned";
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantUserAssignedIdentity.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantUserAssignedIdentity.cs
new file mode 100644
index 000000000000..e9979f66290e
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantUserAssignedIdentity.cs
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ ///
+ /// Azure Active Directory identity configuration for a resource.
+ ///
+ public partial class DataSyncParticipantUserAssignedIdentity
+ {
+ ///
+ /// Initializes a new instance of the DataSyncParticipantUserAssignedIdentity class.
+ ///
+ public DataSyncParticipantUserAssignedIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DataSyncParticipantUserAssignedIdentity class.
+ ///
+
+ /// The Azure Active Directory principal id.
+ ///
+
+ /// The Azure Active Directory client id.
+ ///
+ public DataSyncParticipantUserAssignedIdentity(System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?))
+
+ {
+ this.PrincipalId = principalId;
+ this.ClientId = clientId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets the Azure Active Directory principal id.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")]
+ public System.Guid? PrincipalId {get; private set; }
+
+ ///
+ /// Gets the Azure Active Directory client id.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "clientId")]
+ public System.Guid? ClientId {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/ErrorDetailAutoGenerated.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/ErrorDetailAutoGenerated.cs
new file mode 100644
index 000000000000..dd870f01cc83
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/ErrorDetailAutoGenerated.cs
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ ///
+ /// The error detail.
+ ///
+ public partial class ErrorDetailAutoGenerated
+ {
+ ///
+ /// Initializes a new instance of the ErrorDetailAutoGenerated class.
+ ///
+ public ErrorDetailAutoGenerated()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorDetailAutoGenerated class.
+ ///
+
+ /// The error code.
+ ///
+
+ /// The error message.
+ ///
+
+ /// The error target.
+ ///
+
+ /// The error details.
+ ///
+
+ /// The error additional info.
+ ///
+ public ErrorDetailAutoGenerated(string code = default(string), string message = default(string), string target = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList), System.Collections.Generic.IList additionalInfo = default(System.Collections.Generic.IList))
+
+ {
+ this.Code = code;
+ this.Message = message;
+ this.Target = target;
+ this.Details = details;
+ this.AdditionalInfo = additionalInfo;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets the error code.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "code")]
+ public string Code {get; private set; }
+
+ ///
+ /// Gets the error message.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "message")]
+ public string Message {get; private set; }
+
+ ///
+ /// Gets the error target.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "target")]
+ public string Target {get; private set; }
+
+ ///
+ /// Gets the error details.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "details")]
+ public System.Collections.Generic.IList Details {get; private set; }
+
+ ///
+ /// Gets the error additional info.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")]
+ public System.Collections.Generic.IList AdditionalInfo {get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/ErrorResponseAutoGenerated.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/ErrorResponseAutoGenerated.cs
new file mode 100644
index 000000000000..4fcce750e0e2
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/ErrorResponseAutoGenerated.cs
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error
+ /// details for failed operations. (This also follows the OData error response
+ /// format.).
+ ///
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return error
+ /// details for failed operations. (This also follows the OData error response
+ /// format.).
+ ///
+ public partial class ErrorResponseAutoGenerated
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponseAutoGenerated class.
+ ///
+ public ErrorResponseAutoGenerated()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseAutoGenerated class.
+ ///
+
+ /// The error object.
+ ///
+ public ErrorResponseAutoGenerated(ErrorDetailAutoGenerated error = default(ErrorDetailAutoGenerated))
+
+ {
+ this.Error = error;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets the error object.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "error")]
+ public ErrorDetailAutoGenerated Error {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/ErrorResponseAutoGeneratedException.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/ErrorResponseAutoGeneratedException.cs
new file mode 100644
index 000000000000..937bfe76dad3
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/ErrorResponseAutoGeneratedException.cs
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+
+ ///
+ /// Exception thrown for an invalid response with ErrorResponseAutoGenerated information.
+ ///
+ public partial class ErrorResponseAutoGeneratedException : Microsoft.Rest.RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public ErrorResponseAutoGenerated Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseAutoGeneratedException class.
+ ///
+ public ErrorResponseAutoGeneratedException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseAutoGenerated class.
+ ///
+ /// The exception message.
+ public ErrorResponseAutoGeneratedException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseAutoGenerated class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ErrorResponseAutoGeneratedException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroup.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroup.cs
index 2db11dc14ecb..a000a9afe4a5 100644
--- a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroup.cs
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroup.cs
@@ -37,6 +37,9 @@ public SyncGroup()
/// The name and capacity of the SKU.
///
+ /// Sync group authentication information.
+ ///
+
/// Sync interval of the sync group.
///
@@ -74,11 +77,12 @@ public SyncGroup()
/// Private endpoint name of the sync group if use private link connection is
/// enabled.
///
- public SyncGroup(string id = default(string), string name = default(string), string type = default(string), Sku sku = default(Sku), int? interval = default(int?), System.DateTime? lastSyncTime = default(System.DateTime?), string conflictResolutionPolicy = default(string), string syncDatabaseId = default(string), string hubDatabaseUserName = default(string), string hubDatabasePassword = default(string), string syncState = default(string), SyncGroupSchema schema = default(SyncGroupSchema), bool? enableConflictLogging = default(bool?), int? conflictLoggingRetentionInDays = default(int?), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string))
+ public SyncGroup(DataSyncParticipantIdentity identity, string id = default(string), string name = default(string), string type = default(string), Sku sku = default(Sku), int? interval = default(int?), System.DateTime? lastSyncTime = default(System.DateTime?), string conflictResolutionPolicy = default(string), string syncDatabaseId = default(string), string hubDatabaseUserName = default(string), string hubDatabasePassword = default(string), string syncState = default(string), SyncGroupSchema schema = default(SyncGroupSchema), bool? enableConflictLogging = default(bool?), int? conflictLoggingRetentionInDays = default(int?), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string))
: base(id, name, type)
{
this.Sku = sku;
+ this.Identity = identity;
this.Interval = interval;
this.LastSyncTime = lastSyncTime;
this.ConflictResolutionPolicy = conflictResolutionPolicy;
@@ -106,6 +110,12 @@ public SyncGroup()
[Newtonsoft.Json.JsonProperty(PropertyName = "sku")]
public Sku Sku {get; set; }
+ ///
+ /// Gets or sets sync group authentication information.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "identity")]
+ public DataSyncParticipantIdentity Identity {get; set; }
+
///
/// Gets or sets sync interval of the sync group.
///
@@ -186,10 +196,18 @@ public SyncGroup()
///
public virtual void Validate()
{
+ if (this.Identity == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Identity");
+ }
if (this.Sku != null)
{
this.Sku.Validate();
}
+ if (this.Identity != null)
+ {
+ this.Identity.Validate();
+ }
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupProperties.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupProperties.cs
index 0b737805efc7..fb30ec66ef60 100644
--- a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupProperties.cs
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupProperties.cs
@@ -8,7 +8,7 @@ namespace Microsoft.Azure.Management.Sql.Models
using System.Linq;
///
- /// Properties of a sync group.
+ /// Properties of a sync group with support to MI.
///
public partial class SyncGroupProperties
{
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsCreateOrUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsCreateOrUpdateHeaders.cs
new file mode 100644
index 000000000000..58fb77f33625
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsCreateOrUpdateHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ public partial class SyncGroupsCreateOrUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupsCreateOrUpdateHeaders class.
+ ///
+ public SyncGroupsCreateOrUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupsCreateOrUpdateHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncGroupsCreateOrUpdateHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs
new file mode 100644
index 000000000000..fbf965966015
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ public partial class SyncGroupsDeleteHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupsDeleteHeaders class.
+ ///
+ public SyncGroupsDeleteHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupsDeleteHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncGroupsDeleteHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsRefreshHubSchemaHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsRefreshHubSchemaHeaders.cs
new file mode 100644
index 000000000000..fa353dcaeddb
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsRefreshHubSchemaHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ public partial class SyncGroupsRefreshHubSchemaHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupsRefreshHubSchemaHeaders class.
+ ///
+ public SyncGroupsRefreshHubSchemaHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupsRefreshHubSchemaHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncGroupsRefreshHubSchemaHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsUpdateHeaders.cs
new file mode 100644
index 000000000000..c52018994bb0
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsUpdateHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ public partial class SyncGroupsUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupsUpdateHeaders class.
+ ///
+ public SyncGroupsUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupsUpdateHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncGroupsUpdateHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMember.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMember.cs
index 88effdb1d310..63a5dee274b3 100644
--- a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMember.cs
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMember.cs
@@ -34,6 +34,9 @@ public SyncMember()
/// Resource type.
///
+ /// Sync member authentication information.
+ ///
+
/// Sync direction of the sync member.
/// Possible values include: 'Bidirectional', 'OneWayMemberToHub',
/// 'OneWayHubToMember'
@@ -77,10 +80,11 @@ public SyncMember()
/// 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed',
/// 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning',
/// 'ReprovisionFailed', 'UnReprovisioned'
- public SyncMember(string id = default(string), string name = default(string), string type = default(string), string syncDirection = default(string), string databaseType = default(string), string syncAgentId = default(string), System.Guid? sqlServerDatabaseId = default(System.Guid?), string syncMemberAzureDatabaseResourceId = default(string), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string), string serverName = default(string), string databaseName = default(string), string userName = default(string), string password = default(string), string syncState = default(string))
+ public SyncMember(DataSyncParticipantIdentity identity, string id = default(string), string name = default(string), string type = default(string), string syncDirection = default(string), string databaseType = default(string), string syncAgentId = default(string), System.Guid? sqlServerDatabaseId = default(System.Guid?), string syncMemberAzureDatabaseResourceId = default(string), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string), string serverName = default(string), string databaseName = default(string), string userName = default(string), string password = default(string), string syncState = default(string))
: base(id, name, type)
{
+ this.Identity = identity;
this.SyncDirection = syncDirection;
this.DatabaseType = databaseType;
this.SyncAgentId = syncAgentId;
@@ -102,6 +106,12 @@ public SyncMember()
partial void CustomInit();
+ ///
+ /// Gets or sets sync member authentication information.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "identity")]
+ public DataSyncParticipantIdentity Identity {get; set; }
+
///
/// Gets or sets sync direction of the sync member. Possible values include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember'
///
@@ -175,5 +185,32 @@ public SyncMember()
///
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.syncState")]
public string SyncState {get; private set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Identity == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Identity");
+ }
+ if (this.Identity != null)
+ {
+ this.Identity.Validate();
+ }
+
+
+
+
+
+
+
+
+
+
+ }
}
}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersCreateOrUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersCreateOrUpdateHeaders.cs
new file mode 100644
index 000000000000..4310344b1f36
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersCreateOrUpdateHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ public partial class SyncMembersCreateOrUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncMembersCreateOrUpdateHeaders class.
+ ///
+ public SyncMembersCreateOrUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMembersCreateOrUpdateHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncMembersCreateOrUpdateHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersDeleteHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersDeleteHeaders.cs
new file mode 100644
index 000000000000..255a1bcf9ff1
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersDeleteHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ public partial class SyncMembersDeleteHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncMembersDeleteHeaders class.
+ ///
+ public SyncMembersDeleteHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMembersDeleteHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncMembersDeleteHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersRefreshMemberSchemaHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersRefreshMemberSchemaHeaders.cs
new file mode 100644
index 000000000000..6399a2635396
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersRefreshMemberSchemaHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ public partial class SyncMembersRefreshMemberSchemaHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncMembersRefreshMemberSchemaHeaders class.
+ ///
+ public SyncMembersRefreshMemberSchemaHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMembersRefreshMemberSchemaHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncMembersRefreshMemberSchemaHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersUpdateHeaders.cs
new file mode 100644
index 000000000000..a3733e8a81e1
--- /dev/null
+++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersUpdateHeaders.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.Management.Sql.Models
+{
+ using System.Linq;
+
+ public partial class SyncMembersUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the SyncMembersUpdateHeaders class.
+ ///
+ public SyncMembersUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncMembersUpdateHeaders class.
+ ///
+
+ ///
+ ///
+ public SyncMembersUpdateHeaders(string location = default(string))
+
+ {
+ this.Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
+ public string Location {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperations.cs
index 5ab2e8aba833..e56c49191c6c 100644
--- a/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperations.cs
+++ b/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperations.cs
@@ -81,7 +81,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -168,14 +168,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -185,10 +184,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -239,36 +234,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Refreshes a hub database schema.
- ///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// The name of the server.
- ///
- ///
- /// The name of the database on which the sync group is hosted.
- ///
- ///
- /// The name of the sync group.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async System.Threading.Tasks.Task RefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- // Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets a collection of hub database schemas.
+ /// Lists sync groups under a hub database.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -280,9 +246,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// The name of the database on which the sync group is hosted.
///
- ///
- /// The name of the sync group.
- ///
///
/// Headers that will be added to request.
///
@@ -304,7 +267,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListHubSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -325,17 +288,12 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
}
- if (syncGroupName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
- }
-
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -346,21 +304,19 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("databaseName", databaseName);
- tracingParameters.Add("syncGroupName", syncGroupName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemas", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabase", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
- _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
@@ -428,14 +384,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -445,10 +400,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -461,7 +412,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -475,7 +426,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@@ -499,7 +450,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Gets a collection of sync group logs.
+ /// Gets a sync group.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -514,18 +465,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// The name of the sync group.
///
- ///
- /// Get logs generated after this time.
- ///
- ///
- /// Get logs generated before this time.
- ///
- ///
- /// The types of logs to retrieve.
- ///
- ///
- /// The continuation token for this operation.
- ///
///
/// Headers that will be added to request.
///
@@ -547,7 +486,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListLogsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -573,28 +512,12 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
}
- if (startTime == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "startTime");
- }
-
- if (endTime == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "endTime");
- }
-
- if (type == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "type");
- }
-
-
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -606,20 +529,16 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("databaseName", databaseName);
tracingParameters.Add("syncGroupName", syncGroupName);
- tracingParameters.Add("startTime", startTime);
- tracingParameters.Add("endTime", endTime);
- tracingParameters.Add("type", type);
- tracingParameters.Add("continuationToken", continuationToken);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogs", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
@@ -627,22 +546,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
- if (startTime != null)
- {
- _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(startTime)));
- }
- if (endTime != null)
- {
- _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(endTime)));
- }
- if (type != null)
- {
- _queryParameters.Add(string.Format("type={0}", System.Uri.EscapeDataString(type)));
- }
- if (continuationToken != null)
- {
- _queryParameters.Add(string.Format("continuationToken={0}", System.Uri.EscapeDataString(continuationToken)));
- }
if (apiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
@@ -707,14 +610,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -724,10 +626,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -740,7 +638,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -754,7 +652,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@@ -777,6 +675,99 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
+ ///
+ /// Creates or updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Updates a sync group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group.
+ ///
+ ///
+ /// The requested sync group resource state.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
///
/// Cancels a sync group synchronization.
///
@@ -842,7 +833,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -935,14 +926,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -952,10 +942,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -988,7 +974,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Triggers a sync group synchronization.
+ /// Gets a collection of hub database schemas.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -1012,6 +998,9 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
@@ -1021,7 +1010,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task TriggerSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListHubSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -1052,7 +1041,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1068,12 +1057,12 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "TriggerSync", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemas", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
@@ -1092,7 +1081,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
@@ -1145,14 +1134,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1162,10 +1150,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -1178,7 +1162,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -1186,6 +1170,24 @@ internal SyncGroupsOperations (SqlManagementClient client)
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
@@ -1198,7 +1200,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Gets a sync group.
+ /// Gets a collection of sync group logs.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -1213,6 +1215,18 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// The name of the sync group.
///
+ ///
+ /// Get logs generated after this time.
+ ///
+ ///
+ /// Get logs generated before this time.
+ ///
+ ///
+ /// The types of logs to retrieve.
+ ///
+ ///
+ /// The continuation token for this operation.
+ ///
///
/// Headers that will be added to request.
///
@@ -1234,7 +1248,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListLogsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -1260,12 +1274,28 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
}
+ if (startTime == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "startTime");
+ }
+
+ if (endTime == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "endTime");
+ }
+
+ if (type == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "type");
+ }
+
+
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1277,16 +1307,20 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("databaseName", databaseName);
tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("startTime", startTime);
+ tracingParameters.Add("endTime", endTime);
+ tracingParameters.Add("type", type);
+ tracingParameters.Add("continuationToken", continuationToken);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogs", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
@@ -1294,6 +1328,22 @@ internal SyncGroupsOperations (SqlManagementClient client)
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (startTime != null)
+ {
+ _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(startTime)));
+ }
+ if (endTime != null)
+ {
+ _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(endTime)));
+ }
+ if (type != null)
+ {
+ _queryParameters.Add(string.Format("type={0}", System.Uri.EscapeDataString(type)));
+ }
+ if (continuationToken != null)
+ {
+ _queryParameters.Add(string.Format("continuationToken={0}", System.Uri.EscapeDataString(continuationToken)));
+ }
if (apiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
@@ -1358,14 +1408,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1375,10 +1424,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -1391,7 +1436,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -1405,7 +1450,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@@ -1429,39 +1474,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Creates or updates a sync group.
- ///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// The name of the server.
- ///
- ///
- /// The name of the database on which the sync group is hosted.
- ///
- ///
- /// The name of the sync group.
- ///
- ///
- /// The requested sync group resource state.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- // Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Deletes a sync group.
+ /// Refreshes a hub database schema.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -1482,15 +1495,15 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// The cancellation token.
///
- public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> RefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false);
+ Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginRefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
///
- /// Updates a sync group.
+ /// Triggers a sync group synchronization.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -1505,35 +1518,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// The name of the sync group.
///
- ///
- /// The requested sync group resource state.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- // Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Lists sync groups under a hub database.
- ///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// The name of the server.
- ///
- ///
- /// The name of the database on which the sync group is hosted.
- ///
///
/// Headers that will be added to request.
///
@@ -1543,9 +1527,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -1555,7 +1536,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task TriggerSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -1576,12 +1557,17 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName");
}
+ if (syncGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
+ }
+
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1592,19 +1578,21 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabase", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "TriggerSync", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
@@ -1619,7 +1607,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
@@ -1672,14 +1660,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1689,10 +1676,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -1705,7 +1688,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -1713,24 +1696,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
- }
- catch (Newtonsoft.Json.JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
@@ -1743,7 +1708,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Refreshes a hub database schema.
+ /// Creates or updates a sync group.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -1758,6 +1723,9 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// The name of the sync group.
///
+ ///
+ /// The requested sync group resource state.
+ ///
///
/// Headers that will be added to request.
///
@@ -1767,6 +1735,9 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
@@ -1776,12 +1747,20 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task BeginRefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (parameters == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
if (resourceGroupName == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
@@ -1807,7 +1786,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1821,14 +1800,15 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("syncGroupName", syncGroupName);
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRefreshHubSchema", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
@@ -1847,7 +1827,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
@@ -1876,6 +1856,12 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
// Serialize Request
string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
+ _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (this.Client.Credentials != null)
{
@@ -1898,16 +1884,15 @@ internal SyncGroupsOperations (SqlManagementClient client)
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1917,10 +1902,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -1933,7 +1914,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -1941,6 +1922,55 @@ internal SyncGroupsOperations (SqlManagementClient client)
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
@@ -1953,7 +1983,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Creates or updates a sync group.
+ /// Deletes a sync group.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -1968,9 +1998,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// The name of the sync group.
///
- ///
- /// The requested sync group resource state.
- ///
///
/// Headers that will be added to request.
///
@@ -1980,9 +2007,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -1992,20 +2016,12 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (parameters == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
- }
- if (parameters != null)
- {
- parameters.Validate();
- }
if (resourceGroupName == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
@@ -2031,7 +2047,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2045,10 +2061,9 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("syncGroupName", syncGroupName);
tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
}
// Construct URL
@@ -2072,7 +2087,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
@@ -2101,12 +2116,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
// Serialize Request
string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
// Set Credentials
if (this.Client.Credentials != null)
{
@@ -2129,16 +2138,15 @@ internal SyncGroupsOperations (SqlManagementClient client)
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2148,10 +2156,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -2164,7 +2168,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -2172,41 +2176,18 @@ internal SyncGroupsOperations (SqlManagementClient client)
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 200)
+ try
{
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
- }
- catch (Newtonsoft.Json.JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
}
- // Deserialize Response
- if ((int)_statusCode == 201)
+ catch (Newtonsoft.Json.JsonException ex)
{
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
- }
- catch (Newtonsoft.Json.JsonException ex)
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
{
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ _httpResponse.Dispose();
}
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
}
if (_shouldTrace)
{
@@ -2220,7 +2201,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Deletes a sync group.
+ /// Updates a sync group.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -2235,6 +2216,9 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// The name of the sync group.
///
+ ///
+ /// The requested sync group resource state.
+ ///
///
/// Headers that will be added to request.
///
@@ -2244,6 +2228,9 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
@@ -2253,12 +2240,16 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (parameters == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
+ }
if (resourceGroupName == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
@@ -2284,7 +2275,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2298,9 +2289,10 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("syncGroupName", syncGroupName);
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
}
// Construct URL
@@ -2324,7 +2316,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
@@ -2353,6 +2345,12 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
// Serialize Request
string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
+ _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (this.Client.Credentials != null)
{
@@ -2375,16 +2373,15 @@ internal SyncGroupsOperations (SqlManagementClient client)
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2394,10 +2391,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -2410,7 +2403,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -2418,6 +2411,37 @@ internal SyncGroupsOperations (SqlManagementClient client)
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
@@ -2430,7 +2454,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Updates a sync group.
+ /// Refreshes a hub database schema.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -2445,9 +2469,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// The name of the sync group.
///
- ///
- /// The requested sync group resource state.
- ///
///
/// Headers that will be added to request.
///
@@ -2457,9 +2478,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -2469,16 +2487,12 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> BeginRefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (parameters == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
- }
if (resourceGroupName == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
@@ -2504,7 +2518,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2518,15 +2532,14 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("syncGroupName", syncGroupName);
tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRefreshHubSchema", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
@@ -2545,7 +2558,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
+ _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
@@ -2574,12 +2587,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
// Serialize Request
string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
// Set Credentials
if (this.Client.Credentials != null)
{
@@ -2604,14 +2611,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2621,10 +2627,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -2637,7 +2639,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -2645,23 +2647,18 @@ internal SyncGroupsOperations (SqlManagementClient client)
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 200)
+ try
{
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
- }
- catch (Newtonsoft.Json.JsonException ex)
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
{
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ _httpResponse.Dispose();
}
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
}
if (_shouldTrace)
{
@@ -2786,14 +2783,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2803,10 +2799,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -2857,7 +2849,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Gets a collection of hub database schemas.
+ /// Lists sync groups under a hub database.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -2883,7 +2875,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListHubSchemasNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (nextPageLink == null)
@@ -2901,7 +2893,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemasNext", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabaseNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
@@ -2968,14 +2960,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2985,10 +2976,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -3001,7 +2988,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -3015,7 +3002,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@@ -3039,7 +3026,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Gets a collection of sync group logs.
+ /// Gets a collection of hub database schemas.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -3065,7 +3052,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListLogsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListHubSchemasNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (nextPageLink == null)
@@ -3083,7 +3070,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogsNext", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemasNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
@@ -3150,14 +3137,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -3167,10 +3153,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -3183,7 +3165,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -3197,7 +3179,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@@ -3221,7 +3203,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
///
- /// Lists sync groups under a hub database.
+ /// Gets a collection of sync group logs.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -3247,7 +3229,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListLogsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (nextPageLink == null)
@@ -3265,7 +3247,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabaseNext", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogsNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
@@ -3332,14 +3314,13 @@ internal SyncGroupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -3349,10 +3330,6 @@ internal SyncGroupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -3365,7 +3342,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -3379,7 +3356,7 @@ internal SyncGroupsOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
diff --git a/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs b/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs
index 214faa925ef0..7ba7e3dd41a4 100644
--- a/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs
+++ b/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs
@@ -46,7 +46,7 @@ public static Microsoft.Rest.Azure.IPage ListSyncDatab
}
}
///
- /// Refreshes a hub database schema.
+ /// Lists sync groups under a hub database.
///
///
/// The operations group for this extension method.
@@ -61,16 +61,13 @@ public static Microsoft.Rest.Azure.IPage ListSyncDatab
///
/// The name of the database on which the sync group is hosted.
///
- ///
- /// The name of the sync group.
- ///
- public static void RefreshHubSchema(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ public static Microsoft.Rest.Azure.IPage ListByDatabase(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName)
{
- ((ISyncGroupsOperations)operations).RefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).ListByDatabaseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
}
///
- /// Refreshes a hub database schema.
+ /// Lists sync groups under a hub database.
///
///
/// The operations group for this extension method.
@@ -85,18 +82,18 @@ public static void RefreshHubSchema(this ISyncGroupsOperations operations, strin
///
/// The name of the database on which the sync group is hosted.
///
- ///
- /// The name of the sync group.
- ///
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task RefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task> ListByDatabaseAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- (await operations.RefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
}
///
- /// Gets a collection of hub database schemas.
+ /// Gets a sync group.
///
///
/// The operations group for this extension method.
@@ -114,13 +111,13 @@ public static void RefreshHubSchema(this ISyncGroupsOperations operations, strin
///
/// The name of the sync group.
///
- public static Microsoft.Rest.Azure.IPage ListHubSchemas(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ public static SyncGroup Get(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- return ((ISyncGroupsOperations)operations).ListHubSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).GetAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
}
///
- /// Gets a collection of hub database schemas.
+ /// Gets a sync group.
///
///
/// The operations group for this extension method.
@@ -141,15 +138,15 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task> ListHubSchemasAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task GetAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.ListHubSchemasWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Gets a collection of sync group logs.
+ /// Creates or updates a sync group.
///
///
/// The operations group for this extension method.
@@ -167,25 +164,13 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema
///
/// The name of the sync group.
///
- ///
- /// Get logs generated after this time.
- ///
- ///
- /// Get logs generated before this time.
- ///
- ///
- /// The types of logs to retrieve.
- ///
- ///
- /// The continuation token for this operation.
- ///
- public static Microsoft.Rest.Azure.IPage ListLogs(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string))
+ public static SyncGroup CreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
{
- return ((ISyncGroupsOperations)operations).ListLogsAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
}
///
- /// Gets a collection of sync group logs.
+ /// Creates or updates a sync group.
///
///
/// The operations group for this extension method.
@@ -203,30 +188,18 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema
///
/// The name of the sync group.
///
- ///
- /// Get logs generated after this time.
- ///
- ///
- /// Get logs generated before this time.
- ///
- ///
- /// The types of logs to retrieve.
- ///
- ///
- /// The continuation token for this operation.
- ///
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task> ListLogsAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.ListLogsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Cancels a sync group synchronization.
+ /// Deletes a sync group.
///
///
/// The operations group for this extension method.
@@ -244,13 +217,13 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema
///
/// The name of the sync group.
///
- public static void CancelSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ public static SyncGroupsDeleteHeaders Delete(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- ((ISyncGroupsOperations)operations).CancelSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).DeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
}
///
- /// Cancels a sync group synchronization.
+ /// Deletes a sync group.
///
///
/// The operations group for this extension method.
@@ -271,12 +244,15 @@ public static void CancelSync(this ISyncGroupsOperations operations, string reso
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task CancelSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task DeleteAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- (await operations.CancelSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
}
///
- /// Triggers a sync group synchronization.
+ /// Updates a sync group.
///
///
/// The operations group for this extension method.
@@ -294,13 +270,13 @@ public static void CancelSync(this ISyncGroupsOperations operations, string reso
///
/// The name of the sync group.
///
- public static void TriggerSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ public static SyncGroup Update(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
{
- ((ISyncGroupsOperations)operations).TriggerSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).UpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
}
///
- /// Triggers a sync group synchronization.
+ /// Updates a sync group.
///
///
/// The operations group for this extension method.
@@ -321,12 +297,15 @@ public static void TriggerSync(this ISyncGroupsOperations operations, string res
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task TriggerSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task UpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- (await operations.TriggerSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
}
///
- /// Gets a sync group.
+ /// Cancels a sync group synchronization.
///
///
/// The operations group for this extension method.
@@ -344,13 +323,13 @@ public static void TriggerSync(this ISyncGroupsOperations operations, string res
///
/// The name of the sync group.
///
- public static SyncGroup Get(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ public static void CancelSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- return ((ISyncGroupsOperations)operations).GetAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ ((ISyncGroupsOperations)operations).CancelSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
}
///
- /// Gets a sync group.
+ /// Cancels a sync group synchronization.
///
///
/// The operations group for this extension method.
@@ -371,15 +350,12 @@ public static SyncGroup Get(this ISyncGroupsOperations operations, string resour
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task GetAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task CancelSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
+ (await operations.CancelSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
- /// Creates or updates a sync group.
+ /// Gets a collection of hub database schemas.
///
///
/// The operations group for this extension method.
@@ -397,13 +373,13 @@ public static SyncGroup Get(this ISyncGroupsOperations operations, string resour
///
/// The name of the sync group.
///
- public static SyncGroup CreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
+ public static Microsoft.Rest.Azure.IPage ListHubSchemas(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- return ((ISyncGroupsOperations)operations).CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).ListHubSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
}
///
- /// Creates or updates a sync group.
+ /// Gets a collection of hub database schemas.
///
///
/// The operations group for this extension method.
@@ -424,15 +400,15 @@ public static SyncGroup CreateOrUpdate(this ISyncGroupsOperations operations, st
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task> ListHubSchemasAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListHubSchemasWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Deletes a sync group.
+ /// Gets a collection of sync group logs.
///
///
/// The operations group for this extension method.
@@ -450,13 +426,25 @@ public static SyncGroup CreateOrUpdate(this ISyncGroupsOperations operations, st
///
/// The name of the sync group.
///
- public static void Delete(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ ///
+ /// Get logs generated after this time.
+ ///
+ ///
+ /// Get logs generated before this time.
+ ///
+ ///
+ /// The types of logs to retrieve.
+ ///
+ ///
+ /// The continuation token for this operation.
+ ///
+ public static Microsoft.Rest.Azure.IPage ListLogs(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string))
{
- ((ISyncGroupsOperations)operations).DeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).ListLogsAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken).GetAwaiter().GetResult();
}
///
- /// Deletes a sync group.
+ /// Gets a collection of sync group logs.
///
///
/// The operations group for this extension method.
@@ -474,15 +462,30 @@ public static void Delete(this ISyncGroupsOperations operations, string resource
///
/// The name of the sync group.
///
+ ///
+ /// Get logs generated after this time.
+ ///
+ ///
+ /// Get logs generated before this time.
+ ///
+ ///
+ /// The types of logs to retrieve.
+ ///
+ ///
+ /// The continuation token for this operation.
+ ///
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task DeleteAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task> ListLogsAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ using (var _result = await operations.ListLogsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
}
///
- /// Updates a sync group.
+ /// Refreshes a hub database schema.
///
///
/// The operations group for this extension method.
@@ -500,13 +503,13 @@ public static void Delete(this ISyncGroupsOperations operations, string resource
///
/// The name of the sync group.
///
- public static SyncGroup Update(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
+ public static SyncGroupsRefreshHubSchemaHeaders RefreshHubSchema(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- return ((ISyncGroupsOperations)operations).UpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).RefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
}
///
- /// Updates a sync group.
+ /// Refreshes a hub database schema.
///
///
/// The operations group for this extension method.
@@ -527,15 +530,15 @@ public static SyncGroup Update(this ISyncGroupsOperations operations, string res
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task UpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task RefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.RefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
{
- return _result.Body;
+ return _result.Headers;
}
}
///
- /// Lists sync groups under a hub database.
+ /// Triggers a sync group synchronization.
///
///
/// The operations group for this extension method.
@@ -550,13 +553,16 @@ public static SyncGroup Update(this ISyncGroupsOperations operations, string res
///
/// The name of the database on which the sync group is hosted.
///
- public static Microsoft.Rest.Azure.IPage ListByDatabase(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName)
+ ///
+ /// The name of the sync group.
+ ///
+ public static void TriggerSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- return ((ISyncGroupsOperations)operations).ListByDatabaseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
+ ((ISyncGroupsOperations)operations).TriggerSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
}
///
- /// Lists sync groups under a hub database.
+ /// Triggers a sync group synchronization.
///
///
/// The operations group for this extension method.
@@ -571,18 +577,18 @@ public static Microsoft.Rest.Azure.IPage ListByDatabase(this ISyncGro
///
/// The name of the database on which the sync group is hosted.
///
+ ///
+ /// The name of the sync group.
+ ///
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task> ListByDatabaseAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task TriggerSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
+ (await operations.TriggerSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
- /// Refreshes a hub database schema.
+ /// Creates or updates a sync group.
///
///
/// The operations group for this extension method.
@@ -600,13 +606,13 @@ public static Microsoft.Rest.Azure.IPage ListByDatabase(this ISyncGro
///
/// The name of the sync group.
///
- public static void BeginRefreshHubSchema(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ public static SyncGroup BeginCreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
{
- ((ISyncGroupsOperations)operations).BeginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
}
///
- /// Refreshes a hub database schema.
+ /// Creates or updates a sync group.
///
///
/// The operations group for this extension method.
@@ -627,12 +633,15 @@ public static void BeginRefreshHubSchema(this ISyncGroupsOperations operations,
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task BeginRefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- (await operations.BeginRefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
}
///
- /// Creates or updates a sync group.
+ /// Deletes a sync group.
///
///
/// The operations group for this extension method.
@@ -650,13 +659,13 @@ public static void BeginRefreshHubSchema(this ISyncGroupsOperations operations,
///
/// The name of the sync group.
///
- public static SyncGroup BeginCreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
+ public static SyncGroupsDeleteHeaders BeginDelete(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- return ((ISyncGroupsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).BeginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
}
///
- /// Creates or updates a sync group.
+ /// Deletes a sync group.
///
///
/// The operations group for this extension method.
@@ -677,15 +686,15 @@ public static SyncGroup BeginCreateOrUpdate(this ISyncGroupsOperations operation
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task BeginDeleteAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
{
- return _result.Body;
+ return _result.Headers;
}
}
///
- /// Deletes a sync group.
+ /// Updates a sync group.
///
///
/// The operations group for this extension method.
@@ -703,13 +712,13 @@ public static SyncGroup BeginCreateOrUpdate(this ISyncGroupsOperations operation
///
/// The name of the sync group.
///
- public static void BeginDelete(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
+ public static SyncGroup BeginUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
{
- ((ISyncGroupsOperations)operations).BeginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).BeginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
}
///
- /// Deletes a sync group.
+ /// Updates a sync group.
///
///
/// The operations group for this extension method.
@@ -730,12 +739,15 @@ public static void BeginDelete(this ISyncGroupsOperations operations, string res
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task BeginDeleteAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task BeginUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
}
///
- /// Updates a sync group.
+ /// Refreshes a hub database schema.
///
///
/// The operations group for this extension method.
@@ -753,13 +765,13 @@ public static void BeginDelete(this ISyncGroupsOperations operations, string res
///
/// The name of the sync group.
///
- public static SyncGroup BeginUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters)
+ public static SyncGroupsRefreshHubSchemaHeaders BeginRefreshHubSchema(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName)
{
- return ((ISyncGroupsOperations)operations).BeginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).BeginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult();
}
///
- /// Updates a sync group.
+ /// Refreshes a hub database schema.
///
///
/// The operations group for this extension method.
@@ -780,11 +792,11 @@ public static SyncGroup BeginUpdate(this ISyncGroupsOperations operations, strin
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task BeginUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task BeginRefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.BeginRefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
{
- return _result.Body;
+ return _result.Headers;
}
}
///
@@ -821,7 +833,7 @@ public static Microsoft.Rest.Azure.IPage ListSyncDatab
}
}
///
- /// Gets a collection of hub database schemas.
+ /// Lists sync groups under a hub database.
///
///
/// The operations group for this extension method.
@@ -829,13 +841,13 @@ public static Microsoft.Rest.Azure.IPage ListSyncDatab
///
/// The NextLink from the previous successful call to List operation.
///
- public static Microsoft.Rest.Azure.IPage ListHubSchemasNext(this ISyncGroupsOperations operations, string nextPageLink)
+ public static Microsoft.Rest.Azure.IPage ListByDatabaseNext(this ISyncGroupsOperations operations, string nextPageLink)
{
- return ((ISyncGroupsOperations)operations).ListHubSchemasNextAsync(nextPageLink).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult();
}
///
- /// Gets a collection of hub database schemas.
+ /// Lists sync groups under a hub database.
///
///
/// The operations group for this extension method.
@@ -846,15 +858,15 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task> ListHubSchemasNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task> ListByDatabaseNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.ListHubSchemasNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Gets a collection of sync group logs.
+ /// Gets a collection of hub database schemas.
///
///
/// The operations group for this extension method.
@@ -862,13 +874,13 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema
///
/// The NextLink from the previous successful call to List operation.
///
- public static Microsoft.Rest.Azure.IPage ListLogsNext(this ISyncGroupsOperations operations, string nextPageLink)
+ public static Microsoft.Rest.Azure.IPage ListHubSchemasNext(this ISyncGroupsOperations operations, string nextPageLink)
{
- return ((ISyncGroupsOperations)operations).ListLogsNextAsync(nextPageLink).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).ListHubSchemasNextAsync(nextPageLink).GetAwaiter().GetResult();
}
///
- /// Gets a collection of sync group logs.
+ /// Gets a collection of hub database schemas.
///
///
/// The operations group for this extension method.
@@ -879,15 +891,15 @@ public static Microsoft.Rest.Azure.IPage ListLogsNext(th
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task> ListLogsNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task> ListHubSchemasNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.ListLogsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListHubSchemasNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Lists sync groups under a hub database.
+ /// Gets a collection of sync group logs.
///
///
/// The operations group for this extension method.
@@ -895,13 +907,13 @@ public static Microsoft.Rest.Azure.IPage ListLogsNext(th
///
/// The NextLink from the previous successful call to List operation.
///
- public static Microsoft.Rest.Azure.IPage ListByDatabaseNext(this ISyncGroupsOperations operations, string nextPageLink)
+ public static Microsoft.Rest.Azure.IPage ListLogsNext(this ISyncGroupsOperations operations, string nextPageLink)
{
- return ((ISyncGroupsOperations)operations).ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult();
+ return ((ISyncGroupsOperations)operations).ListLogsNextAsync(nextPageLink).GetAwaiter().GetResult();
}
///
- /// Lists sync groups under a hub database.
+ /// Gets a collection of sync group logs.
///
///
/// The operations group for this extension method.
@@ -912,9 +924,9 @@ public static Microsoft.Rest.Azure.IPage ListByDatabaseNext(this ISyn
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task> ListByDatabaseNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async System.Threading.Tasks.Task> ListLogsNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListLogsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperations.cs
index 8f34be8e1159..4711f4712d39 100644
--- a/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperations.cs
+++ b/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperations.cs
@@ -39,7 +39,7 @@ internal SyncMembersOperations (SqlManagementClient client)
public SqlManagementClient Client { get; private set; }
///
- /// Gets a sync member.
+ /// Lists sync members in the given sync group.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -52,10 +52,7 @@ internal SyncMembersOperations (SqlManagementClient client)
/// The name of the database on which the sync group is hosted.
///
///
- /// The name of the sync group on which the sync member is hosted.
- ///
- ///
- /// The name of the sync member.
+ /// The name of the sync group.
///
///
/// Headers that will be added to request.
@@ -78,7 +75,7 @@ internal SyncMembersOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -104,17 +101,12 @@ internal SyncMembersOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
}
- if (syncMemberName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncMemberName");
- }
-
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -126,22 +118,20 @@ internal SyncMembersOperations (SqlManagementClient client)
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("databaseName", databaseName);
tracingParameters.Add("syncGroupName", syncGroupName);
- tracingParameters.Add("syncMemberName", syncMemberName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroup", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
_url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
- _url = _url.Replace("{syncMemberName}", System.Uri.EscapeDataString(syncMemberName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
@@ -209,14 +199,13 @@ internal SyncMembersOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -226,10 +215,6 @@ internal SyncMembersOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -242,7 +227,7 @@ internal SyncMembersOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -256,7 +241,7 @@ internal SyncMembersOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@@ -280,74 +265,7 @@ internal SyncMembersOperations (SqlManagementClient client)
}
///
- /// Creates or updates a sync member.
- ///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// The name of the server.
- ///
- ///
- /// The name of the database on which the sync group is hosted.
- ///
- ///
- /// The name of the sync group on which the sync member is hosted.
- ///
- ///
- /// The name of the sync member.
- ///
- ///
- /// The requested sync member resource state.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- // Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Deletes a sync member.
- ///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// The name of the server.
- ///
- ///
- /// The name of the database on which the sync group is hosted.
- ///
- ///
- /// The name of the sync group on which the sync member is hosted.
- ///
- ///
- /// The name of the sync member.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- // Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Updates an existing sync member.
+ /// Gets a sync member.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -365,38 +283,6 @@ internal SyncMembersOperations (SqlManagementClient client)
///
/// The name of the sync member.
///
- ///
- /// The requested sync member resource state.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- // Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Lists sync members in the given sync group.
- ///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
- ///
- /// The name of the server.
- ///
- ///
- /// The name of the database on which the sync group is hosted.
- ///
- ///
- /// The name of the sync group.
- ///
///
/// Headers that will be added to request.
///
@@ -418,7 +304,7 @@ internal SyncMembersOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -444,12 +330,17 @@ internal SyncMembersOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName");
}
+ if (syncMemberName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncMemberName");
+ }
+
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2020-11-01-preview";
+ string apiVersion = "2025-02-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -461,20 +352,22 @@ internal SyncMembersOperations (SqlManagementClient client)
tracingParameters.Add("serverName", serverName);
tracingParameters.Add("databaseName", databaseName);
tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("syncMemberName", syncMemberName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroup", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName));
_url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
_url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ _url = _url.Replace("{syncMemberName}", System.Uri.EscapeDataString(syncMemberName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
@@ -542,14 +435,13 @@ internal SyncMembersOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -559,10 +451,6 @@ internal SyncMembersOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -575,7 +463,7 @@ internal SyncMembersOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -589,7 +477,7 @@ internal SyncMembersOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@@ -612,6 +500,140 @@ internal SyncMembersOperations (SqlManagementClient client)
}
+ ///
+ /// Creates or updates a sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The requested sync member resource state.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes a sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Updates an existing sync member.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the server.
+ ///
+ ///
+ /// The name of the database on which the sync group is hosted.
+ ///
+ ///
+ /// The name of the sync group on which the sync member is hosted.
+ ///
+ ///
+ /// The name of the sync member.
+ ///
+ ///
+ /// The requested sync member resource state.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary