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 5fff58a9c747..2456d529431e 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ArmClientExtensions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ArmClientExtensions.cs
@@ -749,70 +749,6 @@ public static JobVersion GetJobVersion(this ArmClient client, ResourceIdentifier
}
#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 client, ResourceIdentifier id)
- {
- return client.GetClient(() =>
- {
- SubscriptionLongTermRetentionBackup.ValidateResourceId(id);
- return new SubscriptionLongTermRetentionBackup(client, 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 client, ResourceIdentifier id)
- {
- return client.GetClient(() =>
- {
- ResourceGroupLongTermRetentionBackup.ValidateResourceId(id);
- return new ResourceGroupLongTermRetentionBackup(client, 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 client, ResourceIdentifier id)
- {
- return client.GetClient(() =>
- {
- SubscriptionLongTermRetentionManagedInstanceBackup.ValidateResourceId(id);
- return new SubscriptionLongTermRetentionManagedInstanceBackup(client, 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 client, ResourceIdentifier id)
- {
- return client.GetClient(() =>
- {
- ResourceGroupLongTermRetentionManagedInstanceBackup.ValidateResourceId(id);
- return new ResourceGroupLongTermRetentionManagedInstanceBackup(client, 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.
@@ -1117,22 +1053,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 client, ResourceIdentifier id)
- {
- return client.GetClient(() =>
- {
- ManagedInstance.ValidateResourceId(id);
- return new ManagedInstance(client, 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.
@@ -1597,6 +1517,102 @@ public static OutboundFirewallRule GetOutboundFirewallRule(this ArmClient client
}
#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 client, ResourceIdentifier id)
+ {
+ return client.GetClient(() =>
+ {
+ SqlServer.ValidateResourceId(id);
+ return new SqlServer(client, 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 client, ResourceIdentifier id)
+ {
+ return client.GetClient(() =>
+ {
+ SubscriptionLongTermRetentionBackup.ValidateResourceId(id);
+ return new SubscriptionLongTermRetentionBackup(client, 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 client, ResourceIdentifier id)
+ {
+ return client.GetClient(() =>
+ {
+ ResourceGroupLongTermRetentionBackup.ValidateResourceId(id);
+ return new ResourceGroupLongTermRetentionBackup(client, 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 client, ResourceIdentifier id)
+ {
+ return client.GetClient(() =>
+ {
+ SubscriptionLongTermRetentionManagedInstanceBackup.ValidateResourceId(id);
+ return new SubscriptionLongTermRetentionManagedInstanceBackup(client, 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 client, ResourceIdentifier id)
+ {
+ return client.GetClient(() =>
+ {
+ ResourceGroupLongTermRetentionManagedInstanceBackup.ValidateResourceId(id);
+ return new ResourceGroupLongTermRetentionManagedInstanceBackup(client, 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 client, ResourceIdentifier id)
+ {
+ return client.GetClient(() =>
+ {
+ ManagedInstance.ValidateResourceId(id);
+ return new ManagedInstance(client, 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.
@@ -1629,22 +1645,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 client, ResourceIdentifier id)
- {
- return client.GetClient(() =>
- {
- SqlServer.ValidateResourceId(id);
- return new SqlServer(client, 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/ResourceGroupExtensionClient.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupExtensionClient.cs
index 6be081c4ed10..b88ea6a90a0a 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupExtensionClient.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupExtensionClient.cs
@@ -64,6 +64,28 @@ public virtual InstancePoolCollection GetInstancePools()
return new InstancePoolCollection(Client, Id);
}
+ /// Gets a collection of ServerTrustGroups in the ServerTrustGroup.
+ /// The name of the region where the resource is located.
+ /// An object representing collection of ServerTrustGroups and their operations over a ServerTrustGroup.
+ public virtual ServerTrustGroupCollection GetServerTrustGroups(string locationName)
+ {
+ return new ServerTrustGroupCollection(Client, Id, locationName);
+ }
+
+ /// Gets a collection of VirtualClusters in the VirtualCluster.
+ /// An object representing collection of VirtualClusters and their operations over a VirtualCluster.
+ public virtual VirtualClusterCollection GetVirtualClusters()
+ {
+ return new VirtualClusterCollection(Client, Id);
+ }
+
+ /// Gets a collection of SqlServers in the SqlServer.
+ /// An object representing collection of SqlServers and their operations over a SqlServer.
+ public virtual SqlServerCollection GetSqlServers()
+ {
+ return new SqlServerCollection(Client, Id);
+ }
+
/// Gets a collection of ResourceGroupLongTermRetentionBackups in the ResourceGroupLongTermRetentionBackup.
/// The location of the database.
/// The name of the server.
@@ -91,28 +113,6 @@ public virtual ManagedInstanceCollection GetManagedInstances()
return new ManagedInstanceCollection(Client, Id);
}
- /// Gets a collection of ServerTrustGroups in the ServerTrustGroup.
- /// The name of the region where the resource is located.
- /// An object representing collection of ServerTrustGroups and their operations over a ServerTrustGroup.
- public virtual ServerTrustGroupCollection GetServerTrustGroups(string locationName)
- {
- return new ServerTrustGroupCollection(Client, Id, locationName);
- }
-
- /// Gets a collection of VirtualClusters in the VirtualCluster.
- /// An object representing collection of VirtualClusters and their operations over a VirtualCluster.
- public virtual VirtualClusterCollection GetVirtualClusters()
- {
- return new VirtualClusterCollection(Client, Id);
- }
-
- /// Gets a collection of SqlServers in the SqlServer.
- /// An object representing collection of SqlServers and their operations over a SqlServer.
- public virtual SqlServerCollection GetSqlServers()
- {
- return new SqlServerCollection(Client, Id);
- }
-
///
/// Lists the long term retention backups for a given location.
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
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 d56848cfc879..94914c6b4578 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupExtensions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupExtensions.cs
@@ -47,6 +47,35 @@ public static InstancePoolCollection GetInstancePools(this ResourceGroup resourc
return GetExtensionClient(resourceGroup).GetInstancePools();
}
+ /// Gets a collection of ServerTrustGroups in the ServerTrustGroup.
+ /// The instance the method will execute against.
+ /// The name of the region where the resource is located.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// An object representing collection of ServerTrustGroups and their operations over a ServerTrustGroup.
+ public static ServerTrustGroupCollection GetServerTrustGroups(this ResourceGroup resourceGroup, string locationName)
+ {
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(resourceGroup).GetServerTrustGroups(locationName);
+ }
+
+ /// Gets a collection of VirtualClusters in the VirtualCluster.
+ /// The instance the method will execute against.
+ /// An object representing collection of VirtualClusters and their operations over a VirtualCluster.
+ public static VirtualClusterCollection GetVirtualClusters(this ResourceGroup resourceGroup)
+ {
+ return GetExtensionClient(resourceGroup).GetVirtualClusters();
+ }
+
+ /// Gets a collection of SqlServers in the SqlServer.
+ /// The instance the method will execute against.
+ /// An object representing collection of SqlServers and their operations over a SqlServer.
+ public static SqlServerCollection GetSqlServers(this ResourceGroup resourceGroup)
+ {
+ return GetExtensionClient(resourceGroup).GetSqlServers();
+ }
+
/// Gets a collection of ResourceGroupLongTermRetentionBackups in the ResourceGroupLongTermRetentionBackup.
/// The instance the method will execute against.
/// The location of the database.
@@ -89,35 +118,6 @@ public static ManagedInstanceCollection GetManagedInstances(this ResourceGroup r
return GetExtensionClient(resourceGroup).GetManagedInstances();
}
- /// Gets a collection of ServerTrustGroups in the ServerTrustGroup.
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// An object representing collection of ServerTrustGroups and their operations over a ServerTrustGroup.
- public static ServerTrustGroupCollection GetServerTrustGroups(this ResourceGroup resourceGroup, string locationName)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(resourceGroup).GetServerTrustGroups(locationName);
- }
-
- /// Gets a collection of VirtualClusters in the VirtualCluster.
- /// The instance the method will execute against.
- /// An object representing collection of VirtualClusters and their operations over a VirtualCluster.
- public static VirtualClusterCollection GetVirtualClusters(this ResourceGroup resourceGroup)
- {
- return GetExtensionClient(resourceGroup).GetVirtualClusters();
- }
-
- /// Gets a collection of SqlServers in the SqlServer.
- /// The instance the method will execute against.
- /// An object representing collection of SqlServers and their operations over a SqlServer.
- public static SqlServerCollection GetSqlServers(this ResourceGroup resourceGroup)
- {
- return GetExtensionClient(resourceGroup).GetSqlServers();
- }
-
///
/// Lists the long term retention backups for a given location.
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensionClient.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensionClient.cs
index 98efcf9cc7ab..684bdead50ba 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensionClient.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensionClient.cs
@@ -28,20 +28,18 @@ internal partial class SubscriptionExtensionClient : ArmResource
private InstancePoolsRestOperations _instancePoolRestClient;
private ClientDiagnostics _capabilitiesClientDiagnostics;
private CapabilitiesRestOperations _capabilitiesRestClient;
- private ClientDiagnostics _longTermRetentionBackupsClientDiagnostics;
- private LongTermRetentionBackupsRestOperations _longTermRetentionBackupsRestClient;
- private ClientDiagnostics _longTermRetentionManagedInstanceBackupsClientDiagnostics;
- private LongTermRetentionManagedInstanceBackupsRestOperations _longTermRetentionManagedInstanceBackupsRestClient;
- private ClientDiagnostics _managedInstanceClientDiagnostics;
- private ManagedInstancesRestOperations _managedInstanceRestClient;
- private ClientDiagnostics _operationsHealthClientDiagnostics;
- private OperationsHealthRestOperations _operationsHealthRestClient;
private ClientDiagnostics _syncGroupClientDiagnostics;
private SyncGroupsRestOperations _syncGroupRestClient;
private ClientDiagnostics _virtualClusterClientDiagnostics;
private VirtualClustersRestOperations _virtualClusterRestClient;
private ClientDiagnostics _sqlServerServersClientDiagnostics;
private ServersRestOperations _sqlServerServersRestClient;
+ private ClientDiagnostics _longTermRetentionBackupsClientDiagnostics;
+ private LongTermRetentionBackupsRestOperations _longTermRetentionBackupsRestClient;
+ private ClientDiagnostics _longTermRetentionManagedInstanceBackupsClientDiagnostics;
+ private LongTermRetentionManagedInstanceBackupsRestOperations _longTermRetentionManagedInstanceBackupsRestClient;
+ private ClientDiagnostics _managedInstanceClientDiagnostics;
+ private ManagedInstancesRestOperations _managedInstanceRestClient;
/// Initializes a new instance of the class for mocking.
protected SubscriptionExtensionClient()
@@ -61,20 +59,18 @@ internal SubscriptionExtensionClient(ArmClient client, ResourceIdentifier id) :
private InstancePoolsRestOperations InstancePoolRestClient => _instancePoolRestClient ??= new InstancePoolsRestOperations(InstancePoolClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(InstancePool.ResourceType));
private ClientDiagnostics CapabilitiesClientDiagnostics => _capabilitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, DiagnosticOptions);
private CapabilitiesRestOperations CapabilitiesRestClient => _capabilitiesRestClient ??= new CapabilitiesRestOperations(CapabilitiesClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri);
- private ClientDiagnostics LongTermRetentionBackupsClientDiagnostics => _longTermRetentionBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, DiagnosticOptions);
- private LongTermRetentionBackupsRestOperations LongTermRetentionBackupsRestClient => _longTermRetentionBackupsRestClient ??= new LongTermRetentionBackupsRestOperations(LongTermRetentionBackupsClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri);
- private ClientDiagnostics LongTermRetentionManagedInstanceBackupsClientDiagnostics => _longTermRetentionManagedInstanceBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, DiagnosticOptions);
- private LongTermRetentionManagedInstanceBackupsRestOperations LongTermRetentionManagedInstanceBackupsRestClient => _longTermRetentionManagedInstanceBackupsRestClient ??= new LongTermRetentionManagedInstanceBackupsRestOperations(LongTermRetentionManagedInstanceBackupsClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri);
- private ClientDiagnostics ManagedInstanceClientDiagnostics => _managedInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstance.ResourceType.Namespace, DiagnosticOptions);
- private ManagedInstancesRestOperations ManagedInstanceRestClient => _managedInstanceRestClient ??= new ManagedInstancesRestOperations(ManagedInstanceClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(ManagedInstance.ResourceType));
- private ClientDiagnostics OperationsHealthClientDiagnostics => _operationsHealthClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, DiagnosticOptions);
- private OperationsHealthRestOperations OperationsHealthRestClient => _operationsHealthRestClient ??= new OperationsHealthRestOperations(OperationsHealthClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri);
private ClientDiagnostics SyncGroupClientDiagnostics => _syncGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", SyncGroup.ResourceType.Namespace, DiagnosticOptions);
private SyncGroupsRestOperations SyncGroupRestClient => _syncGroupRestClient ??= new SyncGroupsRestOperations(SyncGroupClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(SyncGroup.ResourceType));
private ClientDiagnostics VirtualClusterClientDiagnostics => _virtualClusterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", VirtualCluster.ResourceType.Namespace, DiagnosticOptions);
private VirtualClustersRestOperations VirtualClusterRestClient => _virtualClusterRestClient ??= new VirtualClustersRestOperations(VirtualClusterClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(VirtualCluster.ResourceType));
private ClientDiagnostics SqlServerServersClientDiagnostics => _sqlServerServersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", SqlServer.ResourceType.Namespace, DiagnosticOptions);
private ServersRestOperations SqlServerServersRestClient => _sqlServerServersRestClient ??= new ServersRestOperations(SqlServerServersClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(SqlServer.ResourceType));
+ private ClientDiagnostics LongTermRetentionBackupsClientDiagnostics => _longTermRetentionBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, DiagnosticOptions);
+ private LongTermRetentionBackupsRestOperations LongTermRetentionBackupsRestClient => _longTermRetentionBackupsRestClient ??= new LongTermRetentionBackupsRestOperations(LongTermRetentionBackupsClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri);
+ private ClientDiagnostics LongTermRetentionManagedInstanceBackupsClientDiagnostics => _longTermRetentionManagedInstanceBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, DiagnosticOptions);
+ private LongTermRetentionManagedInstanceBackupsRestOperations LongTermRetentionManagedInstanceBackupsRestClient => _longTermRetentionManagedInstanceBackupsRestClient ??= new LongTermRetentionManagedInstanceBackupsRestOperations(LongTermRetentionManagedInstanceBackupsClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri);
+ private ClientDiagnostics ManagedInstanceClientDiagnostics => _managedInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstance.ResourceType.Namespace, DiagnosticOptions);
+ private ManagedInstancesRestOperations ManagedInstanceRestClient => _managedInstanceRestClient ??= new ManagedInstancesRestOperations(ManagedInstanceClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(ManagedInstance.ResourceType));
private string GetApiVersionOrNull(ResourceType resourceType)
{
@@ -90,6 +86,22 @@ public virtual DeletedServerCollection GetDeletedServers(string locationName)
return new DeletedServerCollection(Client, Id, locationName);
}
+ /// Gets a collection of SubscriptionUsages in the SubscriptionUsage.
+ /// The name of the region where the resource is located.
+ /// An object representing collection of SubscriptionUsages and their operations over a SubscriptionUsage.
+ public virtual SubscriptionUsageCollection GetSubscriptionUsages(string locationName)
+ {
+ return new SubscriptionUsageCollection(Client, Id, locationName);
+ }
+
+ /// Gets a collection of SqlTimeZones in the SqlTimeZone.
+ /// The String to use.
+ /// An object representing collection of SqlTimeZones and their operations over a SqlTimeZone.
+ public virtual SqlTimeZoneCollection GetSqlTimeZones(string locationName)
+ {
+ return new SqlTimeZoneCollection(Client, Id, locationName);
+ }
+
/// Gets a collection of SubscriptionLongTermRetentionBackups in the SubscriptionLongTermRetentionBackup.
/// The location of the database.
/// The name of the server.
@@ -110,22 +122,6 @@ public virtual SubscriptionLongTermRetentionManagedInstanceBackupCollection GetS
return new SubscriptionLongTermRetentionManagedInstanceBackupCollection(Client, Id, locationName, managedInstanceName, databaseName);
}
- /// Gets a collection of SubscriptionUsages in the SubscriptionUsage.
- /// The name of the region where the resource is located.
- /// An object representing collection of SubscriptionUsages and their operations over a SubscriptionUsage.
- public virtual SubscriptionUsageCollection GetSubscriptionUsages(string locationName)
- {
- return new SubscriptionUsageCollection(Client, Id, locationName);
- }
-
- /// Gets a collection of SqlTimeZones in the SqlTimeZone.
- /// The String to use.
- /// An object representing collection of SqlTimeZones and their operations over a SqlTimeZone.
- public virtual SqlTimeZoneCollection GetSqlTimeZones(string locationName)
- {
- return new SqlTimeZoneCollection(Client, Id, locationName);
- }
-
///
/// Gets a list of all deleted servers in a subscription.
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers
@@ -343,25 +339,23 @@ public virtual Response GetByLocationCapability(string loc
}
///
- /// Lists the long term retention backups for a given location.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
- /// Operation Id: LongTermRetentionBackups_ListByLocation
+ /// Gets a collection of sync database ids.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
+ /// Operation Id: SyncGroups_ListSyncDatabaseIds
///
- /// 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.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetLongTermRetentionBackupsByLocationAsync(string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetSyncDatabaseIdsSyncGroupsAsync(string locationName, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByLocation");
+ using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSyncDatabaseIdsSyncGroups");
scope.Start();
try
{
- var response = await LongTermRetentionBackupsRestClient.ListByLocationAsync(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await SyncGroupRestClient.ListSyncDatabaseIdsAsync(Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -369,14 +363,14 @@ async Task> FirstPageFunc(int? pageSiz
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByLocation");
+ using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSyncDatabaseIdsSyncGroups");
scope.Start();
try
{
- var response = await LongTermRetentionBackupsRestClient.ListByLocationNextPageAsync(nextLink, Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await SyncGroupRestClient.ListSyncDatabaseIdsNextPageAsync(nextLink, Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -388,25 +382,23 @@ async Task> NextPageFunc(string nextLi
}
///
- /// Lists the long term retention backups for a given location.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
- /// Operation Id: LongTermRetentionBackups_ListByLocation
+ /// Gets a collection of sync database ids.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
+ /// Operation Id: SyncGroups_ListSyncDatabaseIds
///
- /// 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 that may take multiple service requests to iterate over.
- public virtual Pageable GetLongTermRetentionBackupsByLocation(string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetSyncDatabaseIdsSyncGroups(string locationName, CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByLocation");
+ using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSyncDatabaseIdsSyncGroups");
scope.Start();
try
{
- var response = LongTermRetentionBackupsRestClient.ListByLocation(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = SyncGroupRestClient.ListSyncDatabaseIds(Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -414,14 +406,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByLocation");
+ using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSyncDatabaseIdsSyncGroups");
scope.Start();
try
{
- var response = LongTermRetentionBackupsRestClient.ListByLocationNextPage(nextLink, Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = SyncGroupRestClient.ListSyncDatabaseIdsNextPage(nextLink, Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -433,26 +425,22 @@ Page NextPageFunc(string nextLink, int? pag
}
///
- /// Lists the long term retention backups for a given server.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
- /// Operation Id: LongTermRetentionBackups_ListByServer
+ /// Gets a list of all virtualClusters in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
+ /// Operation Id: VirtualClusters_List
///
- /// 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.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetLongTermRetentionBackupsByServerAsync(string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetVirtualClustersAsync(CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByServer");
+ using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetVirtualClusters");
scope.Start();
try
{
- var response = await LongTermRetentionBackupsRestClient.ListByServerAsync(Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await VirtualClusterRestClient.ListAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -460,14 +448,14 @@ async Task> FirstPageFunc(int? pageSiz
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByServer");
+ using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetVirtualClusters");
scope.Start();
try
{
- var response = await LongTermRetentionBackupsRestClient.ListByServerNextPageAsync(nextLink, Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await VirtualClusterRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -479,26 +467,22 @@ async Task> NextPageFunc(string nextLi
}
///
- /// Lists the long term retention backups for a given server.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
- /// Operation Id: LongTermRetentionBackups_ListByServer
+ /// Gets a list of all virtualClusters in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
+ /// Operation Id: VirtualClusters_List
///
- /// 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 that may take multiple service requests to iterate over.
- public virtual Pageable GetLongTermRetentionBackupsByServer(string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetVirtualClusters(CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByServer");
+ using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetVirtualClusters");
scope.Start();
try
{
- var response = LongTermRetentionBackupsRestClient.ListByServer(Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = VirtualClusterRestClient.List(Id.SubscriptionId, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -506,14 +490,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByServer");
+ using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetVirtualClusters");
scope.Start();
try
{
- var response = LongTermRetentionBackupsRestClient.ListByServerNextPage(nextLink, Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = VirtualClusterRestClient.ListNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -525,26 +509,23 @@ Page NextPageFunc(string nextLink, int? pag
}
///
- /// Lists the long term retention backups for a given managed instance.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups
- /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByInstance
+ /// Gets a list of all servers in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
+ /// Operation Id: Servers_List
///
- /// 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.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetLongTermRetentionManagedInstanceBackupsByInstanceAsync(string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetSqlServersAsync(string expand = null, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSqlServers");
scope.Start();
try
{
- var response = await LongTermRetentionManagedInstanceBackupsRestClient.ListByInstanceAsync(Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await SqlServerServersRestClient.ListAsync(Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SqlServer(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -552,14 +533,14 @@ async Task> FirstPageFu
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSqlServers");
scope.Start();
try
{
- var response = await LongTermRetentionManagedInstanceBackupsRestClient.ListByInstanceNextPageAsync(nextLink, Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await SqlServerServersRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SqlServer(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -571,26 +552,23 @@ async Task> NextPageFun
}
///
- /// Lists the long term retention backups for a given managed instance.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups
- /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByInstance
+ /// Gets a list of all servers in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
+ /// Operation Id: Servers_List
///
- /// 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 that may take multiple service requests to iterate over.
- public virtual Pageable GetLongTermRetentionManagedInstanceBackupsByInstance(string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetSqlServers(string expand = null, CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSqlServers");
scope.Start();
try
{
- var response = LongTermRetentionManagedInstanceBackupsRestClient.ListByInstance(Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = SqlServerServersRestClient.List(Id.SubscriptionId, expand, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SqlServer(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -598,14 +576,14 @@ Page FirstPageFunc(int? page
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSqlServers");
scope.Start();
try
{
- var response = LongTermRetentionManagedInstanceBackupsRestClient.ListByInstanceNextPage(nextLink, Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = SqlServerServersRestClient.ListNextPage(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SqlServer(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -617,113 +595,71 @@ Page NextPageFunc(string nex
}
///
- /// Lists the long term retention backups for managed databases in a given location.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups
- /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByLocation
+ /// Determines whether a resource can be created with the specified name.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
+ /// Operation Id: Servers_CheckNameAvailability
///
- /// 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.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetLongTermRetentionManagedInstanceBackupsByLocationAsync(string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ public async virtual Task> CheckNameAvailabilityServerAsync(CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.CheckNameAvailabilityServer");
+ scope.Start();
+ try
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
- scope.Start();
- try
- {
- var response = await LongTermRetentionManagedInstanceBackupsRestClient.ListByLocationAsync(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ var response = await SqlServerServersRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, parameters, cancellationToken).ConfigureAwait(false);
+ return response;
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ catch (Exception e)
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
- scope.Start();
- try
- {
- var response = await LongTermRetentionManagedInstanceBackupsRestClient.ListByLocationNextPageAsync(nextLink, Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ scope.Failed(e);
+ throw;
}
- return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
}
///
- /// Lists the long term retention backups for managed databases in a given location.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups
- /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByLocation
+ /// Determines whether a resource can be created with the specified name.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
+ /// Operation Id: Servers_CheckNameAvailability
///
- /// 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 that may take multiple service requests to iterate over.
- public virtual Pageable GetLongTermRetentionManagedInstanceBackupsByLocation(string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ public virtual Response CheckNameAvailabilityServer(CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.CheckNameAvailabilityServer");
+ scope.Start();
+ try
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
- scope.Start();
- try
- {
- var response = LongTermRetentionManagedInstanceBackupsRestClient.ListByLocation(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ var response = SqlServerServersRestClient.CheckNameAvailability(Id.SubscriptionId, parameters, cancellationToken);
+ return response;
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ catch (Exception e)
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
- scope.Start();
- try
- {
- var response = LongTermRetentionManagedInstanceBackupsRestClient.ListByLocationNextPage(nextLink, Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ scope.Failed(e);
+ throw;
}
- return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
}
///
- /// Gets a list of all managed instances in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances
- /// Operation Id: ManagedInstances_List
+ /// Lists the long term retention backups for a given location.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
+ /// Operation Id: LongTermRetentionBackups_ListByLocation
///
- /// 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.
- /// 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 GetLongTermRetentionBackupsByLocationAsync(string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedInstances");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = await ManagedInstanceRestClient.ListAsync(Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await LongTermRetentionBackupsRestClient.ListByLocationAsync(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -731,14 +667,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedInstances");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = await ManagedInstanceRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await LongTermRetentionBackupsRestClient.ListByLocationNextPageAsync(nextLink, Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -750,23 +686,25 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHin
}
///
- /// Gets a list of all managed instances in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances
- /// Operation Id: ManagedInstances_List
+ /// Lists the long term retention backups for a given location.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
+ /// Operation Id: LongTermRetentionBackups_ListByLocation
///
- /// 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 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 GetLongTermRetentionBackupsByLocation(string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedInstances");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = ManagedInstanceRestClient.List(Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = LongTermRetentionBackupsRestClient.ListByLocation(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -774,14 +712,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedInstances");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = ManagedInstanceRestClient.ListNextPage(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = LongTermRetentionBackupsRestClient.ListByLocationNextPage(nextLink, Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -793,23 +731,26 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
}
///
- /// Gets a service operation health status.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/operationsHealth
- /// Operation Id: OperationsHealth_ListByLocation
+ /// Lists the long term retention backups for a given server.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
+ /// Operation Id: LongTermRetentionBackups_ListByServer
///
- /// 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.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetOperationsHealthsByLocationAsync(string locationName, CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetLongTermRetentionBackupsByServerAsync(string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = OperationsHealthClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetOperationsHealthsByLocation");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByServer");
scope.Start();
try
{
- var response = await OperationsHealthRestClient.ListByLocationAsync(Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = await LongTermRetentionBackupsRestClient.ListByServerAsync(Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -817,14 +758,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = OperationsHealthClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetOperationsHealthsByLocation");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByServer");
scope.Start();
try
{
- var response = await OperationsHealthRestClient.ListByLocationNextPageAsync(nextLink, Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = await LongTermRetentionBackupsRestClient.ListByServerNextPageAsync(nextLink, Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -836,23 +777,26 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHi
}
///
- /// Gets a service operation health status.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/operationsHealth
- /// Operation Id: OperationsHealth_ListByLocation
+ /// Lists the long term retention backups for a given server.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
+ /// Operation Id: LongTermRetentionBackups_ListByServer
///
- /// 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 that may take multiple service requests to iterate over.
- public virtual Pageable GetOperationsHealthsByLocation(string locationName, CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetLongTermRetentionBackupsByServer(string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = OperationsHealthClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetOperationsHealthsByLocation");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByServer");
scope.Start();
try
{
- var response = OperationsHealthRestClient.ListByLocation(Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = LongTermRetentionBackupsRestClient.ListByServer(Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -860,14 +804,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = OperationsHealthClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetOperationsHealthsByLocation");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionBackupsByServer");
scope.Start();
try
{
- var response = OperationsHealthRestClient.ListByLocationNextPage(nextLink, Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = LongTermRetentionBackupsRestClient.ListByServerNextPage(nextLink, Id.SubscriptionId, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -879,23 +823,26 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
}
///
- /// Gets a collection of sync database ids.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
- /// Operation Id: SyncGroups_ListSyncDatabaseIds
+ /// Lists the long term retention backups for a given managed instance.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups
+ /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByInstance
///
- /// 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.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetSyncDatabaseIdsSyncGroupsAsync(string locationName, CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetLongTermRetentionManagedInstanceBackupsByInstanceAsync(string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSyncDatabaseIdsSyncGroups");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
scope.Start();
try
{
- var response = await SyncGroupRestClient.ListSyncDatabaseIdsAsync(Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = await LongTermRetentionManagedInstanceBackupsRestClient.ListByInstanceAsync(Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -903,14 +850,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSyncDatabaseIdsSyncGroups");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
scope.Start();
try
{
- var response = await SyncGroupRestClient.ListSyncDatabaseIdsNextPageAsync(nextLink, Id.SubscriptionId, locationName, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = await LongTermRetentionManagedInstanceBackupsRestClient.ListByInstanceNextPageAsync(nextLink, Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -922,23 +869,26 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
}
///
- /// Gets a collection of sync database ids.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
- /// Operation Id: SyncGroups_ListSyncDatabaseIds
+ /// Lists the long term retention backups for a given managed instance.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups
+ /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByInstance
///
- /// 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 that may take multiple service requests to iterate over.
- public virtual Pageable GetSyncDatabaseIdsSyncGroups(string locationName, CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetLongTermRetentionManagedInstanceBackupsByInstance(string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSyncDatabaseIdsSyncGroups");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
scope.Start();
try
{
- var response = SyncGroupRestClient.ListSyncDatabaseIds(Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = LongTermRetentionManagedInstanceBackupsRestClient.ListByInstance(Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -946,14 +896,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSyncDatabaseIdsSyncGroups");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
scope.Start();
try
{
- var response = SyncGroupRestClient.ListSyncDatabaseIdsNextPage(nextLink, Id.SubscriptionId, locationName, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = LongTermRetentionManagedInstanceBackupsRestClient.ListByInstanceNextPage(nextLink, Id.SubscriptionId, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -965,22 +915,25 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
}
///
- /// Gets a list of all virtualClusters in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
- /// Operation Id: VirtualClusters_List
+ /// Lists the long term retention backups for managed databases in a given location.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups
+ /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByLocation
///
+ /// 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.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetVirtualClustersAsync(CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetLongTermRetentionManagedInstanceBackupsByLocationAsync(string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ async Task> FirstPageFunc(int? pageSizeHint)
{
- using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetVirtualClusters");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = await VirtualClusterRestClient.ListAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await LongTermRetentionManagedInstanceBackupsRestClient.ListByLocationAsync(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -988,14 +941,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetVirtualClusters");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = await VirtualClusterRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await LongTermRetentionManagedInstanceBackupsRestClient.ListByLocationNextPageAsync(nextLink, Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1007,22 +960,25 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint
}
///
- /// Gets a list of all virtualClusters in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
- /// Operation Id: VirtualClusters_List
+ /// Lists the long term retention backups for managed databases in a given location.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups
+ /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByLocation
///
+ /// 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 that may take multiple service requests to iterate over.
- public virtual Pageable GetVirtualClusters(CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetLongTermRetentionManagedInstanceBackupsByLocation(string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- Page FirstPageFunc(int? pageSizeHint)
+ Page FirstPageFunc(int? pageSizeHint)
{
- using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetVirtualClusters");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = VirtualClusterRestClient.List(Id.SubscriptionId, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = LongTermRetentionManagedInstanceBackupsRestClient.ListByLocation(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1030,14 +986,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetVirtualClusters");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = VirtualClusterRestClient.ListNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualCluster(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = LongTermRetentionManagedInstanceBackupsRestClient.ListByLocationNextPage(nextLink, Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackup(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1049,23 +1005,23 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
}
///
- /// Gets a list of all servers in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
- /// Operation Id: Servers_List
+ /// Gets a list of all managed instances in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances
+ /// Operation Id: ManagedInstances_List
///
/// 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 GetSqlServersAsync(string expand = 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 = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSqlServers");
+ using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedInstances");
scope.Start();
try
{
- var response = await SqlServerServersRestClient.ListAsync(Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServer(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await ManagedInstanceRestClient.ListAsync(Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1073,14 +1029,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSqlServers");
+ using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedInstances");
scope.Start();
try
{
- var response = await SqlServerServersRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServer(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = await ManagedInstanceRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1092,23 +1048,23 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
}
///
- /// Gets a list of all servers in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
- /// Operation Id: Servers_List
+ /// Gets a list of all managed instances in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances
+ /// Operation Id: ManagedInstances_List
///
/// 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 GetSqlServers(string expand = 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 = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSqlServers");
+ using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedInstances");
scope.Start();
try
{
- var response = SqlServerServersRestClient.List(Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServer(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = ManagedInstanceRestClient.List(Id.SubscriptionId, expand, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1116,14 +1072,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetSqlServers");
+ using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedInstances");
scope.Start();
try
{
- var response = SqlServerServersRestClient.ListNextPage(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServer(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = ManagedInstanceRestClient.ListNextPage(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1133,51 +1089,5 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
}
return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
}
-
- ///
- /// Determines whether a resource can be created with the specified name.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
- /// Operation Id: Servers_CheckNameAvailability
- ///
- /// The name availability request parameters.
- /// The cancellation token to use.
- public async virtual Task> CheckNameAvailabilityServerAsync(CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
- {
- using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.CheckNameAvailabilityServer");
- scope.Start();
- try
- {
- var response = await SqlServerServersRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, parameters, cancellationToken).ConfigureAwait(false);
- return response;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- ///
- /// Determines whether a resource can be created with the specified name.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
- /// Operation Id: Servers_CheckNameAvailability
- ///
- /// The name availability request parameters.
- /// The cancellation token to use.
- public virtual Response CheckNameAvailabilityServer(CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
- {
- using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionExtensionClient.CheckNameAvailabilityServer");
- scope.Start();
- try
- {
- var response = SqlServerServersRestClient.CheckNameAvailability(Id.SubscriptionId, parameters, cancellationToken);
- return response;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
}
}
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 a76e748e14e0..2d9c1e82e1b3 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionExtensions.cs
@@ -41,6 +41,32 @@ public static DeletedServerCollection GetDeletedServers(this Subscription subscr
return GetExtensionClient(subscription).GetDeletedServers(locationName);
}
+ /// Gets a collection of SubscriptionUsages in the SubscriptionUsage.
+ /// The instance the method will execute against.
+ /// The name of the region where the resource is located.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// An object representing collection of SubscriptionUsages and their operations over a SubscriptionUsage.
+ public static SubscriptionUsageCollection GetSubscriptionUsages(this Subscription subscription, string locationName)
+ {
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscription).GetSubscriptionUsages(locationName);
+ }
+
+ /// Gets a collection of SqlTimeZones in the SqlTimeZone.
+ /// The instance the method will execute against.
+ /// The String to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// An object representing collection of SqlTimeZones and their operations over a SqlTimeZone.
+ public static SqlTimeZoneCollection GetSqlTimeZones(this Subscription subscription, string locationName)
+ {
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscription).GetSqlTimeZones(locationName);
+ }
+
/// Gets a collection of SubscriptionLongTermRetentionBackups in the SubscriptionLongTermRetentionBackup.
/// The instance the method will execute against.
/// The location of the database.
@@ -75,32 +101,6 @@ public static SubscriptionLongTermRetentionManagedInstanceBackupCollection GetSu
return GetExtensionClient(subscription).GetSubscriptionLongTermRetentionManagedInstanceBackups(locationName, managedInstanceName, databaseName);
}
- /// Gets a collection of SubscriptionUsages in the SubscriptionUsage.
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// An object representing collection of SubscriptionUsages and their operations over a SubscriptionUsage.
- public static SubscriptionUsageCollection GetSubscriptionUsages(this Subscription subscription, string locationName)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscription).GetSubscriptionUsages(locationName);
- }
-
- /// Gets a collection of SqlTimeZones in the SqlTimeZone.
- /// The instance the method will execute against.
- /// The String to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// An object representing collection of SqlTimeZones and their operations over a SqlTimeZone.
- public static SqlTimeZoneCollection GetSqlTimeZones(this Subscription subscription, string locationName)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscription).GetSqlTimeZones(locationName);
- }
-
///
/// Gets a list of all deleted servers in a subscription.
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers
@@ -189,6 +189,128 @@ public static Response GetByLocationCapability(this Subscr
return GetExtensionClient(subscription).GetByLocationCapability(locationName, include, cancellationToken);
}
+ ///
+ /// Gets a collection of sync database ids.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
+ /// Operation Id: SyncGroups_ListSyncDatabaseIds
+ ///
+ /// The instance the method will execute against.
+ /// The name of the region where the resource is located.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetSyncDatabaseIdsSyncGroupsAsync(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscription).GetSyncDatabaseIdsSyncGroupsAsync(locationName, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of sync database ids.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
+ /// Operation Id: SyncGroups_ListSyncDatabaseIds
+ ///
+ /// The instance the method will execute against.
+ /// The name of the region where the resource is located.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetSyncDatabaseIdsSyncGroups(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscription).GetSyncDatabaseIdsSyncGroups(locationName, cancellationToken);
+ }
+
+ ///
+ /// Gets a list of all virtualClusters in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
+ /// Operation Id: VirtualClusters_List
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetVirtualClustersAsync(this Subscription subscription, CancellationToken cancellationToken = default)
+ {
+ return GetExtensionClient(subscription).GetVirtualClustersAsync(cancellationToken);
+ }
+
+ ///
+ /// Gets a list of all virtualClusters in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
+ /// Operation Id: VirtualClusters_List
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetVirtualClusters(this Subscription subscription, CancellationToken cancellationToken = default)
+ {
+ return GetExtensionClient(subscription).GetVirtualClusters(cancellationToken);
+ }
+
+ ///
+ /// Gets a list of all servers in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
+ /// Operation Id: Servers_List
+ ///
+ /// The instance the method will execute against.
+ /// 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 static AsyncPageable GetSqlServersAsync(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
+ {
+ return GetExtensionClient(subscription).GetSqlServersAsync(expand, cancellationToken);
+ }
+
+ ///
+ /// Gets a list of all servers in the subscription.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
+ /// Operation Id: Servers_List
+ ///
+ /// The instance the method will execute against.
+ /// 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 static Pageable GetSqlServers(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
+ {
+ return GetExtensionClient(subscription).GetSqlServers(expand, cancellationToken);
+ }
+
+ ///
+ /// Determines whether a resource can be created with the specified name.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
+ /// Operation Id: Servers_CheckNameAvailability
+ ///
+ /// The instance the method will execute against.
+ /// The name availability request parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public async static Task> CheckNameAvailabilityServerAsync(this Subscription subscription, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(parameters, nameof(parameters));
+
+ return await GetExtensionClient(subscription).CheckNameAvailabilityServerAsync(parameters, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Determines whether a resource can be created with the specified name.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
+ /// Operation Id: Servers_CheckNameAvailability
+ ///
+ /// 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)
+ {
+ Argument.AssertNotNull(parameters, nameof(parameters));
+
+ return GetExtensionClient(subscription).CheckNameAvailabilityServer(parameters, cancellationToken);
+ }
+
///
/// Lists the long term retention backups for a given location.
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
@@ -384,163 +506,5 @@ public static Pageable GetManagedInstances(this Subscription su
{
return GetExtensionClient(subscription).GetManagedInstances(expand, cancellationToken);
}
-
- ///
- /// Gets a service operation health status.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/operationsHealth
- /// Operation Id: OperationsHealth_ListByLocation
- ///
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetOperationsHealthsByLocationAsync(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscription).GetOperationsHealthsByLocationAsync(locationName, cancellationToken);
- }
-
- ///
- /// Gets a service operation health status.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/operationsHealth
- /// Operation Id: OperationsHealth_ListByLocation
- ///
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetOperationsHealthsByLocation(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscription).GetOperationsHealthsByLocation(locationName, cancellationToken);
- }
-
- ///
- /// Gets a collection of sync database ids.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
- /// Operation Id: SyncGroups_ListSyncDatabaseIds
- ///
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetSyncDatabaseIdsSyncGroupsAsync(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscription).GetSyncDatabaseIdsSyncGroupsAsync(locationName, cancellationToken);
- }
-
- ///
- /// Gets a collection of sync database ids.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
- /// Operation Id: SyncGroups_ListSyncDatabaseIds
- ///
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetSyncDatabaseIdsSyncGroups(this Subscription subscription, string locationName, CancellationToken cancellationToken = default)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscription).GetSyncDatabaseIdsSyncGroups(locationName, cancellationToken);
- }
-
- ///
- /// Gets a list of all virtualClusters in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
- /// Operation Id: VirtualClusters_List
- ///
- /// The instance the method will execute against.
- /// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetVirtualClustersAsync(this Subscription subscription, CancellationToken cancellationToken = default)
- {
- return GetExtensionClient(subscription).GetVirtualClustersAsync(cancellationToken);
- }
-
- ///
- /// Gets a list of all virtualClusters in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
- /// Operation Id: VirtualClusters_List
- ///
- /// The instance the method will execute against.
- /// The cancellation token to use.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetVirtualClusters(this Subscription subscription, CancellationToken cancellationToken = default)
- {
- return GetExtensionClient(subscription).GetVirtualClusters(cancellationToken);
- }
-
- ///
- /// Gets a list of all servers in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
- /// Operation Id: Servers_List
- ///
- /// The instance the method will execute against.
- /// 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 static AsyncPageable GetSqlServersAsync(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
- {
- return GetExtensionClient(subscription).GetSqlServersAsync(expand, cancellationToken);
- }
-
- ///
- /// Gets a list of all servers in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
- /// Operation Id: Servers_List
- ///
- /// The instance the method will execute against.
- /// 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 static Pageable GetSqlServers(this Subscription subscription, string expand = null, CancellationToken cancellationToken = default)
- {
- return GetExtensionClient(subscription).GetSqlServers(expand, cancellationToken);
- }
-
- ///
- /// Determines whether a resource can be created with the specified name.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
- /// Operation Id: Servers_CheckNameAvailability
- ///
- /// The instance the method will execute against.
- /// The name availability request parameters.
- /// The cancellation token to use.
- /// is null.
- public async static Task> CheckNameAvailabilityServerAsync(this Subscription subscription, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
- {
- Argument.AssertNotNull(parameters, nameof(parameters));
-
- return await GetExtensionClient(subscription).CheckNameAvailabilityServerAsync(parameters, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Determines whether a resource can be created with the specified name.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
- /// Operation Id: Servers_CheckNameAvailability
- ///
- /// 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)
- {
- Argument.AssertNotNull(parameters, nameof(parameters));
-
- return GetExtensionClient(subscription).CheckNameAvailabilityServer(parameters, cancellationToken);
- }
}
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePool.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePool.cs
index 9acc70c33c91..48d0b74eed6b 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePool.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePool.cs
@@ -32,10 +32,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId,
private readonly ClientDiagnostics _instancePoolClientDiagnostics;
private readonly InstancePoolsRestOperations _instancePoolRestClient;
- private readonly ClientDiagnostics _managedInstanceClientDiagnostics;
- private readonly ManagedInstancesRestOperations _managedInstanceRestClient;
private readonly ClientDiagnostics _usagesClientDiagnostics;
private readonly UsagesRestOperations _usagesRestClient;
+ private readonly ClientDiagnostics _managedInstanceClientDiagnostics;
+ private readonly ManagedInstancesRestOperations _managedInstanceRestClient;
private readonly InstancePoolData _data;
/// Initializes a new instance of the class for mocking.
@@ -60,11 +60,11 @@ internal InstancePool(ArmClient client, ResourceIdentifier id) : base(client, id
_instancePoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, DiagnosticOptions);
TryGetApiVersion(ResourceType, out string instancePoolApiVersion);
_instancePoolRestClient = new InstancePoolsRestOperations(_instancePoolClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, instancePoolApiVersion);
+ _usagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, DiagnosticOptions);
+ _usagesRestClient = new UsagesRestOperations(_usagesClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri);
_managedInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstance.ResourceType.Namespace, DiagnosticOptions);
TryGetApiVersion(ManagedInstance.ResourceType, out string managedInstanceApiVersion);
_managedInstanceRestClient = new ManagedInstancesRestOperations(_managedInstanceClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, managedInstanceApiVersion);
- _usagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, DiagnosticOptions);
- _usagesRestClient = new UsagesRestOperations(_usagesClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri);
#if DEBUG
ValidateResourceId(Id);
#endif
@@ -195,23 +195,23 @@ public virtual ArmOperation Delete(bool waitForCompletion, CancellationToken can
}
///
- /// Gets a list of all managed instances in an instance pool.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances
- /// Operation Id: ManagedInstances_ListByInstancePool
+ /// Gets all instance pool usage metrics
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages
+ /// Operation Id: Usages_ListByInstancePool
///
- /// The child resources to include in the response.
+ /// 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 = _managedInstanceClientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
+ using var scope = _usagesClientDiagnostics.CreateScope("InstancePool.GetUsages");
scope.Start();
try
{
- var response = await _managedInstanceRestClient.ListByInstancePoolAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ 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)
{
@@ -219,14 +219,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
+ using var scope = _usagesClientDiagnostics.CreateScope("InstancePool.GetUsages");
scope.Start();
try
{
- var response = await _managedInstanceRestClient.ListByInstancePoolNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ 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)
{
@@ -238,23 +238,23 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHin
}
///
- /// Gets a list of all managed instances in an instance pool.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances
- /// Operation Id: ManagedInstances_ListByInstancePool
+ /// Gets all instance pool usage metrics
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages
+ /// Operation Id: Usages_ListByInstancePool
///
- /// The child resources to include in the response.
+ /// 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 = _managedInstanceClientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
+ using var scope = _usagesClientDiagnostics.CreateScope("InstancePool.GetUsages");
scope.Start();
try
{
- var response = _managedInstanceRestClient.ListByInstancePool(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ 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)
{
@@ -262,14 +262,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
+ using var scope = _usagesClientDiagnostics.CreateScope("InstancePool.GetUsages");
scope.Start();
try
{
- var response = _managedInstanceRestClient.ListByInstancePoolNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ 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)
{
@@ -281,23 +281,23 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
}
///
- /// Gets all instance pool usage metrics
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages
- /// Operation Id: Usages_ListByInstancePool
+ /// Gets a list of all managed instances in an instance pool.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances
+ /// Operation Id: ManagedInstances_ListByInstancePool
///
- /// Optional request parameter to include managed instance usages within the 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 = _usagesClientDiagnostics.CreateScope("InstancePool.GetUsages");
+ using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
scope.Start();
try
{
- 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());
+ var response = await _managedInstanceRestClient.ListByInstancePoolAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -305,14 +305,14 @@ async Task> FirstPageFunc(int? pageSizeHint)
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _usagesClientDiagnostics.CreateScope("InstancePool.GetUsages");
+ using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
scope.Start();
try
{
- 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());
+ var response = await _managedInstanceRestClient.ListByInstancePoolNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -324,23 +324,23 @@ async Task> NextPageFunc(string nextLink, int? pageSizeH
}
///
- /// Gets all instance pool usage metrics
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages
- /// Operation Id: Usages_ListByInstancePool
+ /// Gets a list of all managed instances in an instance pool.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances
+ /// Operation Id: ManagedInstances_ListByInstancePool
///
- /// Optional request parameter to include managed instance usages within the 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 = _usagesClientDiagnostics.CreateScope("InstancePool.GetUsages");
+ using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
scope.Start();
try
{
- var response = _usagesRestClient.ListByInstancePool(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expandChildren, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ var response = _managedInstanceRestClient.ListByInstancePool(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -348,14 +348,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _usagesClientDiagnostics.CreateScope("InstancePool.GetUsages");
+ using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePool.GetManagedInstances");
scope.Start();
try
{
- 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());
+ var response = _managedInstanceRestClient.ListByInstancePoolNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstance(Client, 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 17ae01af37a7..3d5b8594d403 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstance.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstance.cs
@@ -436,6 +436,150 @@ Page NextPageFunc(string nextLink, int? pageSizeHint)
return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
}
+ ///
+ /// Creates a TDE certificate for a given server.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates
+ /// Operation Id: ManagedInstanceTdeCertificates_Create
+ ///
+ /// Waits for the completion of the long running operations.
+ /// The requested TDE certificate to be created or updated.
+ /// The cancellation token to use.
+ /// is null.
+ public async virtual Task CreateManagedInstanceTdeCertificateAsync(bool waitForCompletion, TdeCertificate parameters, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(parameters, nameof(parameters));
+
+ using var scope = _managedInstanceTdeCertificatesClientDiagnostics.CreateScope("ManagedInstance.CreateManagedInstanceTdeCertificate");
+ scope.Start();
+ try
+ {
+ var response = await _managedInstanceTdeCertificatesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken).ConfigureAwait(false);
+ var operation = new SqlArmOperation(_managedInstanceTdeCertificatesClientDiagnostics, Pipeline, _managedInstanceTdeCertificatesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters).Request, response, OperationFinalStateVia.Location);
+ if (waitForCompletion)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Creates a TDE certificate for a given server.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates
+ /// Operation Id: ManagedInstanceTdeCertificates_Create
+ ///
+ /// Waits for the completion of the long running operations.
+ /// The requested TDE certificate to be created or updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation CreateManagedInstanceTdeCertificate(bool waitForCompletion, TdeCertificate parameters, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(parameters, nameof(parameters));
+
+ using var scope = _managedInstanceTdeCertificatesClientDiagnostics.CreateScope("ManagedInstance.CreateManagedInstanceTdeCertificate");
+ scope.Start();
+ try
+ {
+ var response = _managedInstanceTdeCertificatesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken);
+ var operation = new SqlArmOperation(_managedInstanceTdeCertificatesClientDiagnostics, Pipeline, _managedInstanceTdeCertificatesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters).Request, response, OperationFinalStateVia.Location);
+ if (waitForCompletion)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a server trust groups by instance name.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups
+ /// Operation Id: ServerTrustGroups_ListByInstance
+ ///
+ /// 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 = _serverTrustGroupClientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
+ scope.Start();
+ try
+ {
+ var response = await _serverTrustGroupRestClient.ListByInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new ServerTrustGroup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _serverTrustGroupClientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
+ scope.Start();
+ try
+ {
+ var response = await _serverTrustGroupRestClient.ListByInstanceNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new ServerTrustGroup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ ///
+ /// Gets a server trust groups by instance name.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups
+ /// Operation Id: ServerTrustGroups_ListByInstance
+ ///
+ /// 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 = _serverTrustGroupClientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
+ scope.Start();
+ try
+ {
+ var response = _serverTrustGroupRestClient.ListByInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new ServerTrustGroup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _serverTrustGroupClientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
+ scope.Start();
+ try
+ {
+ var response = _serverTrustGroupRestClient.ListByInstanceNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new ServerTrustGroup(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
///
/// Get top resource consuming queries of a managed instance.
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries
@@ -588,150 +732,6 @@ public virtual ArmOperation Failover(bool waitForCompletion, ReplicaType? replic
}
}
- ///
- /// Creates a TDE certificate for a given server.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates
- /// Operation Id: ManagedInstanceTdeCertificates_Create
- ///
- /// Waits for the completion of the long running operations.
- /// The requested TDE certificate to be created or updated.
- /// The cancellation token to use.
- /// is null.
- public async virtual Task CreateManagedInstanceTdeCertificateAsync(bool waitForCompletion, TdeCertificate parameters, CancellationToken cancellationToken = default)
- {
- Argument.AssertNotNull(parameters, nameof(parameters));
-
- using var scope = _managedInstanceTdeCertificatesClientDiagnostics.CreateScope("ManagedInstance.CreateManagedInstanceTdeCertificate");
- scope.Start();
- try
- {
- var response = await _managedInstanceTdeCertificatesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken).ConfigureAwait(false);
- var operation = new SqlArmOperation(_managedInstanceTdeCertificatesClientDiagnostics, Pipeline, _managedInstanceTdeCertificatesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters).Request, response, OperationFinalStateVia.Location);
- if (waitForCompletion)
- await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
- return operation;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- ///
- /// Creates a TDE certificate for a given server.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates
- /// Operation Id: ManagedInstanceTdeCertificates_Create
- ///
- /// Waits for the completion of the long running operations.
- /// The requested TDE certificate to be created or updated.
- /// The cancellation token to use.
- /// is null.
- public virtual ArmOperation CreateManagedInstanceTdeCertificate(bool waitForCompletion, TdeCertificate parameters, CancellationToken cancellationToken = default)
- {
- Argument.AssertNotNull(parameters, nameof(parameters));
-
- using var scope = _managedInstanceTdeCertificatesClientDiagnostics.CreateScope("ManagedInstance.CreateManagedInstanceTdeCertificate");
- scope.Start();
- try
- {
- var response = _managedInstanceTdeCertificatesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken);
- var operation = new SqlArmOperation(_managedInstanceTdeCertificatesClientDiagnostics, Pipeline, _managedInstanceTdeCertificatesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters).Request, response, OperationFinalStateVia.Location);
- if (waitForCompletion)
- operation.WaitForCompletionResponse(cancellationToken);
- return operation;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- ///
- /// Gets a server trust groups by instance name.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups
- /// Operation Id: ServerTrustGroups_ListByInstance
- ///
- /// 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 = _serverTrustGroupClientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
- scope.Start();
- try
- {
- var response = await _serverTrustGroupRestClient.ListByInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new ServerTrustGroup(Client, value)), response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
- {
- using var scope = _serverTrustGroupClientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
- scope.Start();
- try
- {
- var response = await _serverTrustGroupRestClient.ListByInstanceNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new ServerTrustGroup(Client, value)), response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
- }
-
- ///
- /// Gets a server trust groups by instance name.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups
- /// Operation Id: ServerTrustGroups_ListByInstance
- ///
- /// 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 = _serverTrustGroupClientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
- scope.Start();
- try
- {
- var response = _serverTrustGroupRestClient.ListByInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ServerTrustGroup(Client, value)), response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- Page NextPageFunc(string nextLink, int? pageSizeHint)
- {
- using var scope = _serverTrustGroupClientDiagnostics.CreateScope("ManagedInstance.GetServerTrustGroups");
- scope.Start();
- try
- {
- var response = _serverTrustGroupRestClient.ListByInstanceNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ServerTrustGroup(Client, value)), response.Value.NextLink, response.GetRawResponse());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
- return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
- }
-
///
/// Add a tag to the current resource.
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs
index f821cf3ab94c..2808ba461ee6 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs
@@ -67,12 +67,14 @@ public ManagedInstanceData(AzureLocation 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, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity 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, systemData, tags, location)
+ /// The managed instance's service principal.
+ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity 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, systemData, tags, location)
{
Identity = identity;
Sku = sku;
@@ -98,11 +100,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.
@@ -166,8 +170,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.
@@ -176,5 +182,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..33eb1d3253eb
--- /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.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..947fd98db6d8
--- /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.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/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 e08512322c53..a55730ae11ac 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();
}
@@ -188,11 +193,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"))
@@ -420,14 +427,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"))
@@ -460,11 +477,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, systemData, tags, location, identity, 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, systemData, tags, location, identity, 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/ManagedInstanceUpdateOptions.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdateOptions.Serialization.cs
index 8debb26aa6a0..a84a8be91a75 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdateOptions.Serialization.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdateOptions.Serialization.cs
@@ -125,10 +125,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))
{
@@ -150,6 +150,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/ManagedInstanceUpdateOptions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdateOptions.cs
index 4a5bc04d89b9..0b39d6e09bf2 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdateOptions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceUpdateOptions.cs
@@ -85,8 +85,10 @@ public ManagedInstanceUpdateOptions()
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.
@@ -95,5 +97,7 @@ public ManagedInstanceUpdateOptions()
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 4e98b638b99c..000000000000
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealth.Serialization.cs
+++ /dev/null
@@ -1,87 +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.Models;
-
-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;
- SystemData systemData = 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("systemData"))
- {
- systemData = JsonSerializer.Deserialize(property.Value.ToString());
- 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, systemData, 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 ced3b5ca590e..000000000000
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/OperationsHealth.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using Azure.Core;
-using Azure.ResourceManager.Models;
-
-namespace Azure.ResourceManager.Sql.Models
-{
- /// Operations health status in a location.
- public partial class OperationsHealth : ResourceData
- {
- /// Initializes a new instance of OperationsHealth.
- public OperationsHealth()
- {
- }
-
- /// Initializes a new instance of OperationsHealth.
- /// The id.
- /// The name.
- /// The type.
- /// The systemData.
- /// Operation name for the service.
- /// Operation health status of the service.
- /// Health status description.
- internal OperationsHealth(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, string namePropertiesName, string health, string description) : base(id, name, type, systemData)
- {
- 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