diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ArmClientExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ArmClientExtensions.cs
index 038afa487bd8..bb6ff1c0c60e 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ArmClientExtensions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ArmClientExtensions.cs
@@ -518,50 +518,6 @@ public static JobVersion GetJobVersion(this ArmClient armClient, ResourceIdentif
}
#endregion
- #region SubscriptionLongTermRetentionBackup
- /// Gets an object representing a SubscriptionLongTermRetentionBackup along with the instance operations that can be performed on it but with no data.
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static SubscriptionLongTermRetentionBackup GetSubscriptionLongTermRetentionBackup(this ArmClient armClient, ResourceIdentifier id)
- {
- return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new SubscriptionLongTermRetentionBackup(clientOptions, credential, uri, pipeline, id));
- }
- #endregion
-
- #region ResourceGroupLongTermRetentionBackup
- /// Gets an object representing a ResourceGroupLongTermRetentionBackup along with the instance operations that can be performed on it but with no data.
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static ResourceGroupLongTermRetentionBackup GetResourceGroupLongTermRetentionBackup(this ArmClient armClient, ResourceIdentifier id)
- {
- return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new ResourceGroupLongTermRetentionBackup(clientOptions, credential, uri, pipeline, id));
- }
- #endregion
-
- #region SubscriptionLongTermRetentionManagedInstanceBackup
- /// Gets an object representing a SubscriptionLongTermRetentionManagedInstanceBackup along with the instance operations that can be performed on it but with no data.
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static SubscriptionLongTermRetentionManagedInstanceBackup GetSubscriptionLongTermRetentionManagedInstanceBackup(this ArmClient armClient, ResourceIdentifier id)
- {
- return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new SubscriptionLongTermRetentionManagedInstanceBackup(clientOptions, credential, uri, pipeline, id));
- }
- #endregion
-
- #region ResourceGroupLongTermRetentionManagedInstanceBackup
- /// Gets an object representing a ResourceGroupLongTermRetentionManagedInstanceBackup along with the instance operations that can be performed on it but with no data.
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static ResourceGroupLongTermRetentionManagedInstanceBackup GetResourceGroupLongTermRetentionManagedInstanceBackup(this ArmClient armClient, ResourceIdentifier id)
- {
- return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new ResourceGroupLongTermRetentionManagedInstanceBackup(clientOptions, credential, uri, pipeline, id));
- }
- #endregion
-
#region LongTermRetentionPolicy
/// Gets an object representing a LongTermRetentionPolicy along with the instance operations that can be performed on it but with no data.
/// The instance the method will execute against.
@@ -771,17 +727,6 @@ public static ManagedInstancePrivateLink GetManagedInstancePrivateLink(this ArmC
}
#endregion
- #region ManagedInstance
- /// Gets an object representing a ManagedInstance along with the instance operations that can be performed on it but with no data.
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static ManagedInstance GetManagedInstance(this ArmClient armClient, ResourceIdentifier id)
- {
- return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new ManagedInstance(clientOptions, credential, uri, pipeline, id));
- }
- #endregion
-
#region ManagedInstanceVulnerabilityAssessment
/// Gets an object representing a ManagedInstanceVulnerabilityAssessment along with the instance operations that can be performed on it but with no data.
/// The instance the method will execute against.
@@ -1101,6 +1046,72 @@ public static OutboundFirewallRule GetOutboundFirewallRule(this ArmClient armCli
}
#endregion
+ #region SqlServer
+ /// Gets an object representing a SqlServer along with the instance operations that can be performed on it but with no data.
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static SqlServer GetSqlServer(this ArmClient armClient, ResourceIdentifier id)
+ {
+ return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new SqlServer(clientOptions, credential, uri, pipeline, id));
+ }
+ #endregion
+
+ #region SubscriptionLongTermRetentionBackup
+ /// Gets an object representing a SubscriptionLongTermRetentionBackup along with the instance operations that can be performed on it but with no data.
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static SubscriptionLongTermRetentionBackup GetSubscriptionLongTermRetentionBackup(this ArmClient armClient, ResourceIdentifier id)
+ {
+ return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new SubscriptionLongTermRetentionBackup(clientOptions, credential, uri, pipeline, id));
+ }
+ #endregion
+
+ #region ResourceGroupLongTermRetentionBackup
+ /// Gets an object representing a ResourceGroupLongTermRetentionBackup along with the instance operations that can be performed on it but with no data.
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ResourceGroupLongTermRetentionBackup GetResourceGroupLongTermRetentionBackup(this ArmClient armClient, ResourceIdentifier id)
+ {
+ return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new ResourceGroupLongTermRetentionBackup(clientOptions, credential, uri, pipeline, id));
+ }
+ #endregion
+
+ #region SubscriptionLongTermRetentionManagedInstanceBackup
+ /// Gets an object representing a SubscriptionLongTermRetentionManagedInstanceBackup along with the instance operations that can be performed on it but with no data.
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static SubscriptionLongTermRetentionManagedInstanceBackup GetSubscriptionLongTermRetentionManagedInstanceBackup(this ArmClient armClient, ResourceIdentifier id)
+ {
+ return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new SubscriptionLongTermRetentionManagedInstanceBackup(clientOptions, credential, uri, pipeline, id));
+ }
+ #endregion
+
+ #region ResourceGroupLongTermRetentionManagedInstanceBackup
+ /// Gets an object representing a ResourceGroupLongTermRetentionManagedInstanceBackup along with the instance operations that can be performed on it but with no data.
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ResourceGroupLongTermRetentionManagedInstanceBackup GetResourceGroupLongTermRetentionManagedInstanceBackup(this ArmClient armClient, ResourceIdentifier id)
+ {
+ return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new ResourceGroupLongTermRetentionManagedInstanceBackup(clientOptions, credential, uri, pipeline, id));
+ }
+ #endregion
+
+ #region ManagedInstance
+ /// Gets an object representing a ManagedInstance along with the instance operations that can be performed on it but with no data.
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ManagedInstance GetManagedInstance(this ArmClient armClient, ResourceIdentifier id)
+ {
+ return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new ManagedInstance(clientOptions, credential, uri, pipeline, id));
+ }
+ #endregion
+
#region RestorableDroppedDatabase
/// Gets an object representing a RestorableDroppedDatabase along with the instance operations that can be performed on it but with no data.
/// The instance the method will execute against.
@@ -1123,17 +1134,6 @@ public static RestorableDroppedManagedDatabase GetRestorableDroppedManagedDataba
}
#endregion
- #region SqlServer
- /// Gets an object representing a SqlServer along with the instance operations that can be performed on it but with no data.
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static SqlServer GetSqlServer(this ArmClient armClient, ResourceIdentifier id)
- {
- return armClient.UseClientContext((uri, credential, clientOptions, pipeline) => new SqlServer(clientOptions, credential, uri, pipeline, id));
- }
- #endregion
-
#region ServerConnectionPolicy
/// Gets an object representing a ServerConnectionPolicy along with the instance operations that can be performed on it but with no data.
/// The instance the method will execute against.
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupExtensions.cs
index 793a4e27bc2f..d911f9908291 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupExtensions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupExtensions.cs
@@ -40,36 +40,6 @@ public static InstancePoolCollection GetInstancePools(this ResourceGroup resourc
}
#endregion
- #region ResourceGroupLongTermRetentionBackup
- /// Gets an object representing a ResourceGroupLongTermRetentionBackupCollection along with the instance operations that can be performed on it.
- /// The instance the method will execute against.
- /// Returns a object.
- public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLongTermRetentionBackups(this ResourceGroup resourceGroup)
- {
- return new ResourceGroupLongTermRetentionBackupCollection(resourceGroup);
- }
- #endregion
-
- #region ResourceGroupLongTermRetentionManagedInstanceBackup
- /// Gets an object representing a ResourceGroupLongTermRetentionManagedInstanceBackupCollection along with the instance operations that can be performed on it.
- /// The instance the method will execute against.
- /// Returns a object.
- public static ResourceGroupLongTermRetentionManagedInstanceBackupCollection GetResourceGroupLongTermRetentionManagedInstanceBackups(this ResourceGroup resourceGroup)
- {
- return new ResourceGroupLongTermRetentionManagedInstanceBackupCollection(resourceGroup);
- }
- #endregion
-
- #region ManagedInstance
- /// Gets an object representing a ManagedInstanceCollection along with the instance operations that can be performed on it.
- /// The instance the method will execute against.
- /// Returns a object.
- public static ManagedInstanceCollection GetManagedInstances(this ResourceGroup resourceGroup)
- {
- return new ManagedInstanceCollection(resourceGroup);
- }
- #endregion
-
#region ServerTrustGroup
/// Gets an object representing a ServerTrustGroupCollection along with the instance operations that can be performed on it.
/// The instance the method will execute against.
@@ -100,6 +70,36 @@ public static SqlServerCollection GetSqlServers(this ResourceGroup resourceGroup
}
#endregion
+ #region ResourceGroupLongTermRetentionBackup
+ /// Gets an object representing a ResourceGroupLongTermRetentionBackupCollection along with the instance operations that can be performed on it.
+ /// The instance the method will execute against.
+ /// Returns a object.
+ public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLongTermRetentionBackups(this ResourceGroup resourceGroup)
+ {
+ return new ResourceGroupLongTermRetentionBackupCollection(resourceGroup);
+ }
+ #endregion
+
+ #region ResourceGroupLongTermRetentionManagedInstanceBackup
+ /// Gets an object representing a ResourceGroupLongTermRetentionManagedInstanceBackupCollection along with the instance operations that can be performed on it.
+ /// The instance the method will execute against.
+ /// Returns a object.
+ public static ResourceGroupLongTermRetentionManagedInstanceBackupCollection GetResourceGroupLongTermRetentionManagedInstanceBackups(this ResourceGroup resourceGroup)
+ {
+ return new ResourceGroupLongTermRetentionManagedInstanceBackupCollection(resourceGroup);
+ }
+ #endregion
+
+ #region ManagedInstance
+ /// Gets an object representing a ManagedInstanceCollection along with the instance operations that can be performed on it.
+ /// The instance the method will execute against.
+ /// Returns a object.
+ public static ManagedInstanceCollection GetManagedInstances(this ResourceGroup resourceGroup)
+ {
+ return new ManagedInstanceCollection(resourceGroup);
+ }
+ #endregion
+
private static LongTermRetentionBackupsRestOperations GetLongTermRetentionBackupsRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
{
return new LongTermRetentionBackupsRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensions.cs
index c4f03b9ff336..69b361fbf886 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensions.cs
@@ -33,26 +33,6 @@ public static DeletedServerCollection GetDeletedServers(this Subscription subscr
}
#endregion
- #region SubscriptionLongTermRetentionBackup
- /// Gets an object representing a SubscriptionLongTermRetentionBackupCollection along with the instance operations that can be performed on it.
- /// The instance the method will execute against.
- /// Returns a object.
- public static SubscriptionLongTermRetentionBackupCollection GetSubscriptionLongTermRetentionBackups(this Subscription subscription)
- {
- return new SubscriptionLongTermRetentionBackupCollection(subscription);
- }
- #endregion
-
- #region SubscriptionLongTermRetentionManagedInstanceBackup
- /// Gets an object representing a SubscriptionLongTermRetentionManagedInstanceBackupCollection along with the instance operations that can be performed on it.
- /// The instance the method will execute against.
- /// Returns a object.
- public static SubscriptionLongTermRetentionManagedInstanceBackupCollection GetSubscriptionLongTermRetentionManagedInstanceBackups(this Subscription subscription)
- {
- return new SubscriptionLongTermRetentionManagedInstanceBackupCollection(subscription);
- }
- #endregion
-
#region SubscriptionUsage
/// Gets an object representing a SubscriptionUsageCollection along with the instance operations that can be performed on it.
/// The instance the method will execute against.
@@ -73,6 +53,26 @@ public static SqlTimeZoneCollection GetSqlTimeZones(this Subscription subscripti
}
#endregion
+ #region SubscriptionLongTermRetentionBackup
+ /// Gets an object representing a SubscriptionLongTermRetentionBackupCollection along with the instance operations that can be performed on it.
+ /// The instance the method will execute against.
+ /// Returns a object.
+ public static SubscriptionLongTermRetentionBackupCollection GetSubscriptionLongTermRetentionBackups(this Subscription subscription)
+ {
+ return new SubscriptionLongTermRetentionBackupCollection(subscription);
+ }
+ #endregion
+
+ #region SubscriptionLongTermRetentionManagedInstanceBackup
+ /// Gets an object representing a SubscriptionLongTermRetentionManagedInstanceBackupCollection along with the instance operations that can be performed on it.
+ /// The instance the method will execute against.
+ /// Returns a object.
+ public static SubscriptionLongTermRetentionManagedInstanceBackupCollection GetSubscriptionLongTermRetentionManagedInstanceBackups(this Subscription subscription)
+ {
+ return new SubscriptionLongTermRetentionManagedInstanceBackupCollection(subscription);
+ }
+ #endregion
+
private static DeletedServersRestOperations GetDeletedServersRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
{
return new DeletedServersRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
@@ -88,39 +88,34 @@ private static CapabilitiesRestOperations GetCapabilitiesRestOperations(ClientDi
return new CapabilitiesRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
}
- private static LongTermRetentionBackupsRestOperations GetLongTermRetentionBackupsRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
- {
- return new LongTermRetentionBackupsRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
- }
-
- private static LongTermRetentionManagedInstanceBackupsRestOperations GetLongTermRetentionManagedInstanceBackupsRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
+ private static SyncGroupsRestOperations GetSyncGroupsRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
{
- return new LongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
+ return new SyncGroupsRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
}
- private static ManagedInstancesRestOperations GetManagedInstancesRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
+ private static VirtualClustersRestOperations GetVirtualClustersRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
{
- return new ManagedInstancesRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
+ return new VirtualClustersRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
}
- private static OperationsHealthRestOperations GetOperationsHealthRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
+ private static ServersRestOperations GetServersRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
{
- return new OperationsHealthRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
+ return new ServersRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
}
- private static SyncGroupsRestOperations GetSyncGroupsRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
+ private static LongTermRetentionBackupsRestOperations GetLongTermRetentionBackupsRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
{
- return new SyncGroupsRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
+ return new LongTermRetentionBackupsRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
}
- private static VirtualClustersRestOperations GetVirtualClustersRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
+ private static LongTermRetentionManagedInstanceBackupsRestOperations GetLongTermRetentionManagedInstanceBackupsRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
{
- return new VirtualClustersRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
+ return new LongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
}
- private static ServersRestOperations GetServersRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
+ private static ManagedInstancesRestOperations GetManagedInstancesRestOperations(ClientDiagnostics clientDiagnostics, TokenCredential credential, ArmClientOptions clientOptions, HttpPipeline pipeline, Uri endpoint = null)
{
- return new ServersRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
+ return new ManagedInstancesRestOperations(clientDiagnostics, pipeline, clientOptions, endpoint);
}
/// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers
@@ -443,18 +438,16 @@ public static Response GetByLocationCapability(this Subscr
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: LongTermRetentionBackups_ListByLocation
- /// Lists the LongTermRetentionBackupDatas for this .
+ /// OperationId: SyncGroups_ListSyncDatabaseIds
+ /// Lists the SubResources for this .
/// The instance the method will execute against.
- /// The location of the database.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The name of the region where the resource is located.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
/// is null.
- public static AsyncPageable GetLongTermRetentionBackupsByLocationAsync(this Subscription subscription, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetSyncDatabaseIdsSyncGroupsAsync(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
{
if (locationName == null)
{
@@ -464,14 +457,14 @@ public static AsyncPageable GetLongTermRetentionBac
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetLongTermRetentionBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- async Task> FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetSyncGroupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByLocation");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetSyncDatabaseIdsSyncGroups");
scope.Start();
try
{
- var response = await restOperations.ListByLocationAsync(subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await restOperations.ListSyncDatabaseIdsAsync(subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -480,13 +473,13 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByLocation");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetSyncDatabaseIdsSyncGroups");
scope.Start();
try
{
- var response = await restOperations.ListByLocationNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await restOperations.ListSyncDatabaseIdsNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -500,18 +493,16 @@ async Task> NextPageFunc(string nextLink, int?
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: LongTermRetentionBackups_ListByLocation
- /// Lists the LongTermRetentionBackupDatas for this .
+ /// OperationId: SyncGroups_ListSyncDatabaseIds
+ /// Lists the SubResources for this .
/// The instance the method will execute against.
- /// The location of the database.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The name of the region where the resource is located.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
/// is null.
- public static Pageable GetLongTermRetentionBackupsByLocation(this Subscription subscription, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ public static Pageable GetSyncDatabaseIdsSyncGroups(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
{
if (locationName == null)
{
@@ -521,14 +512,14 @@ public static Pageable GetLongTermRetentionBackupsB
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetLongTermRetentionBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- Page FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetSyncGroupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByLocation");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetSyncDatabaseIdsSyncGroups");
scope.Start();
try
{
- var response = restOperations.ListByLocation(subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ var response = restOperations.ListSyncDatabaseIds(subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -537,13 +528,13 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByLocation");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetSyncDatabaseIdsSyncGroups");
scope.Start();
try
{
- var response = restOperations.ListByLocationNextPage(nextLink, subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ var response = restOperations.ListSyncDatabaseIdsNextPage(nextLink, subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -557,41 +548,27 @@ Page NextPageFunc(string nextLink, int? pageSizeHin
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: LongTermRetentionBackups_ListByServer
- /// Lists the LongTermRetentionBackupDatas for this .
+ /// OperationId: VirtualClusters_List
+ /// Lists the VirtualClusters for this .
/// The instance the method will execute against.
- /// The location of the database.
- /// The name of the server.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- /// or is null.
- public static AsyncPageable GetLongTermRetentionBackupsByServerAsync(this Subscription subscription, string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetVirtualClustersAsync(this Subscription subscription, CancellationToken cancellationToken = default)
{
- if (locationName == null)
- {
- throw new ArgumentNullException(nameof(locationName));
- }
- if (longTermRetentionServerName == null)
- {
- throw new ArgumentNullException(nameof(longTermRetentionServerName));
- }
-
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetLongTermRetentionBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- async Task> FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetVirtualClustersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByServer");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetVirtualClusters");
scope.Start();
try
{
- var response = await restOperations.ListByServerAsync(subscription.Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = await restOperations.ListAsync(subscription.Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -599,14 +576,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByServer");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetVirtualClusters");
scope.Start();
try
{
- var response = await restOperations.ListByServerNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = await restOperations.ListNextPageAsync(nextLink, subscription.Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -619,41 +596,27 @@ async Task> NextPageFunc(string nextLink, int?
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: LongTermRetentionBackups_ListByServer
- /// Lists the LongTermRetentionBackupDatas for this .
+ /// OperationId: VirtualClusters_List
+ /// Lists the VirtualClusters for this .
/// The instance the method will execute against.
- /// The location of the database.
- /// The name of the server.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- /// or is null.
- public static Pageable GetLongTermRetentionBackupsByServer(this Subscription subscription, string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ public static Pageable GetVirtualClusters(this Subscription subscription, CancellationToken cancellationToken = default)
{
- if (locationName == null)
- {
- throw new ArgumentNullException(nameof(locationName));
- }
- if (longTermRetentionServerName == null)
- {
- throw new ArgumentNullException(nameof(longTermRetentionServerName));
- }
-
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetLongTermRetentionBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- Page FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetVirtualClustersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByServer");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetVirtualClusters");
scope.Start();
try
{
- var response = restOperations.ListByServer(subscription.Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = restOperations.List(subscription.Id.SubscriptionId, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -661,14 +624,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByServer");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetVirtualClusters");
scope.Start();
try
{
- var response = restOperations.ListByServerNextPage(nextLink, subscription.Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = restOperations.ListNextPage(nextLink, subscription.Id.SubscriptionId, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -681,41 +644,56 @@ Page NextPageFunc(string nextLink, int? pageSizeHin
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups
- /// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: LongTermRetentionManagedInstanceBackups_ListByInstance
- /// Lists the ManagedInstanceLongTermRetentionBackupDatas for this .
+ /// Filters the list of VirtualClusters for a represented as generic resources.
/// The instance the method will execute against.
- /// The location of the database.
- /// The name of the managed instance.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The string to filter the list.
+ /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
+ /// The number of results to return.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- /// or is null.
- public static AsyncPageable GetLongTermRetentionManagedInstanceBackupsByInstanceAsync(this Subscription subscription, string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetVirtualClusterByNameAsync(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
{
- if (locationName == null)
- {
- throw new ArgumentNullException(nameof(locationName));
- }
- if (managedInstanceName == null)
- {
- throw new ArgumentNullException(nameof(managedInstanceName));
- }
+ ResourceFilterCollection filters = new(VirtualCluster.ResourceType);
+ filters.SubstringFilter = filter;
+ return ResourceListOperations.GetAtContextAsync(subscription, filters, expand, top, cancellationToken);
+ }
+
+ /// Filters the list of VirtualClusters for a represented as generic resources.
+ /// The instance the method will execute against.
+ /// The string to filter the list.
+ /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
+ /// The number of results to return.
+ /// The cancellation token to use.
+ /// A collection of resource operations that may take multiple service requests to iterate over.
+ public static Pageable GetVirtualClusterByName(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
+ {
+ ResourceFilterCollection filters = new(VirtualCluster.ResourceType);
+ filters.SubstringFilter = filter;
+ return ResourceListOperations.GetAtContext(subscription, filters, expand, top, cancellationToken);
+ }
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
+ /// ContextualPath: /subscriptions/{subscriptionId}
+ /// OperationId: Servers_List
+ /// Lists the SqlServers for this .
+ /// The instance the method will execute against.
+ /// The child resources to include in the response.
+ /// The cancellation token to use.
+ /// A collection of resource operations that may take multiple service requests to iterate over.
+ public static AsyncPageable GetServersAsync(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
+ {
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetLongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- async Task> FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetServersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetServers");
scope.Start();
try
{
- var response = await restOperations.ListByInstanceAsync(subscription.Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = await restOperations.ListAsync(subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SqlServer(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -723,14 +701,14 @@ async Task> FirstPageFunc(int?
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetServers");
scope.Start();
try
{
- var response = await restOperations.ListByInstanceNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = await restOperations.ListNextPageAsync(nextLink, subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SqlServer(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -743,41 +721,28 @@ async Task> NextPageFunc(string
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: LongTermRetentionManagedInstanceBackups_ListByInstance
- /// Lists the ManagedInstanceLongTermRetentionBackupDatas for this .
+ /// OperationId: Servers_List
+ /// Lists the SqlServers for this .
/// The instance the method will execute against.
- /// The location of the database.
- /// The name of the managed instance.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The child resources to include in the response.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- /// or is null.
- public static Pageable GetLongTermRetentionManagedInstanceBackupsByInstance(this Subscription subscription, string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ public static Pageable GetServers(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
{
- if (locationName == null)
- {
- throw new ArgumentNullException(nameof(locationName));
- }
- if (managedInstanceName == null)
- {
- throw new ArgumentNullException(nameof(managedInstanceName));
- }
-
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetLongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- Page FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetServersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetServers");
scope.Start();
try
{
- var response = restOperations.ListByInstance(subscription.Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = restOperations.List(subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SqlServer(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -785,14 +750,14 @@ Page FirstPageFunc(int? pageSizeHint
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetServers");
scope.Start();
try
{
- var response = restOperations.ListByInstanceNextPage(nextLink, subscription.Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = restOperations.ListNextPage(nextLink, subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SqlServer(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -805,142 +770,134 @@ Page NextPageFunc(string nextLink, i
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups
- /// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: LongTermRetentionManagedInstanceBackups_ListByLocation
- /// Lists the ManagedInstanceLongTermRetentionBackupDatas for this .
+ /// Filters the list of SqlServers for a represented as generic resources.
/// The instance the method will execute against.
- /// The location of the database.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The string to filter the list.
+ /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
+ /// The number of results to return.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- /// is null.
- public static AsyncPageable GetLongTermRetentionManagedInstanceBackupsByLocationAsync(this Subscription subscription, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetSqlServerByNameAsync(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
{
- if (locationName == null)
+ ResourceFilterCollection filters = new(SqlServer.ResourceType);
+ filters.SubstringFilter = filter;
+ return ResourceListOperations.GetAtContextAsync(subscription, filters, expand, top, cancellationToken);
+ }
+
+ /// Filters the list of SqlServers for a represented as generic resources.
+ /// The instance the method will execute against.
+ /// The string to filter the list.
+ /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
+ /// The number of results to return.
+ /// The cancellation token to use.
+ /// A collection of resource operations that may take multiple service requests to iterate over.
+ public static Pageable GetSqlServerByName(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
+ {
+ ResourceFilterCollection filters = new(SqlServer.ResourceType);
+ filters.SubstringFilter = filter;
+ return ResourceListOperations.GetAtContext(subscription, filters, expand, top, cancellationToken);
+ }
+
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
+ /// ContextualPath: /subscriptions/{subscriptionId}
+ /// OperationId: Servers_CheckNameAvailability
+ /// Determines whether a resource can be created with the specified name.
+ /// The instance the method will execute against.
+ /// The name availability request parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public static async Task> CheckNameAvailabilityServerAsync(this Subscription subscription, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
+ {
+ if (parameters == null)
{
- throw new ArgumentNullException(nameof(locationName));
+ throw new ArgumentNullException(nameof(parameters));
}
- return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
+ return await subscription.UseClientContext(async (baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetLongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- async Task> FirstPageFunc(int? pageSizeHint)
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.CheckNameAvailabilityServer");
+ scope.Start();
+ try
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByLocation");
- scope.Start();
- try
- {
- var response = await restOperations.ListByLocationAsync(subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ var restOperations = GetServersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ var response = await restOperations.CheckNameAvailabilityAsync(subscription.Id.SubscriptionId, parameters, cancellationToken).ConfigureAwait(false);
+ return response;
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ catch (Exception e)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByLocation");
- scope.Start();
- try
- {
- var response = await restOperations.ListByLocationNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ scope.Failed(e);
+ throw;
}
- return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
}
- );
+ ).ConfigureAwait(false);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: LongTermRetentionManagedInstanceBackups_ListByLocation
- /// Lists the ManagedInstanceLongTermRetentionBackupDatas for this .
+ /// OperationId: Servers_CheckNameAvailability
+ /// Determines whether a resource can be created with the specified name.
/// The instance the method will execute against.
- /// The location of the database.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The name availability request parameters.
/// The cancellation token to use.
- /// A collection of resource operations that may take multiple service requests to iterate over.
- /// is null.
- public static Pageable GetLongTermRetentionManagedInstanceBackupsByLocation(this Subscription subscription, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// is null.
+ public static Response CheckNameAvailabilityServer(this Subscription subscription, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
{
- if (locationName == null)
+ if (parameters == null)
{
- throw new ArgumentNullException(nameof(locationName));
+ throw new ArgumentNullException(nameof(parameters));
}
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetLongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- Page FirstPageFunc(int? pageSizeHint)
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.CheckNameAvailabilityServer");
+ scope.Start();
+ try
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByLocation");
- scope.Start();
- try
- {
- var response = restOperations.ListByLocation(subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ var restOperations = GetServersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ var response = restOperations.CheckNameAvailability(subscription.Id.SubscriptionId, parameters, cancellationToken);
+ return response;
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ catch (Exception e)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByLocation");
- scope.Start();
- try
- {
- var response = restOperations.ListByLocationNextPage(nextLink, subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ scope.Failed(e);
+ throw;
}
- return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
}
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: ManagedInstances_List
- /// Lists the ManagedInstances for this .
+ /// OperationId: LongTermRetentionBackups_ListByLocation
+ /// Lists the LongTermRetentionBackupDatas for this .
/// The instance the method will execute against.
- /// The child resources to include in the response.
+ /// The location of the database.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- public static AsyncPageable GetManagedInstancesAsync(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
+ /// is null.
+ public static AsyncPageable GetLongTermRetentionBackupsByLocationAsync(this Subscription subscription, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
+ if (locationName == null)
+ {
+ throw new ArgumentNullException(nameof(locationName));
+ }
+
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetManagedInstancesRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- async Task> FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetLongTermRetentionBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetManagedInstances");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = await restOperations.ListAsync(subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await restOperations.ListByLocationAsync(subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -948,14 +905,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetManagedInstances");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = await restOperations.ListNextPageAsync(nextLink, subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await restOperations.ListByLocationNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -968,28 +925,36 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHin
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: ManagedInstances_List
- /// Lists the ManagedInstances for this .
+ /// OperationId: LongTermRetentionBackups_ListByLocation
+ /// Lists the LongTermRetentionBackupDatas for this .
/// The instance the method will execute against.
- /// The child resources to include in the response.
+ /// The location of the database.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- public static Pageable GetManagedInstances(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
+ /// is null.
+ public static Pageable GetLongTermRetentionBackupsByLocation(this Subscription subscription, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
+ if (locationName == null)
+ {
+ throw new ArgumentNullException(nameof(locationName));
+ }
+
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetManagedInstancesRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- Page FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetLongTermRetentionBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetManagedInstances");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = restOperations.List(subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = restOperations.ListByLocation(subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -997,14 +962,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetManagedInstances");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = restOperations.ListNextPage(nextLink, subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = restOperations.ListByLocationNextPage(nextLink, subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1017,61 +982,40 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
);
}
- /// Filters the list of ManagedInstances for a represented as generic resources.
- /// The instance the method will execute against.
- /// The string to filter the list.
- /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
- /// The number of results to return.
- /// The cancellation token to use.
- /// A collection of resource operations that may take multiple service requests to iterate over.
- public static AsyncPageable GetManagedInstanceByNameAsync(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
- {
- ResourceFilterCollection filters = new(ManagedInstance.ResourceType);
- filters.SubstringFilter = filter;
- return ResourceListOperations.GetAtContextAsync(subscription, filters, expand, top, cancellationToken);
- }
-
- /// Filters the list of ManagedInstances for a represented as generic resources.
- /// The instance the method will execute against.
- /// The string to filter the list.
- /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
- /// The number of results to return.
- /// The cancellation token to use.
- /// A collection of resource operations that may take multiple service requests to iterate over.
- public static Pageable GetManagedInstanceByName(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
- {
- ResourceFilterCollection filters = new(ManagedInstance.ResourceType);
- filters.SubstringFilter = filter;
- return ResourceListOperations.GetAtContext(subscription, filters, expand, top, cancellationToken);
- }
-
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/operationsHealth
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: OperationsHealth_ListByLocation
- /// Lists the OperationsHealths for this .
+ /// OperationId: LongTermRetentionBackups_ListByServer
+ /// Lists the LongTermRetentionBackupDatas for this .
/// The instance the method will execute against.
- /// The name of the region where the resource is located.
+ /// The location of the database.
+ /// The name of the server.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- /// is null.
- public static AsyncPageable GetOperationsHealthsByLocationAsync(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
+ /// or is null.
+ public static AsyncPageable GetLongTermRetentionBackupsByServerAsync(this Subscription subscription, string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
if (locationName == null)
{
throw new ArgumentNullException(nameof(locationName));
}
+ if (longTermRetentionServerName == null)
+ {
+ throw new ArgumentNullException(nameof(longTermRetentionServerName));
+ }
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetOperationsHealthRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- async Task> FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetLongTermRetentionBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetOperationsHealthsByLocation");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByServer");
scope.Start();
try
{
- var response = await restOperations.ListByLocationAsync(subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await restOperations.ListByServerAsync(subscription.Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -1080,13 +1024,13 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetOperationsHealthsByLocation");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByServer");
scope.Start();
try
{
- var response = await restOperations.ListByLocationNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await restOperations.ListByServerNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -1100,33 +1044,40 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHi
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/operationsHealth
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: OperationsHealth_ListByLocation
- /// Lists the OperationsHealths for this .
+ /// OperationId: LongTermRetentionBackups_ListByServer
+ /// Lists the LongTermRetentionBackupDatas for this .
/// The instance the method will execute against.
- /// The name of the region where the resource is located.
+ /// The location of the database.
+ /// The name of the server.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- /// is null.
- public static Pageable GetOperationsHealthsByLocation(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
+ /// or is null.
+ public static Pageable GetLongTermRetentionBackupsByServer(this Subscription subscription, string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
if (locationName == null)
{
throw new ArgumentNullException(nameof(locationName));
}
+ if (longTermRetentionServerName == null)
+ {
+ throw new ArgumentNullException(nameof(longTermRetentionServerName));
+ }
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetOperationsHealthRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- Page FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetLongTermRetentionBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetOperationsHealthsByLocation");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByServer");
scope.Start();
try
{
- var response = restOperations.ListByLocation(subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
+ var response = restOperations.ListByServer(subscription.Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -1135,13 +1086,13 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetOperationsHealthsByLocation");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionBackupsByServer");
scope.Start();
try
{
- var response = restOperations.ListByLocationNextPage(nextLink, subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
+ var response = restOperations.ListByServerNextPage(nextLink, subscription.Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -1155,33 +1106,40 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: SyncGroups_ListSyncDatabaseIds
- /// Lists the SubResources for this .
+ /// OperationId: LongTermRetentionManagedInstanceBackups_ListByInstance
+ /// Lists the ManagedInstanceLongTermRetentionBackupDatas for this .
/// The instance the method will execute against.
- /// The name of the region where the resource is located.
+ /// The location of the database.
+ /// The name of the managed instance.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- /// is null.
- public static AsyncPageable GetSyncDatabaseIdsSyncGroupsAsync(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
+ /// or is null.
+ public static AsyncPageable GetLongTermRetentionManagedInstanceBackupsByInstanceAsync(this Subscription subscription, string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
if (locationName == null)
{
throw new ArgumentNullException(nameof(locationName));
}
+ if (managedInstanceName == null)
+ {
+ throw new ArgumentNullException(nameof(managedInstanceName));
+ }
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetSyncGroupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- async Task> FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetLongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetSyncDatabaseIdsSyncGroups");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByInstance");
scope.Start();
try
{
- var response = await restOperations.ListSyncDatabaseIdsAsync(subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await restOperations.ListByInstanceAsync(subscription.Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -1190,13 +1148,13 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetSyncDatabaseIdsSyncGroups");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByInstance");
scope.Start();
try
{
- var response = await restOperations.ListSyncDatabaseIdsNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await restOperations.ListByInstanceNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -1210,33 +1168,40 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: SyncGroups_ListSyncDatabaseIds
- /// Lists the SubResources for this .
+ /// OperationId: LongTermRetentionManagedInstanceBackups_ListByInstance
+ /// Lists the ManagedInstanceLongTermRetentionBackupDatas for this .
/// The instance the method will execute against.
- /// The name of the region where the resource is located.
+ /// The location of the database.
+ /// The name of the managed instance.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- /// is null.
- public static Pageable GetSyncDatabaseIdsSyncGroups(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
+ /// or is null.
+ public static Pageable GetLongTermRetentionManagedInstanceBackupsByInstance(this Subscription subscription, string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
if (locationName == null)
{
throw new ArgumentNullException(nameof(locationName));
}
+ if (managedInstanceName == null)
+ {
+ throw new ArgumentNullException(nameof(managedInstanceName));
+ }
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetSyncGroupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- Page FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetLongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetSyncDatabaseIdsSyncGroups");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByInstance");
scope.Start();
try
{
- var response = restOperations.ListSyncDatabaseIds(subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
+ var response = restOperations.ListByInstance(subscription.Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -1245,13 +1210,13 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetSyncDatabaseIdsSyncGroups");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByInstance");
scope.Start();
try
{
- var response = restOperations.ListSyncDatabaseIdsNextPage(nextLink, subscription.Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
+ var response = restOperations.ListByInstanceNextPage(nextLink, subscription.Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -1265,27 +1230,36 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: VirtualClusters_List
- /// Lists the VirtualClusters for this .
+ /// OperationId: LongTermRetentionManagedInstanceBackups_ListByLocation
+ /// Lists the ManagedInstanceLongTermRetentionBackupDatas for this .
/// The instance the method will execute against.
+ /// The location of the database.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- public static AsyncPageable GetVirtualClustersAsync(this Subscription subscription, CancellationToken cancellationToken = default)
+ /// is null.
+ public static AsyncPageable GetLongTermRetentionManagedInstanceBackupsByLocationAsync(this Subscription subscription, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
+ if (locationName == null)
+ {
+ throw new ArgumentNullException(nameof(locationName));
+ }
+
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetVirtualClustersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- async Task> FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetLongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetVirtualClusters");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = await restOperations.ListAsync(subscription.Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await restOperations.ListByLocationAsync(subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1293,14 +1267,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetVirtualClusters");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = await restOperations.ListNextPageAsync(nextLink, subscription.Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await restOperations.ListByLocationNextPageAsync(nextLink, subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1313,27 +1287,36 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: VirtualClusters_List
- /// Lists the VirtualClusters for this .
+ /// OperationId: LongTermRetentionManagedInstanceBackups_ListByLocation
+ /// Lists the ManagedInstanceLongTermRetentionBackupDatas for this .
/// The instance the method will execute against.
+ /// The location of the database.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- public static Pageable GetVirtualClusters(this Subscription subscription, CancellationToken cancellationToken = default)
+ /// is null.
+ public static Pageable GetLongTermRetentionManagedInstanceBackupsByLocation(this Subscription subscription, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
+ if (locationName == null)
+ {
+ throw new ArgumentNullException(nameof(locationName));
+ }
+
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetVirtualClustersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- Page FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetLongTermRetentionManagedInstanceBackupsRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetVirtualClusters");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = restOperations.List(subscription.Id.SubscriptionId, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = restOperations.ListByLocation(subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1341,14 +1324,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetVirtualClusters");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = restOperations.ListNextPage(nextLink, subscription.Id.SubscriptionId, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = restOperations.ListByLocationNextPage(nextLink, subscription.Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1361,56 +1344,28 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
);
}
- /// Filters the list of VirtualClusters for a represented as generic resources.
- /// The instance the method will execute against.
- /// The string to filter the list.
- /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
- /// The number of results to return.
- /// The cancellation token to use.
- /// A collection of resource operations that may take multiple service requests to iterate over.
- public static AsyncPageable GetVirtualClusterByNameAsync(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
- {
- ResourceFilterCollection filters = new(VirtualCluster.ResourceType);
- filters.SubstringFilter = filter;
- return ResourceListOperations.GetAtContextAsync(subscription, filters, expand, top, cancellationToken);
- }
-
- /// Filters the list of VirtualClusters for a represented as generic resources.
- /// The instance the method will execute against.
- /// The string to filter the list.
- /// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
- /// The number of results to return.
- /// The cancellation token to use.
- /// A collection of resource operations that may take multiple service requests to iterate over.
- public static Pageable GetVirtualClusterByName(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
- {
- ResourceFilterCollection filters = new(VirtualCluster.ResourceType);
- filters.SubstringFilter = filter;
- return ResourceListOperations.GetAtContext(subscription, filters, expand, top, cancellationToken);
- }
-
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: Servers_List
- /// Lists the SqlServers for this .
+ /// OperationId: ManagedInstances_List
+ /// Lists the ManagedInstances for this .
/// The instance the method will execute against.
/// The child resources to include in the response.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- public static AsyncPageable GetServersAsync(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetManagedInstancesAsync(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
{
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetServersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- async Task> FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetManagedInstancesRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetServers");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetManagedInstances");
scope.Start();
try
{
var response = await restOperations.ListAsync(subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServer(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1418,14 +1373,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetServers");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetManagedInstances");
scope.Start();
try
{
var response = await restOperations.ListNextPageAsync(nextLink, subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServer(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1438,28 +1393,28 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
);
}
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
+ /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances
/// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: Servers_List
- /// Lists the SqlServers for this .
+ /// OperationId: ManagedInstances_List
+ /// Lists the ManagedInstances for this .
/// The instance the method will execute against.
/// The child resources to include in the response.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- public static Pageable GetServers(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
+ public static Pageable GetManagedInstances(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
{
return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
{
var clientDiagnostics = new ClientDiagnostics(options);
- var restOperations = GetServersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- Page FirstPageFunc(int? pageSizeHint)
+ var restOperations = GetManagedInstancesRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetServers");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetManagedInstances");
scope.Start();
try
{
var response = restOperations.List(subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServer(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1467,14 +1422,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetServers");
+ using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.GetManagedInstances");
scope.Start();
try
{
var response = restOperations.ListNextPage(nextLink, subscription.Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServer(subscription, value)), response.Value.NextLink, response.GetRawResponse());
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(subscription, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1487,102 +1442,32 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
);
}
- /// Filters the list of SqlServers for a represented as generic resources.
+ /// Filters the list of ManagedInstances for a represented as generic resources.
/// The instance the method will execute against.
/// The string to filter the list.
/// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
/// The number of results to return.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- public static AsyncPageable GetSqlServerByNameAsync(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetManagedInstanceByNameAsync(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
{
- ResourceFilterCollection filters = new(SqlServer.ResourceType);
+ ResourceFilterCollection filters = new(ManagedInstance.ResourceType);
filters.SubstringFilter = filter;
return ResourceListOperations.GetAtContextAsync(subscription, filters, expand, top, cancellationToken);
}
- /// Filters the list of SqlServers for a represented as generic resources.
+ /// Filters the list of ManagedInstances for a represented as generic resources.
/// The instance the method will execute against.
/// The string to filter the list.
/// Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`.
/// The number of results to return.
/// The cancellation token to use.
/// A collection of resource operations that may take multiple service requests to iterate over.
- public static Pageable GetSqlServerByName(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
+ public static Pageable GetManagedInstanceByName(this Subscription subscription, string filter, string expand, int? top, CancellationToken cancellationToken = default)
{
- ResourceFilterCollection filters = new(SqlServer.ResourceType);
+ ResourceFilterCollection filters = new(ManagedInstance.ResourceType);
filters.SubstringFilter = filter;
return ResourceListOperations.GetAtContext(subscription, filters, expand, top, cancellationToken);
}
-
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
- /// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: Servers_CheckNameAvailability
- /// Determines whether a resource can be created with the specified name.
- /// The instance the method will execute against.
- /// The name availability request parameters.
- /// The cancellation token to use.
- /// is null.
- public static async Task> CheckNameAvailabilityServerAsync(this Subscription subscription, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
- {
- if (parameters == null)
- {
- throw new ArgumentNullException(nameof(parameters));
- }
-
- return await subscription.UseClientContext(async (baseUri, credential, options, pipeline) =>
- {
- var clientDiagnostics = new ClientDiagnostics(options);
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.CheckNameAvailabilityServer");
- scope.Start();
- try
- {
- var restOperations = GetServersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- var response = await restOperations.CheckNameAvailabilityAsync(subscription.Id.SubscriptionId, parameters, cancellationToken).ConfigureAwait(false);
- return response;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- ).ConfigureAwait(false);
- }
-
- /// RequestPath: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
- /// ContextualPath: /subscriptions/{subscriptionId}
- /// OperationId: Servers_CheckNameAvailability
- /// Determines whether a resource can be created with the specified name.
- /// The instance the method will execute against.
- /// The name availability request parameters.
- /// The cancellation token to use.
- /// is null.
- public static Response CheckNameAvailabilityServer(this Subscription subscription, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
- {
- if (parameters == null)
- {
- throw new ArgumentNullException(nameof(parameters));
- }
-
- return subscription.UseClientContext((baseUri, credential, options, pipeline) =>
- {
- var clientDiagnostics = new ClientDiagnostics(options);
- using var scope = clientDiagnostics.CreateScope("SubscriptionExtensions.CheckNameAvailabilityServer");
- scope.Start();
- try
- {
- var restOperations = GetServersRestOperations(clientDiagnostics, credential, options, pipeline, baseUri);
- var response = restOperations.CheckNameAvailability(subscription.Id.SubscriptionId, parameters, cancellationToken);
- return response;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- );
- }
}
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePool.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePool.cs
index 905d099d6312..6e4aa6a3309e 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePool.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePool.cs
@@ -24,8 +24,8 @@ public partial class InstancePool : ArmResource
{
private readonly ClientDiagnostics _clientDiagnostics;
private readonly InstancePoolsRestOperations _instancePoolsRestClient;
- private readonly ManagedInstancesRestOperations _managedInstancesRestClient;
private readonly UsagesRestOperations _usagesRestClient;
+ private readonly ManagedInstancesRestOperations _managedInstancesRestClient;
private readonly InstancePoolData _data;
/// Initializes a new instance of the class for mocking.
@@ -42,8 +42,8 @@ internal InstancePool(ArmResource options, InstancePoolData resource) : base(opt
_data = resource;
_clientDiagnostics = new ClientDiagnostics(ClientOptions);
_instancePoolsRestClient = new InstancePoolsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
- _managedInstancesRestClient = new ManagedInstancesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
_usagesRestClient = new UsagesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
+ _managedInstancesRestClient = new ManagedInstancesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
}
/// Initializes a new instance of the class.
@@ -53,8 +53,8 @@ internal InstancePool(ArmResource options, ResourceIdentifier id) : base(options
{
_clientDiagnostics = new ClientDiagnostics(ClientOptions);
_instancePoolsRestClient = new InstancePoolsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
- _managedInstancesRestClient = new ManagedInstancesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
_usagesRestClient = new UsagesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
+ _managedInstancesRestClient = new ManagedInstancesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
}
/// Initializes a new instance of the class.
@@ -67,8 +67,8 @@ internal InstancePool(ArmClientOptions clientOptions, TokenCredential credential
{
_clientDiagnostics = new ClientDiagnostics(ClientOptions);
_instancePoolsRestClient = new InstancePoolsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
- _managedInstancesRestClient = new ManagedInstancesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
_usagesRestClient = new UsagesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
+ _managedInstancesRestClient = new ManagedInstancesRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri);
}
/// Gets the resource type for the operations.
@@ -440,22 +440,22 @@ public virtual InstancePoolUpdateOperation Update(InstancePoolUpdate parameters,
}
}
- /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances
+ /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages
/// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}
- /// OperationId: ManagedInstances_ListByInstancePool
- /// Gets a list of all managed instances in an instance pool.
- /// The child resources to include in the response.
+ /// OperationId: Usages_ListByInstancePool
+ /// Gets all instance pool usage metrics.
+ /// Optional request parameter to include managed instance usages within the instance pool.
/// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetManagedInstancesAsync(string expand = null, CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetUsagesAsync(bool? expandChildren = null, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = _clientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
+ using var scope = _clientDiagnostics.CreateScope("InstancePool.GetUsages");
scope.Start();
try
{
- var response = await _managedInstancesRestClient.ListByInstancePoolAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _usagesRestClient.ListByInstancePoolAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expandChildren, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -464,13 +464,13 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _clientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
+ using var scope = _clientDiagnostics.CreateScope("InstancePool.GetUsages");
scope.Start();
try
{
- var response = await _managedInstancesRestClient.ListByInstancePoolNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _usagesRestClient.ListByInstancePoolNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expandChildren, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -482,22 +482,22 @@ async Task> NextPageFunc(string nextLink, int? pageSiz
return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
}
- /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances
+ /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages
/// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}
- /// OperationId: ManagedInstances_ListByInstancePool
- /// Gets a list of all managed instances in an instance pool.
- /// The child resources to include in the response.
+ /// OperationId: Usages_ListByInstancePool
+ /// Gets all instance pool usage metrics.
+ /// Optional request parameter to include managed instance usages within the instance pool.
/// The cancellation token to use.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetManagedInstances(string expand = null, CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetUsages(bool? expandChildren = null, CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = _clientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
+ using var scope = _clientDiagnostics.CreateScope("InstancePool.GetUsages");
scope.Start();
try
{
- var response = _managedInstancesRestClient.ListByInstancePool(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken);
+ var response = _usagesRestClient.ListByInstancePool(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expandChildren, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -506,13 +506,13 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _clientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
+ using var scope = _clientDiagnostics.CreateScope("InstancePool.GetUsages");
scope.Start();
try
{
- var response = _managedInstancesRestClient.ListByInstancePoolNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken);
+ var response = _usagesRestClient.ListByInstancePoolNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expandChildren, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -524,22 +524,22 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
}
- /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages
+ /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances
/// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}
- /// OperationId: Usages_ListByInstancePool
- /// Gets all instance pool usage metrics.
- /// Optional request parameter to include managed instance usages within the instance pool.
+ /// OperationId: ManagedInstances_ListByInstancePool
+ /// Gets a list of all managed instances in an instance pool.
+ /// The child resources to include in the response.
/// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetUsagesAsync(bool? expandChildren = null, CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetManagedInstancesAsync(string expand = null, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = _clientDiagnostics.CreateScope("InstancePool.GetUsages");
+ using var scope = _clientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
scope.Start();
try
{
- var response = await _usagesRestClient.ListByInstancePoolAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expandChildren, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _managedInstancesRestClient.ListByInstancePoolAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -548,13 +548,13 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _clientDiagnostics.CreateScope("InstancePool.GetUsages");
+ using var scope = _clientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
scope.Start();
try
{
- var response = await _usagesRestClient.ListByInstancePoolNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expandChildren, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _managedInstancesRestClient.ListByInstancePoolNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -566,22 +566,22 @@ async Task> NextPageFunc(string nextLink, int? pageSizeH
return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
}
- /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages
+ /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances
/// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}
- /// OperationId: Usages_ListByInstancePool
- /// Gets all instance pool usage metrics.
- /// Optional request parameter to include managed instance usages within the instance pool.
+ /// OperationId: ManagedInstances_ListByInstancePool
+ /// Gets a list of all managed instances in an instance pool.
+ /// The child resources to include in the response.
/// The cancellation token to use.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetUsages(bool? expandChildren = null, CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetManagedInstances(string expand = null, CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = _clientDiagnostics.CreateScope("InstancePool.GetUsages");
+ using var scope = _clientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
scope.Start();
try
{
- var response = _usagesRestClient.ListByInstancePool(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expandChildren, cancellationToken: cancellationToken);
+ var response = _managedInstancesRestClient.ListByInstancePool(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
@@ -590,13 +590,13 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _clientDiagnostics.CreateScope("InstancePool.GetUsages");
+ using var scope = _clientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
scope.Start();
try
{
- var response = _usagesRestClient.ListByInstancePoolNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expandChildren, cancellationToken: cancellationToken);
+ var response = _managedInstancesRestClient.ListByInstancePoolNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken);
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstance.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstance.cs
index 74bb19dd2326..015aa8710fea 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstance.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstance.cs
@@ -528,6 +528,152 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
}
+ /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates
+ /// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
+ /// OperationId: ManagedInstanceTdeCertificates_Create
+ /// Creates a TDE certificate for a given server.
+ /// The requested TDE certificate to be created or updated.
+ /// Waits for the completion of the long running operations.
+ /// The cancellation token to use.
+ /// is null.
+ public async virtual Task CreateManagedInstanceTdeCertificateAsync(TdeCertificate parameters, bool waitForCompletion = true, CancellationToken cancellationToken = default)
+ {
+ if (parameters == null)
+ {
+ throw new ArgumentNullException(nameof(parameters));
+ }
+
+ using var scope = _clientDiagnostics.CreateScope("ManagedInstance.CreateManagedInstanceTdeCertificate");
+ scope.Start();
+ try
+ {
+ var response = await _managedInstanceTdeCertificatesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken).ConfigureAwait(false);
+ var operation = new ManagedInstanceTdeCertificateCreateOperation(_clientDiagnostics, Pipeline, _managedInstanceTdeCertificatesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters).Request, response);
+ if (waitForCompletion)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates
+ /// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
+ /// OperationId: ManagedInstanceTdeCertificates_Create
+ /// Creates a TDE certificate for a given server.
+ /// The requested TDE certificate to be created or updated.
+ /// Waits for the completion of the long running operations.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ManagedInstanceTdeCertificateCreateOperation CreateManagedInstanceTdeCertificate(TdeCertificate parameters, bool waitForCompletion = true, CancellationToken cancellationToken = default)
+ {
+ if (parameters == null)
+ {
+ throw new ArgumentNullException(nameof(parameters));
+ }
+
+ using var scope = _clientDiagnostics.CreateScope("ManagedInstance.CreateManagedInstanceTdeCertificate");
+ scope.Start();
+ try
+ {
+ var response = _managedInstanceTdeCertificatesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken);
+ var operation = new ManagedInstanceTdeCertificateCreateOperation(_clientDiagnostics, Pipeline, _managedInstanceTdeCertificatesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters).Request, response);
+ if (waitForCompletion)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups
+ /// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
+ /// OperationId: ServerTrustGroups_ListByInstance
+ /// Gets a server trust groups by instance name.
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetServerTrustGroupsAsync(CancellationToken cancellationToken = default)
+ {
+ async Task> FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
+ scope.Start();
+ try
+ {
+ var response = await _serverTrustGroupsRestClient.ListByInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
+ scope.Start();
+ try
+ {
+ var response = await _serverTrustGroupsRestClient.ListByInstanceNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups
+ /// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
+ /// OperationId: ServerTrustGroups_ListByInstance
+ /// Gets a server trust groups by instance name.
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetServerTrustGroups(CancellationToken cancellationToken = default)
+ {
+ Page FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
+ scope.Start();
+ try
+ {
+ var response = _serverTrustGroupsRestClient.ListByInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
+ scope.Start();
+ try
+ {
+ var response = _serverTrustGroupsRestClient.ListByInstanceNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
/// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries
/// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
/// OperationId: ManagedInstances_ListByManagedInstance
@@ -676,152 +822,6 @@ public virtual ManagedInstanceFailoverOperation Failover(ReplicaType? replicaTyp
}
}
- /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates
- /// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
- /// OperationId: ManagedInstanceTdeCertificates_Create
- /// Creates a TDE certificate for a given server.
- /// The requested TDE certificate to be created or updated.
- /// Waits for the completion of the long running operations.
- /// The cancellation token to use.
- /// is null.
- public async virtual Task CreateManagedInstanceTdeCertificateAsync(TdeCertificate parameters, bool waitForCompletion = true, CancellationToken cancellationToken = default)
- {
- if (parameters == null)
- {
- throw new ArgumentNullException(nameof(parameters));
- }
-
- using var scope = _clientDiagnostics.CreateScope("ManagedInstance.CreateManagedInstanceTdeCertificate");
- scope.Start();
- try
- {
- var response = await _managedInstanceTdeCertificatesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken).ConfigureAwait(false);
- var operation = new ManagedInstanceTdeCertificateCreateOperation(_clientDiagnostics, Pipeline, _managedInstanceTdeCertificatesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters).Request, response);
- if (waitForCompletion)
- await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
- return operation;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates
- /// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
- /// OperationId: ManagedInstanceTdeCertificates_Create
- /// Creates a TDE certificate for a given server.
- /// The requested TDE certificate to be created or updated.
- /// Waits for the completion of the long running operations.
- /// The cancellation token to use.
- /// is null.
- public virtual ManagedInstanceTdeCertificateCreateOperation CreateManagedInstanceTdeCertificate(TdeCertificate parameters, bool waitForCompletion = true, CancellationToken cancellationToken = default)
- {
- if (parameters == null)
- {
- throw new ArgumentNullException(nameof(parameters));
- }
-
- using var scope = _clientDiagnostics.CreateScope("ManagedInstance.CreateManagedInstanceTdeCertificate");
- scope.Start();
- try
- {
- var response = _managedInstanceTdeCertificatesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken);
- var operation = new ManagedInstanceTdeCertificateCreateOperation(_clientDiagnostics, Pipeline, _managedInstanceTdeCertificatesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters).Request, response);
- if (waitForCompletion)
- operation.WaitForCompletion(cancellationToken);
- return operation;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups
- /// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
- /// OperationId: ServerTrustGroups_ListByInstance
- /// Gets a server trust groups by instance name.
- /// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetServerTrustGroupsAsync(CancellationToken cancellationToken = default)
- {
- async Task> FirstPageFunc(int? pageSizeHint)
- {
- using var scope = _clientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
- scope.Start();
- try
- {
- var response = await _serverTrustGroupsRestClient.ListByInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
- {
- using var scope = _clientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
- scope.Start();
- try
- {
- var response = await _serverTrustGroupsRestClient.ListByInstanceNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
- }
-
- /// RequestPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups
- /// ContextualPath: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
- /// OperationId: ServerTrustGroups_ListByInstance
- /// Gets a server trust groups by instance name.
- /// The cancellation token to use.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetServerTrustGroups(CancellationToken cancellationToken = default)
- {
- Page FirstPageFunc(int? pageSizeHint)
- {
- using var scope = _clientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
- scope.Start();
- try
- {
- var response = _serverTrustGroupsRestClient.ListByInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- Page NextPageFunc(string nextLink, int? pageSizeHint)
- {
- using var scope = _clientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
- scope.Start();
- try
- {
- var response = _serverTrustGroupsRestClient.ListByInstanceNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
- }
-
#region ManagedDatabase
/// Gets a collection of ManagedDatabases in the ManagedInstance.
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs
index f4eba7c7bfd1..1670396984f3 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs
@@ -68,12 +68,14 @@ public ManagedInstanceData(Location location) : base(location)
/// Specifies maintenance configuration id to apply to this managed instance.
/// List of private endpoint connections on a managed instance.
/// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'.
- /// The storage account type used to store backups for this instance. The options are LRS (LocallyRedundantStorage), ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage).
+ /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage).
+ /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage).
/// Whether or not the multi-az is enabled.
/// The resource id of a user assigned identity to be used by default.
/// A CMK URI of the key to use for encryption.
/// The Azure Active Directory administrator of the server.
- internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType type, IDictionary tags, Location location, Models.ResourceIdentity identity, Models.Sku sku, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, string administratorLogin, string administratorLoginPassword, string subnetId, string state, ManagedInstanceLicenseType? licenseType, int? vCores, int? storageSizeInGB, string collation, string dnsZone, string dnsZonePartner, bool? publicDataEndpointEnabled, string sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, string instancePoolId, string maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, StorageAccountType? storageAccountType, bool? zoneRedundant, string primaryUserAssignedIdentityId, string keyId, ManagedInstanceExternalAdministrator administrators) : base(id, name, type, tags, location)
+ /// The managed instance's service principal.
+ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType type, IDictionary tags, Location location, Models.ResourceIdentity identity, Models.Sku sku, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, string administratorLogin, string administratorLoginPassword, string subnetId, string state, ManagedInstanceLicenseType? licenseType, int? vCores, int? storageSizeInGB, string collation, string dnsZone, string dnsZonePartner, bool? publicDataEndpointEnabled, string sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, string instancePoolId, string maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, BackupStorageRedundancy? currentBackupStorageRedundancy, BackupStorageRedundancy? requestedBackupStorageRedundancy, bool? zoneRedundant, string primaryUserAssignedIdentityId, string keyId, ManagedInstanceExternalAdministrator administrators, ServicePrincipal servicePrincipal) : base(id, name, type, tags, location)
{
Identity = identity;
Sku = sku;
@@ -99,11 +101,13 @@ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType ty
MaintenanceConfigurationId = maintenanceConfigurationId;
PrivateEndpointConnections = privateEndpointConnections;
MinimalTlsVersion = minimalTlsVersion;
- StorageAccountType = storageAccountType;
+ CurrentBackupStorageRedundancy = currentBackupStorageRedundancy;
+ RequestedBackupStorageRedundancy = requestedBackupStorageRedundancy;
ZoneRedundant = zoneRedundant;
PrimaryUserAssignedIdentityId = primaryUserAssignedIdentityId;
KeyId = keyId;
Administrators = administrators;
+ ServicePrincipal = servicePrincipal;
}
/// The Azure Active Directory identity of the managed instance.
@@ -167,8 +171,10 @@ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType ty
public IReadOnlyList PrivateEndpointConnections { get; }
/// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'.
public string MinimalTlsVersion { get; set; }
- /// The storage account type used to store backups for this instance. The options are LRS (LocallyRedundantStorage), ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage).
- public StorageAccountType? StorageAccountType { get; set; }
+ /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage).
+ public BackupStorageRedundancy? CurrentBackupStorageRedundancy { get; }
+ /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage).
+ public BackupStorageRedundancy? RequestedBackupStorageRedundancy { get; set; }
/// Whether or not the multi-az is enabled.
public bool? ZoneRedundant { get; set; }
/// The resource id of a user assigned identity to be used by default.
@@ -177,5 +183,7 @@ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType ty
public string KeyId { get; set; }
/// The Azure Active Directory administrator of the server.
public ManagedInstanceExternalAdministrator Administrators { get; set; }
+ /// The managed instance's service principal.
+ public ServicePrincipal ServicePrincipal { get; set; }
}
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/BackupStorageRedundancy.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/BackupStorageRedundancy.cs
index f91e87ee069b..128880e8eb89 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/BackupStorageRedundancy.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/BackupStorageRedundancy.cs
@@ -10,7 +10,7 @@
namespace Azure.ResourceManager.Sql.Models
{
- /// The storage redundancy type of the copied backup.
+ /// The storage account type used to store backups for this database.
public readonly partial struct BackupStorageRedundancy : IEquatable
{
private readonly string _value;
@@ -25,6 +25,7 @@ public BackupStorageRedundancy(string value)
private const string GeoValue = "Geo";
private const string LocalValue = "Local";
private const string ZoneValue = "Zone";
+ private const string GeoZoneValue = "GeoZone";
/// Geo.
public static BackupStorageRedundancy Geo { get; } = new BackupStorageRedundancy(GeoValue);
@@ -32,6 +33,8 @@ public BackupStorageRedundancy(string value)
public static BackupStorageRedundancy Local { get; } = new BackupStorageRedundancy(LocalValue);
/// Zone.
public static BackupStorageRedundancy Zone { get; } = new BackupStorageRedundancy(ZoneValue);
+ /// GeoZone.
+ public static BackupStorageRedundancy GeoZone { get; } = new BackupStorageRedundancy(GeoZoneValue);
/// Determines if two values are the same.
public static bool operator ==(BackupStorageRedundancy left, BackupStorageRedundancy right) => left.Equals(right);
/// Determines if two values are not the same.
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CopyLongTermRetentionBackupOptions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CopyLongTermRetentionBackupOptions.cs
index ee8fb9555623..ebef9f837b63 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CopyLongTermRetentionBackupOptions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CopyLongTermRetentionBackupOptions.cs
@@ -26,6 +26,6 @@ public CopyLongTermRetentionBackupOptions()
/// The name of the database owns the copied backup.
public string TargetDatabaseName { get; set; }
/// The storage redundancy type of the copied backup.
- public TargetBackupStorageRedundancy? TargetBackupStorageRedundancy { get; set; }
+ public BackupStorageRedundancy? TargetBackupStorageRedundancy { get; set; }
}
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CurrentBackupStorageRedundancy.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CurrentBackupStorageRedundancy.cs
deleted file mode 100644
index a4bb6a17adda..000000000000
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CurrentBackupStorageRedundancy.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.ComponentModel;
-
-namespace Azure.ResourceManager.Sql.Models
-{
- /// The storage account type used to store backups for this database.
- public readonly partial struct CurrentBackupStorageRedundancy : IEquatable
- {
- private readonly string _value;
-
- /// Initializes a new instance of .
- /// is null.
- public CurrentBackupStorageRedundancy(string value)
- {
- _value = value ?? throw new ArgumentNullException(nameof(value));
- }
-
- private const string GeoValue = "Geo";
- private const string LocalValue = "Local";
- private const string ZoneValue = "Zone";
-
- /// Geo.
- public static CurrentBackupStorageRedundancy Geo { get; } = new CurrentBackupStorageRedundancy(GeoValue);
- /// Local.
- public static CurrentBackupStorageRedundancy Local { get; } = new CurrentBackupStorageRedundancy(LocalValue);
- /// Zone.
- public static CurrentBackupStorageRedundancy Zone { get; } = new CurrentBackupStorageRedundancy(ZoneValue);
- /// Determines if two values are the same.
- public static bool operator ==(CurrentBackupStorageRedundancy left, CurrentBackupStorageRedundancy right) => left.Equals(right);
- /// Determines if two values are not the same.
- public static bool operator !=(CurrentBackupStorageRedundancy left, CurrentBackupStorageRedundancy right) => !left.Equals(right);
- /// Converts a string to a .
- public static implicit operator CurrentBackupStorageRedundancy(string value) => new CurrentBackupStorageRedundancy(value);
-
- ///
- [EditorBrowsable(EditorBrowsableState.Never)]
- public override bool Equals(object obj) => obj is CurrentBackupStorageRedundancy other && Equals(other);
- ///
- public bool Equals(CurrentBackupStorageRedundancy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
-
- ///
- [EditorBrowsable(EditorBrowsableState.Never)]
- public override int GetHashCode() => _value?.GetHashCode() ?? 0;
- ///
- public override string ToString() => _value;
- }
-}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseIdentity.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseIdentity.Serialization.cs
new file mode 100644
index 000000000000..a0a128bb53bc
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseIdentity.Serialization.cs
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.Resources.Models;
+
+namespace Azure.ResourceManager.Sql.Models
+{
+ public partial class DatabaseIdentity : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Type))
+ {
+ writer.WritePropertyName("type");
+ writer.WriteStringValue(Type.Value.ToString());
+ }
+ if (Optional.IsCollectionDefined(UserAssignedIdentities))
+ {
+ writer.WritePropertyName("userAssignedIdentities");
+ writer.WriteStartObject();
+ foreach (var item in UserAssignedIdentities)
+ {
+ writer.WritePropertyName(item.Key);
+ JsonSerializer.Serialize(writer, item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ if (Optional.IsCollectionDefined(DelegatedResources))
+ {
+ writer.WritePropertyName("delegatedResources");
+ writer.WriteStartObject();
+ foreach (var item in DelegatedResources)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteObjectValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static DatabaseIdentity DeserializeDatabaseIdentity(JsonElement element)
+ {
+ Optional type = default;
+ Optional tenantId = default;
+ Optional> userAssignedIdentities = default;
+ Optional> delegatedResources = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("type"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ type = new DatabaseIdentityType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("tenantId"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ tenantId = property.Value.GetGuid();
+ continue;
+ }
+ if (property.NameEquals("userAssignedIdentities"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ dictionary.Add(property0.Name, JsonSerializer.Deserialize(property0.Value.ToString()));
+ }
+ userAssignedIdentities = dictionary;
+ continue;
+ }
+ if (property.NameEquals("delegatedResources"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ dictionary.Add(property0.Name, Delegation.DeserializeDelegation(property0.Value));
+ }
+ delegatedResources = dictionary;
+ continue;
+ }
+ }
+ return new DatabaseIdentity(Optional.ToNullable(type), Optional.ToNullable(tenantId), Optional.ToDictionary(userAssignedIdentities), Optional.ToDictionary(delegatedResources));
+ }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseIdentity.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseIdentity.cs
new file mode 100644
index 000000000000..8cdc0dc06d58
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseIdentity.cs
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.Resources.Models;
+
+namespace Azure.ResourceManager.Sql.Models
+{
+ /// Azure Active Directory identity configuration for a resource.
+ public partial class DatabaseIdentity
+ {
+ /// Initializes a new instance of DatabaseIdentity.
+ public DatabaseIdentity()
+ {
+ UserAssignedIdentities = new ChangeTrackingDictionary();
+ DelegatedResources = new ChangeTrackingDictionary();
+ }
+
+ /// Initializes a new instance of DatabaseIdentity.
+ /// The identity type.
+ /// The Azure Active Directory tenant id.
+ /// The resource ids of the user assigned identities to use.
+ /// Resources delegated to the database - Internal Use Only.
+ internal DatabaseIdentity(DatabaseIdentityType? type, Guid? tenantId, IDictionary userAssignedIdentities, IDictionary delegatedResources)
+ {
+ Type = type;
+ TenantId = tenantId;
+ UserAssignedIdentities = userAssignedIdentities;
+ DelegatedResources = delegatedResources;
+ }
+
+ /// The identity type.
+ public DatabaseIdentityType? Type { get; set; }
+ /// The Azure Active Directory tenant id.
+ public Guid? TenantId { get; }
+ /// The resource ids of the user assigned identities to use.
+ public IDictionary UserAssignedIdentities { get; }
+ /// Resources delegated to the database - Internal Use Only.
+ public IDictionary DelegatedResources { get; }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseIdentityType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseIdentityType.cs
new file mode 100644
index 000000000000..263a17f7b722
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseIdentityType.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.Sql.Models
+{
+ /// The identity type.
+ public readonly partial struct DatabaseIdentityType : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public DatabaseIdentityType(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string NoneValue = "None";
+ private const string UserAssignedValue = "UserAssigned";
+
+ /// None.
+ public static DatabaseIdentityType None { get; } = new DatabaseIdentityType(NoneValue);
+ /// UserAssigned.
+ public static DatabaseIdentityType UserAssigned { get; } = new DatabaseIdentityType(UserAssignedValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(DatabaseIdentityType left, DatabaseIdentityType right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(DatabaseIdentityType left, DatabaseIdentityType right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator DatabaseIdentityType(string value) => new DatabaseIdentityType(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is DatabaseIdentityType other && Equals(other);
+ ///
+ public bool Equals(DatabaseIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseStatus.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseStatus.cs
index 0f2a12829f4c..6080fa5ff97d 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseStatus.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseStatus.cs
@@ -43,6 +43,9 @@ public DatabaseStatus(string value)
private const string OfflineChangingDwPerformanceTiersValue = "OfflineChangingDwPerformanceTiers";
private const string OnlineChangingDwPerformanceTiersValue = "OnlineChangingDwPerformanceTiers";
private const string DisabledValue = "Disabled";
+ private const string StoppingValue = "Stopping";
+ private const string StoppedValue = "Stopped";
+ private const string StartingValue = "Starting";
/// Online.
public static DatabaseStatus Online { get; } = new DatabaseStatus(OnlineValue);
@@ -86,6 +89,12 @@ public DatabaseStatus(string value)
public static DatabaseStatus OnlineChangingDwPerformanceTiers { get; } = new DatabaseStatus(OnlineChangingDwPerformanceTiersValue);
/// Disabled.
public static DatabaseStatus Disabled { get; } = new DatabaseStatus(DisabledValue);
+ /// Stopping.
+ public static DatabaseStatus Stopping { get; } = new DatabaseStatus(StoppingValue);
+ /// Stopped.
+ public static DatabaseStatus Stopped { get; } = new DatabaseStatus(StoppedValue);
+ /// Starting.
+ public static DatabaseStatus Starting { get; } = new DatabaseStatus(StartingValue);
/// Determines if two values are the same.
public static bool operator ==(DatabaseStatus left, DatabaseStatus right) => left.Equals(right);
/// Determines if two values are not the same.
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseUpdate.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseUpdate.Serialization.cs
index bc9a2063e110..df305d1e650f 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseUpdate.Serialization.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseUpdate.Serialization.cs
@@ -20,6 +20,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("sku");
writer.WriteObjectValue(Sku);
}
+ if (Optional.IsDefined(Identity))
+ {
+ writer.WritePropertyName("identity");
+ writer.WriteObjectValue(Identity);
+ }
if (Optional.IsCollectionDefined(Tags))
{
writer.WritePropertyName("tags");
@@ -148,6 +153,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("isLedgerOn");
writer.WriteBooleanValue(IsLedgerOn.Value);
}
+ if (Optional.IsDefined(FederatedClientId))
+ {
+ writer.WritePropertyName("federatedClientId");
+ writer.WriteStringValue(FederatedClientId.Value);
+ }
+ if (Optional.IsDefined(PrimaryDelegatedIdentityClientId))
+ {
+ writer.WritePropertyName("primaryDelegatedIdentityClientId");
+ writer.WriteStringValue(PrimaryDelegatedIdentityClientId.Value);
+ }
writer.WriteEndObject();
writer.WriteEndObject();
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseUpdate.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseUpdate.cs
index bdcdf4481a0b..f6dc6594f98f 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseUpdate.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseUpdate.cs
@@ -22,6 +22,8 @@ public DatabaseUpdate()
/// The name and tier of the SKU.
public Sku Sku { get; set; }
+ /// Database identity.
+ public DatabaseIdentity Identity { get; set; }
/// Resource tags.
public IDictionary Tags { get; }
///
@@ -101,9 +103,9 @@ public DatabaseUpdate()
/// Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.
public int? AutoPauseDelay { get; set; }
/// The storage account type used to store backups for this database.
- public CurrentBackupStorageRedundancy? CurrentBackupStorageRedundancy { get; }
+ public BackupStorageRedundancy? CurrentBackupStorageRedundancy { get; }
/// The storage account type to be used to store backups for this database.
- public RequestedBackupStorageRedundancy? RequestedBackupStorageRedundancy { get; set; }
+ public BackupStorageRedundancy? RequestedBackupStorageRedundancy { get; set; }
/// Minimal capacity that database will always have allocated, if not paused.
public double? MinCapacity { get; set; }
/// The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.
@@ -116,5 +118,9 @@ public DatabaseUpdate()
public bool? IsLedgerOn { get; set; }
/// Infra encryption is enabled for this database.
public bool? IsInfraEncryptionEnabled { get; }
+ /// The Client id used for cross tenant per database CMK scenario.
+ public Guid? FederatedClientId { get; set; }
+ /// The Primary Delegated Identity Client id used for per database CMK - for internal use only.
+ public Guid? PrimaryDelegatedIdentityClientId { get; set; }
}
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/Delegation.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/Delegation.Serialization.cs
new file mode 100644
index 000000000000..fbf22ed21450
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/Delegation.Serialization.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Sql.Models
+{
+ public partial class Delegation : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(ResourceId))
+ {
+ writer.WritePropertyName("resourceId");
+ writer.WriteStringValue(ResourceId);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static Delegation DeserializeDelegation(JsonElement element)
+ {
+ Optional resourceId = default;
+ Optional tenantId = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("resourceId"))
+ {
+ resourceId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("tenantId"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ tenantId = property.Value.GetGuid();
+ continue;
+ }
+ }
+ return new Delegation(resourceId.Value, Optional.ToNullable(tenantId));
+ }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/Delegation.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/Delegation.cs
new file mode 100644
index 000000000000..f70659e50303
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/Delegation.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.ResourceManager.Sql.Models
+{
+ /// Delegated Resource Properties - Internal Use Only.
+ public partial class Delegation
+ {
+ /// Initializes a new instance of Delegation.
+ public Delegation()
+ {
+ }
+
+ /// Initializes a new instance of Delegation.
+ /// The resource id of the source resource - Internal Use Only.
+ /// AAD tenant guid of the source resource identity - Internal Use Only.
+ internal Delegation(string resourceId, Guid? tenantId)
+ {
+ ResourceId = resourceId;
+ TenantId = tenantId;
+ }
+
+ /// The resource id of the source resource - Internal Use Only.
+ public string ResourceId { get; set; }
+ /// AAD tenant guid of the source resource identity - Internal Use Only.
+ public Guid? TenantId { get; }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceData.Serialization.cs
index 34c4b569e587..4fb0316d3429 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceData.Serialization.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceData.Serialization.cs
@@ -127,10 +127,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("minimalTlsVersion");
writer.WriteStringValue(MinimalTlsVersion);
}
- if (Optional.IsDefined(StorageAccountType))
+ if (Optional.IsDefined(RequestedBackupStorageRedundancy))
{
- writer.WritePropertyName("storageAccountType");
- writer.WriteStringValue(StorageAccountType.Value.ToString());
+ writer.WritePropertyName("requestedBackupStorageRedundancy");
+ writer.WriteStringValue(RequestedBackupStorageRedundancy.Value.ToString());
}
if (Optional.IsDefined(ZoneRedundant))
{
@@ -152,6 +152,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("administrators");
writer.WriteObjectValue(Administrators);
}
+ if (Optional.IsDefined(ServicePrincipal))
+ {
+ writer.WritePropertyName("servicePrincipal");
+ writer.WriteObjectValue(ServicePrincipal);
+ }
writer.WriteEndObject();
writer.WriteEndObject();
}
@@ -187,11 +192,13 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e
Optional maintenanceConfigurationId = default;
Optional> privateEndpointConnections = default;
Optional minimalTlsVersion = default;
- Optional storageAccountType = default;
+ Optional currentBackupStorageRedundancy = default;
+ Optional requestedBackupStorageRedundancy = default;
Optional zoneRedundant = default;
Optional primaryUserAssignedIdentityId = default;
Optional keyId = default;
Optional administrators = default;
+ Optional servicePrincipal = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("identity"))
@@ -413,14 +420,24 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e
minimalTlsVersion = property0.Value.GetString();
continue;
}
- if (property0.NameEquals("storageAccountType"))
+ if (property0.NameEquals("currentBackupStorageRedundancy"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ property0.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ currentBackupStorageRedundancy = new BackupStorageRedundancy(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("requestedBackupStorageRedundancy"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
- storageAccountType = new StorageAccountType(property0.Value.GetString());
+ requestedBackupStorageRedundancy = new BackupStorageRedundancy(property0.Value.GetString());
continue;
}
if (property0.NameEquals("zoneRedundant"))
@@ -453,11 +470,21 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e
administrators = ManagedInstanceExternalAdministrator.DeserializeManagedInstanceExternalAdministrator(property0.Value);
continue;
}
+ if (property0.NameEquals("servicePrincipal"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ property0.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ servicePrincipal = ServicePrincipal.DeserializeServicePrincipal(property0.Value);
+ continue;
+ }
}
continue;
}
}
- return new ManagedInstanceData(id, name, type, tags, location, identity.Value, sku.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(managedInstanceCreateMode), fullyQualifiedDomainName.Value, administratorLogin.Value, administratorLoginPassword.Value, subnetId.Value, state.Value, Optional.ToNullable(licenseType), Optional.ToNullable(vCores), Optional.ToNullable(storageSizeInGB), collation.Value, dnsZone.Value, dnsZonePartner.Value, Optional.ToNullable(publicDataEndpointEnabled), sourceManagedInstanceId.Value, Optional.ToNullable(restorePointInTime), Optional.ToNullable(proxyOverride), timezoneId.Value, instancePoolId.Value, maintenanceConfigurationId.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(storageAccountType), Optional.ToNullable(zoneRedundant), primaryUserAssignedIdentityId.Value, keyId.Value, administrators.Value);
+ return new ManagedInstanceData(id, name, type, tags, location, identity.Value, sku.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(managedInstanceCreateMode), fullyQualifiedDomainName.Value, administratorLogin.Value, administratorLoginPassword.Value, subnetId.Value, state.Value, Optional.ToNullable(licenseType), Optional.ToNullable(vCores), Optional.ToNullable(storageSizeInGB), collation.Value, dnsZone.Value, dnsZonePartner.Value, Optional.ToNullable(publicDataEndpointEnabled), sourceManagedInstanceId.Value, Optional.ToNullable(restorePointInTime), Optional.ToNullable(proxyOverride), timezoneId.Value, instancePoolId.Value, maintenanceConfigurationId.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(currentBackupStorageRedundancy), Optional.ToNullable(requestedBackupStorageRedundancy), Optional.ToNullable(zoneRedundant), primaryUserAssignedIdentityId.Value, keyId.Value, administrators.Value, servicePrincipal.Value);
}
}
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePropertiesProvisioningState.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePropertiesProvisioningState.cs
index 309aee81a204..4e611e194278 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePropertiesProvisioningState.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePropertiesProvisioningState.cs
@@ -28,6 +28,15 @@ public ManagedInstancePropertiesProvisioningState(string value)
private const string UnknownValue = "Unknown";
private const string SucceededValue = "Succeeded";
private const string FailedValue = "Failed";
+ private const string AcceptedValue = "Accepted";
+ private const string CreatedValue = "Created";
+ private const string DeletedValue = "Deleted";
+ private const string UnrecognizedValue = "Unrecognized";
+ private const string RunningValue = "Running";
+ private const string CanceledValue = "Canceled";
+ private const string NotSpecifiedValue = "NotSpecified";
+ private const string RegisteringValue = "Registering";
+ private const string TimedOutValue = "TimedOut";
/// Creating.
public static ManagedInstancePropertiesProvisioningState Creating { get; } = new ManagedInstancePropertiesProvisioningState(CreatingValue);
@@ -41,6 +50,24 @@ public ManagedInstancePropertiesProvisioningState(string value)
public static ManagedInstancePropertiesProvisioningState Succeeded { get; } = new ManagedInstancePropertiesProvisioningState(SucceededValue);
/// Failed.
public static ManagedInstancePropertiesProvisioningState Failed { get; } = new ManagedInstancePropertiesProvisioningState(FailedValue);
+ /// Accepted.
+ public static ManagedInstancePropertiesProvisioningState Accepted { get; } = new ManagedInstancePropertiesProvisioningState(AcceptedValue);
+ /// Created.
+ public static ManagedInstancePropertiesProvisioningState Created { get; } = new ManagedInstancePropertiesProvisioningState(CreatedValue);
+ /// Deleted.
+ public static ManagedInstancePropertiesProvisioningState Deleted { get; } = new ManagedInstancePropertiesProvisioningState(DeletedValue);
+ /// Unrecognized.
+ public static ManagedInstancePropertiesProvisioningState Unrecognized { get; } = new ManagedInstancePropertiesProvisioningState(UnrecognizedValue);
+ /// Running.
+ public static ManagedInstancePropertiesProvisioningState Running { get; } = new ManagedInstancePropertiesProvisioningState(RunningValue);
+ /// Canceled.
+ public static ManagedInstancePropertiesProvisioningState Canceled { get; } = new ManagedInstancePropertiesProvisioningState(CanceledValue);
+ /// NotSpecified.
+ public static ManagedInstancePropertiesProvisioningState NotSpecified { get; } = new ManagedInstancePropertiesProvisioningState(NotSpecifiedValue);
+ /// Registering.
+ public static ManagedInstancePropertiesProvisioningState Registering { get; } = new ManagedInstancePropertiesProvisioningState(RegisteringValue);
+ /// TimedOut.
+ public static ManagedInstancePropertiesProvisioningState TimedOut { get; } = new ManagedInstancePropertiesProvisioningState(TimedOutValue);
/// Determines if two values are the same.
public static bool operator ==(ManagedInstancePropertiesProvisioningState left, ManagedInstancePropertiesProvisioningState right) => left.Equals(right);
/// Determines if two values are not the same.
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdate.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdate.Serialization.cs
index 7d5f9728342e..4d1b3a23c7b6 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdate.Serialization.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdate.Serialization.cs
@@ -123,10 +123,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("minimalTlsVersion");
writer.WriteStringValue(MinimalTlsVersion);
}
- if (Optional.IsDefined(StorageAccountType))
+ if (Optional.IsDefined(RequestedBackupStorageRedundancy))
{
- writer.WritePropertyName("storageAccountType");
- writer.WriteStringValue(StorageAccountType.Value.ToString());
+ writer.WritePropertyName("requestedBackupStorageRedundancy");
+ writer.WriteStringValue(RequestedBackupStorageRedundancy.Value.ToString());
}
if (Optional.IsDefined(ZoneRedundant))
{
@@ -148,6 +148,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("administrators");
writer.WriteObjectValue(Administrators);
}
+ if (Optional.IsDefined(ServicePrincipal))
+ {
+ writer.WritePropertyName("servicePrincipal");
+ writer.WriteObjectValue(ServicePrincipal);
+ }
writer.WriteEndObject();
writer.WriteEndObject();
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdate.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdate.cs
index 0994409bc92e..c3fc088c5664 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdate.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdate.cs
@@ -84,8 +84,10 @@ public ManagedInstanceUpdate()
public IReadOnlyList PrivateEndpointConnections { get; }
/// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'.
public string MinimalTlsVersion { get; set; }
- /// The storage account type used to store backups for this instance. The options are LRS (LocallyRedundantStorage), ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage).
- public StorageAccountType? StorageAccountType { get; set; }
+ /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage).
+ public BackupStorageRedundancy? CurrentBackupStorageRedundancy { get; }
+ /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage).
+ public BackupStorageRedundancy? RequestedBackupStorageRedundancy { get; set; }
/// Whether or not the multi-az is enabled.
public bool? ZoneRedundant { get; set; }
/// The resource id of a user assigned identity to be used by default.
@@ -94,5 +96,7 @@ public ManagedInstanceUpdate()
public string KeyId { get; set; }
/// The Azure Active Directory administrator of the server.
public ManagedInstanceExternalAdministrator Administrators { get; set; }
+ /// The managed instance's service principal.
+ public ServicePrincipal ServicePrincipal { get; set; }
}
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealth.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealth.Serialization.cs
deleted file mode 100644
index 124ac68a8b1f..000000000000
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealth.Serialization.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System.Text.Json;
-using Azure.Core;
-using Azure.ResourceManager;
-
-namespace Azure.ResourceManager.Sql.Models
-{
- public partial class OperationsHealth : IUtf8JsonSerializable
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
- {
- writer.WriteStartObject();
- writer.WritePropertyName("properties");
- writer.WriteStartObject();
- writer.WriteEndObject();
- writer.WriteEndObject();
- }
-
- internal static OperationsHealth DeserializeOperationsHealth(JsonElement element)
- {
- ResourceIdentifier id = default;
- string name = default;
- ResourceType type = default;
- Optional name0 = default;
- Optional health = default;
- Optional description = default;
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("id"))
- {
- id = new ResourceIdentifier(property.Value.GetString());
- continue;
- }
- if (property.NameEquals("name"))
- {
- name = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("type"))
- {
- type = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("properties"))
- {
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- property.ThrowNonNullablePropertyIsNull();
- continue;
- }
- foreach (var property0 in property.Value.EnumerateObject())
- {
- if (property0.NameEquals("name"))
- {
- name0 = property0.Value.GetString();
- continue;
- }
- if (property0.NameEquals("health"))
- {
- health = property0.Value.GetString();
- continue;
- }
- if (property0.NameEquals("description"))
- {
- description = property0.Value.GetString();
- continue;
- }
- }
- continue;
- }
- }
- return new OperationsHealth(id, name, type, name0.Value, health.Value, description.Value);
- }
- }
-}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealth.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealth.cs
deleted file mode 100644
index b3f37bbcd19d..000000000000
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealth.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using Azure.ResourceManager;
-using Azure.ResourceManager.Models;
-
-namespace Azure.ResourceManager.Sql.Models
-{
- /// Operations health status in a location.
- public partial class OperationsHealth : Resource
- {
- /// Initializes a new instance of OperationsHealth.
- public OperationsHealth()
- {
- }
-
- /// Initializes a new instance of OperationsHealth.
- /// The id.
- /// The name.
- /// The type.
- /// Operation name for the service.
- /// Operation health status of the service.
- /// Health status description.
- internal OperationsHealth(ResourceIdentifier id, string name, ResourceType type, string namePropertiesName, string health, string description) : base(id, name, type)
- {
- NamePropertiesName = namePropertiesName;
- Health = health;
- Description = description;
- }
-
- /// Operation name for the service.
- public string NamePropertiesName { get; }
- /// Operation health status of the service.
- public string Health { get; }
- /// Health status description.
- public string Description { get; }
- }
-}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealthListResult.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealthListResult.Serialization.cs
deleted file mode 100644
index e3c818cd1a17..000000000000
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealthListResult.Serialization.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System.Collections.Generic;
-using System.Text.Json;
-using Azure.Core;
-
-namespace Azure.ResourceManager.Sql.Models
-{
- internal partial class OperationsHealthListResult
- {
- internal static OperationsHealthListResult DeserializeOperationsHealthListResult(JsonElement element)
- {
- Optional> value = default;
- Optional nextLink = default;
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("value"))
- {
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- property.ThrowNonNullablePropertyIsNull();
- continue;
- }
- List array = new List();
- foreach (var item in property.Value.EnumerateArray())
- {
- array.Add(OperationsHealth.DeserializeOperationsHealth(item));
- }
- value = array;
- continue;
- }
- if (property.NameEquals("nextLink"))
- {
- nextLink = property.Value.GetString();
- continue;
- }
- }
- return new OperationsHealthListResult(Optional.ToList(value), nextLink.Value);
- }
- }
-}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealthListResult.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealthListResult.cs
deleted file mode 100644
index 5c2dd6138dcd..000000000000
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealthListResult.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System.Collections.Generic;
-using Azure.Core;
-
-namespace Azure.ResourceManager.Sql.Models
-{
- /// A list of service health statuses in a location.
- internal partial class OperationsHealthListResult
- {
- /// Initializes a new instance of OperationsHealthListResult.
- internal OperationsHealthListResult()
- {
- Value = new ChangeTrackingList();
- }
-
- /// Initializes a new instance of OperationsHealthListResult.
- /// Array of results.
- /// Link to retrieve next page of results.
- internal OperationsHealthListResult(IReadOnlyList value, string nextLink)
- {
- Value = value;
- NextLink = nextLink;
- }
-
- /// Array of results.
- public IReadOnlyList Value { get; }
- /// Link to retrieve next page of results.
- public string NextLink { get; }
- }
-}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RequestedBackupStorageRedundancy.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RequestedBackupStorageRedundancy.cs
deleted file mode 100644
index c607d93cbc8d..000000000000
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RequestedBackupStorageRedundancy.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.ComponentModel;
-
-namespace Azure.ResourceManager.Sql.Models
-{
- /// The storage redundancy type of the copied backup.
- public readonly partial struct RequestedBackupStorageRedundancy : IEquatable
- {
- private readonly string _value;
-
- /// Initializes a new instance of .
- /// is null.
- public RequestedBackupStorageRedundancy(string value)
- {
- _value = value ?? throw new ArgumentNullException(nameof(value));
- }
-
- private const string GeoValue = "Geo";
- private const string LocalValue = "Local";
- private const string ZoneValue = "Zone";
-
- /// Geo.
- public static RequestedBackupStorageRedundancy Geo { get; } = new RequestedBackupStorageRedundancy(GeoValue);
- /// Local.
- public static RequestedBackupStorageRedundancy Local { get; } = new RequestedBackupStorageRedundancy(LocalValue);
- /// Zone.
- public static RequestedBackupStorageRedundancy Zone { get; } = new RequestedBackupStorageRedundancy(ZoneValue);
- /// Determines if two values are the same.
- public static bool operator ==(RequestedBackupStorageRedundancy left, RequestedBackupStorageRedundancy right) => left.Equals(right);
- /// Determines if two values are not the same.
- public static bool operator !=(RequestedBackupStorageRedundancy left, RequestedBackupStorageRedundancy right) => !left.Equals(right);
- /// Converts a string to a .
- public static implicit operator RequestedBackupStorageRedundancy(string value) => new RequestedBackupStorageRedundancy(value);
-
- ///
- [EditorBrowsable(EditorBrowsableState.Never)]
- public override bool Equals(object obj) => obj is RequestedBackupStorageRedundancy other && Equals(other);
- ///
- public bool Equals(RequestedBackupStorageRedundancy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
-
- ///
- [EditorBrowsable(EditorBrowsableState.Never)]
- public override int GetHashCode() => _value?.GetHashCode() ?? 0;
- ///
- public override string ToString() => _value;
- }
-}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RestorableDroppedDatabaseData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RestorableDroppedDatabaseData.Serialization.cs
index 76a43805fec9..5ee977f98e7c 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RestorableDroppedDatabaseData.Serialization.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RestorableDroppedDatabaseData.Serialization.cs
@@ -56,11 +56,10 @@ internal static RestorableDroppedDatabaseData DeserializeRestorableDroppedDataba
ResourceType type = default;
Optional databaseName = default;
Optional maxSizeBytes = default;
- Optional elasticPoolId = default;
Optional creationDate = default;
Optional deletionDate = default;
Optional