diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs
index d712bbfbede32..0fdc0f74750cb 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs
@@ -63,6 +63,28 @@ public virtual InstancePoolCollection GetInstancePools()
return GetCachedClient(Client => new InstancePoolCollection(Client, Id));
}
+ /// Gets a collection of ServerTrustGroupResources in the ResourceGroupResource.
+ /// The name of the region where the resource is located.
+ /// An object representing collection of ServerTrustGroupResources and their operations over a ServerTrustGroupResource.
+ public virtual ServerTrustGroupCollection GetServerTrustGroups(string locationName)
+ {
+ return new ServerTrustGroupCollection(Client, Id, locationName);
+ }
+
+ /// Gets a collection of VirtualClusterResources in the ResourceGroupResource.
+ /// An object representing collection of VirtualClusterResources and their operations over a VirtualClusterResource.
+ public virtual VirtualClusterCollection GetVirtualClusters()
+ {
+ return GetCachedClient(Client => new VirtualClusterCollection(Client, Id));
+ }
+
+ /// Gets a collection of SqlServerResources in the ResourceGroupResource.
+ /// An object representing collection of SqlServerResources and their operations over a SqlServerResource.
+ public virtual SqlServerCollection GetSqlServers()
+ {
+ return GetCachedClient(Client => new SqlServerCollection(Client, Id));
+ }
+
/// Gets a collection of ResourceGroupLongTermRetentionBackupResources in the ResourceGroupResource.
/// The location of the database.
/// The name of the server.
@@ -90,28 +112,6 @@ public virtual ManagedInstanceCollection GetManagedInstances()
return GetCachedClient(Client => new ManagedInstanceCollection(Client, Id));
}
- /// Gets a collection of ServerTrustGroupResources in the ResourceGroupResource.
- /// The name of the region where the resource is located.
- /// An object representing collection of ServerTrustGroupResources and their operations over a ServerTrustGroupResource.
- public virtual ServerTrustGroupCollection GetServerTrustGroups(string locationName)
- {
- return new ServerTrustGroupCollection(Client, Id, locationName);
- }
-
- /// Gets a collection of VirtualClusterResources in the ResourceGroupResource.
- /// An object representing collection of VirtualClusterResources and their operations over a VirtualClusterResource.
- public virtual VirtualClusterCollection GetVirtualClusters()
- {
- return GetCachedClient(Client => new VirtualClusterCollection(Client, Id));
- }
-
- /// Gets a collection of SqlServerResources in the ResourceGroupResource.
- /// An object representing collection of SqlServerResources and their operations over a SqlServerResource.
- public virtual SqlServerCollection GetSqlServers()
- {
- return GetCachedClient(Client => 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/SqlExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs
index 58f7250fa4e5e..da2d10cb50a08 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs
@@ -76,6 +76,100 @@ public static Response GetDeletedServer(this Subscription
return subscriptionResource.GetDeletedServers(locationName).Get(deletedServerName, cancellationToken);
}
+ /// Gets a collection of SubscriptionUsageResources in the SubscriptionResource.
+ /// 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 SubscriptionUsageResources and their operations over a SubscriptionUsageResource.
+ public static SubscriptionUsageCollection GetSubscriptionUsages(this SubscriptionResource subscriptionResource, string locationName)
+ {
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscriptionResource).GetSubscriptionUsages(locationName);
+ }
+
+ ///
+ /// Gets a subscription usage metric.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}
+ /// Operation Id: SubscriptionUsages_Get
+ ///
+ /// The instance the method will execute against.
+ /// The name of the region where the resource is located.
+ /// Name of usage metric to return.
+ /// The cancellation token to use.
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [ForwardsClientCalls]
+ public static async Task> GetSubscriptionUsageAsync(this SubscriptionResource subscriptionResource, string locationName, string usageName, CancellationToken cancellationToken = default)
+ {
+ return await subscriptionResource.GetSubscriptionUsages(locationName).GetAsync(usageName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets a subscription usage metric.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}
+ /// Operation Id: SubscriptionUsages_Get
+ ///
+ /// The instance the method will execute against.
+ /// The name of the region where the resource is located.
+ /// Name of usage metric to return.
+ /// The cancellation token to use.
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [ForwardsClientCalls]
+ public static Response GetSubscriptionUsage(this SubscriptionResource subscriptionResource, string locationName, string usageName, CancellationToken cancellationToken = default)
+ {
+ return subscriptionResource.GetSubscriptionUsages(locationName).Get(usageName, cancellationToken);
+ }
+
+ /// Gets a collection of SqlTimeZoneResources in the SubscriptionResource.
+ /// 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 SqlTimeZoneResources and their operations over a SqlTimeZoneResource.
+ public static SqlTimeZoneCollection GetSqlTimeZones(this SubscriptionResource subscriptionResource, string locationName)
+ {
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscriptionResource).GetSqlTimeZones(locationName);
+ }
+
+ ///
+ /// Gets a managed instance time zone.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}
+ /// Operation Id: TimeZones_Get
+ ///
+ /// The instance the method will execute against.
+ /// The String to use.
+ /// The String to use.
+ /// The cancellation token to use.
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [ForwardsClientCalls]
+ public static async Task> GetSqlTimeZoneAsync(this SubscriptionResource subscriptionResource, string locationName, string timeZoneId, CancellationToken cancellationToken = default)
+ {
+ return await subscriptionResource.GetSqlTimeZones(locationName).GetAsync(timeZoneId, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets a managed instance time zone.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}
+ /// Operation Id: TimeZones_Get
+ ///
+ /// The instance the method will execute against.
+ /// The String to use.
+ /// The String to use.
+ /// The cancellation token to use.
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [ForwardsClientCalls]
+ public static Response GetSqlTimeZone(this SubscriptionResource subscriptionResource, string locationName, string timeZoneId, CancellationToken cancellationToken = default)
+ {
+ return subscriptionResource.GetSqlTimeZones(locationName).Get(timeZoneId, cancellationToken);
+ }
+
/// Gets a collection of SubscriptionLongTermRetentionBackupResources in the SubscriptionResource.
/// The instance the method will execute against.
/// The location of the database.
@@ -186,100 +280,6 @@ public static Response Gets a collection of SubscriptionUsageResources in the SubscriptionResource.
- /// 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 SubscriptionUsageResources and their operations over a SubscriptionUsageResource.
- public static SubscriptionUsageCollection GetSubscriptionUsages(this SubscriptionResource subscriptionResource, string locationName)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscriptionResource).GetSubscriptionUsages(locationName);
- }
-
- ///
- /// Gets a subscription usage metric.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}
- /// Operation Id: SubscriptionUsages_Get
- ///
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// Name of usage metric to return.
- /// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- [ForwardsClientCalls]
- public static async Task> GetSubscriptionUsageAsync(this SubscriptionResource subscriptionResource, string locationName, string usageName, CancellationToken cancellationToken = default)
- {
- return await subscriptionResource.GetSubscriptionUsages(locationName).GetAsync(usageName, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets a subscription usage metric.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}
- /// Operation Id: SubscriptionUsages_Get
- ///
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// Name of usage metric to return.
- /// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- [ForwardsClientCalls]
- public static Response GetSubscriptionUsage(this SubscriptionResource subscriptionResource, string locationName, string usageName, CancellationToken cancellationToken = default)
- {
- return subscriptionResource.GetSubscriptionUsages(locationName).Get(usageName, cancellationToken);
- }
-
- /// Gets a collection of SqlTimeZoneResources in the SubscriptionResource.
- /// 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 SqlTimeZoneResources and their operations over a SqlTimeZoneResource.
- public static SqlTimeZoneCollection GetSqlTimeZones(this SubscriptionResource subscriptionResource, string locationName)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscriptionResource).GetSqlTimeZones(locationName);
- }
-
- ///
- /// Gets a managed instance time zone.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}
- /// Operation Id: TimeZones_Get
- ///
- /// The instance the method will execute against.
- /// The String to use.
- /// The String to use.
- /// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- [ForwardsClientCalls]
- public static async Task> GetSqlTimeZoneAsync(this SubscriptionResource subscriptionResource, string locationName, string timeZoneId, CancellationToken cancellationToken = default)
- {
- return await subscriptionResource.GetSqlTimeZones(locationName).GetAsync(timeZoneId, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets a managed instance time zone.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}
- /// Operation Id: TimeZones_Get
- ///
- /// The instance the method will execute against.
- /// The String to use.
- /// The String to use.
- /// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- [ForwardsClientCalls]
- public static Response GetSqlTimeZone(this SubscriptionResource subscriptionResource, string locationName, string timeZoneId, CancellationToken cancellationToken = default)
- {
- return subscriptionResource.GetSqlTimeZones(locationName).Get(timeZoneId, cancellationToken);
- }
-
///
/// Gets a list of all deleted servers in a subscription.
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers
@@ -363,9 +363,131 @@ public static async Task> GetByLocationCapability
/// is null.
public static Response GetByLocationCapability(this SubscriptionResource subscriptionResource, string locationName, CapabilityGroup? include = null, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscriptionResource).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 SubscriptionResource subscriptionResource, string locationName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscriptionResource).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 SubscriptionResource subscriptionResource, string locationName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscriptionResource).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 SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ return GetExtensionClient(subscriptionResource).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 SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ return GetExtensionClient(subscriptionResource).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 SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default)
+ {
+ return GetExtensionClient(subscriptionResource).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 SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default)
+ {
+ return GetExtensionClient(subscriptionResource).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 static async Task> CheckNameAvailabilityServerAsync(this SubscriptionResource subscriptionResource, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(parameters, nameof(parameters));
+
+ return await GetExtensionClient(subscriptionResource).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 SubscriptionResource subscriptionResource, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(parameters, nameof(parameters));
- return GetExtensionClient(subscriptionResource).GetByLocationCapability(locationName, include, cancellationToken);
+ return GetExtensionClient(subscriptionResource).CheckNameAvailabilityServer(parameters, cancellationToken);
}
///
@@ -564,258 +686,229 @@ public static Pageable GetManagedInstances(this Subscri
return GetExtensionClient(subscriptionResource).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 SubscriptionResource subscriptionResource, string locationName, CancellationToken cancellationToken = default)
+ private static ResourceGroupResourceExtensionClient GetExtensionClient(ResourceGroupResource resourceGroupResource)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscriptionResource).GetOperationsHealthsByLocationAsync(locationName, cancellationToken);
+ return resourceGroupResource.GetCachedClient((client) =>
+ {
+ return new ResourceGroupResourceExtensionClient(client, resourceGroupResource.Id);
+ }
+ );
}
- ///
- /// 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.
+ /// Gets a collection of InstanceFailoverGroupResources in the ResourceGroupResource.
+ /// 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 SubscriptionResource subscriptionResource, string locationName, CancellationToken cancellationToken = default)
+ /// An object representing collection of InstanceFailoverGroupResources and their operations over a InstanceFailoverGroupResource.
+ public static InstanceFailoverGroupCollection GetInstanceFailoverGroups(this ResourceGroupResource resourceGroupResource, string locationName)
{
Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- return GetExtensionClient(subscriptionResource).GetOperationsHealthsByLocation(locationName, cancellationToken);
+ return GetExtensionClient(resourceGroupResource).GetInstanceFailoverGroups(locationName);
}
///
- /// Gets a collection of sync database ids.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
- /// Operation Id: SyncGroups_ListSyncDatabaseIds
+ /// Gets a failover group.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}
+ /// Operation Id: InstanceFailoverGroups_Get
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// The name of the region where the resource is located.
+ /// The name of the failover group.
/// 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 SubscriptionResource subscriptionResource, string locationName, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [ForwardsClientCalls]
+ public static async Task> GetInstanceFailoverGroupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string failoverGroupName, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscriptionResource).GetSyncDatabaseIdsSyncGroupsAsync(locationName, cancellationToken);
+ return await resourceGroupResource.GetInstanceFailoverGroups(locationName).GetAsync(failoverGroupName, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a collection of sync database ids.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds
- /// Operation Id: SyncGroups_ListSyncDatabaseIds
+ /// Gets a failover group.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}
+ /// Operation Id: InstanceFailoverGroups_Get
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// The name of the region where the resource is located.
+ /// The name of the failover group.
/// 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 SubscriptionResource subscriptionResource, string locationName, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [ForwardsClientCalls]
+ public static Response GetInstanceFailoverGroup(this ResourceGroupResource resourceGroupResource, string locationName, string failoverGroupName, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(subscriptionResource).GetSyncDatabaseIdsSyncGroups(locationName, cancellationToken);
+ return resourceGroupResource.GetInstanceFailoverGroups(locationName).Get(failoverGroupName, 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 SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ /// Gets a collection of InstancePoolResources in the ResourceGroupResource.
+ /// The instance the method will execute against.
+ /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource.
+ public static InstancePoolCollection GetInstancePools(this ResourceGroupResource resourceGroupResource)
{
- return GetExtensionClient(subscriptionResource).GetVirtualClustersAsync(cancellationToken);
+ return GetExtensionClient(resourceGroupResource).GetInstancePools();
}
///
- /// Gets a list of all virtualClusters in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters
- /// Operation Id: VirtualClusters_List
+ /// Gets an instance pool.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}
+ /// Operation Id: InstancePools_Get
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
+ /// The name of the instance pool to be retrieved.
/// The cancellation token to use.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetVirtualClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public static async Task> GetInstancePoolAsync(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default)
{
- return GetExtensionClient(subscriptionResource).GetVirtualClusters(cancellationToken);
+ return await resourceGroupResource.GetInstancePools().GetAsync(instancePoolName, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a list of all servers in the subscription.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
- /// Operation Id: Servers_List
+ /// Gets an instance pool.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}
+ /// Operation Id: InstancePools_Get
///
- /// The instance the method will execute against.
- /// The child resources to include in the response.
+ /// The instance the method will execute against.
+ /// The name of the instance pool to be retrieved.
/// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetSqlServersAsync(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public static Response GetInstancePool(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default)
{
- return GetExtensionClient(subscriptionResource).GetSqlServersAsync(expand, cancellationToken);
+ return resourceGroupResource.GetInstancePools().Get(instancePoolName, 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 SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default)
+ /// Gets a collection of ServerTrustGroupResources in the ResourceGroupResource.
+ /// 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 ServerTrustGroupResources and their operations over a ServerTrustGroupResource.
+ public static ServerTrustGroupCollection GetServerTrustGroups(this ResourceGroupResource resourceGroupResource, string locationName)
{
- return GetExtensionClient(subscriptionResource).GetSqlServers(expand, cancellationToken);
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(resourceGroupResource).GetServerTrustGroups(locationName);
}
///
- /// Determines whether a resource can be created with the specified name.
- /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability
- /// Operation Id: Servers_CheckNameAvailability
+ /// Gets a server trust group.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}
+ /// Operation Id: ServerTrustGroups_Get
///
- /// The instance the method will execute against.
- /// The name availability request parameters.
+ /// The instance the method will execute against.
+ /// The name of the region where the resource is located.
+ /// The name of the server trust group.
/// The cancellation token to use.
- /// is null.
- public static async Task> CheckNameAvailabilityServerAsync(this SubscriptionResource subscriptionResource, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [ForwardsClientCalls]
+ public static async Task> GetServerTrustGroupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string serverTrustGroupName, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(parameters, nameof(parameters));
-
- return await GetExtensionClient(subscriptionResource).CheckNameAvailabilityServerAsync(parameters, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetServerTrustGroups(locationName).GetAsync(serverTrustGroupName, 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
+ /// Gets a server trust group.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}
+ /// Operation Id: ServerTrustGroups_Get
///
- /// The instance the method will execute against.
- /// The name availability request parameters.
+ /// The instance the method will execute against.
+ /// The name of the region where the resource is located.
+ /// The name of the server trust group.
/// The cancellation token to use.
- /// is null.
- public static Response CheckNameAvailabilityServer(this SubscriptionResource subscriptionResource, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
- {
- Argument.AssertNotNull(parameters, nameof(parameters));
-
- return GetExtensionClient(subscriptionResource).CheckNameAvailabilityServer(parameters, cancellationToken);
- }
-
- private static ResourceGroupResourceExtensionClient GetExtensionClient(ResourceGroupResource resourceGroupResource)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [ForwardsClientCalls]
+ public static Response GetServerTrustGroup(this ResourceGroupResource resourceGroupResource, string locationName, string serverTrustGroupName, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetCachedClient((client) =>
- {
- return new ResourceGroupResourceExtensionClient(client, resourceGroupResource.Id);
- }
- );
+ return resourceGroupResource.GetServerTrustGroups(locationName).Get(serverTrustGroupName, cancellationToken);
}
- /// Gets a collection of InstanceFailoverGroupResources in the ResourceGroupResource.
+ /// Gets a collection of VirtualClusterResources in the ResourceGroupResource.
/// 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 InstanceFailoverGroupResources and their operations over a InstanceFailoverGroupResource.
- public static InstanceFailoverGroupCollection GetInstanceFailoverGroups(this ResourceGroupResource resourceGroupResource, string locationName)
+ /// An object representing collection of VirtualClusterResources and their operations over a VirtualClusterResource.
+ public static VirtualClusterCollection GetVirtualClusters(this ResourceGroupResource resourceGroupResource)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(resourceGroupResource).GetInstanceFailoverGroups(locationName);
+ return GetExtensionClient(resourceGroupResource).GetVirtualClusters();
}
///
- /// Gets a failover group.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}
- /// Operation Id: InstanceFailoverGroups_Get
+ /// Gets a virtual cluster.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}
+ /// Operation Id: VirtualClusters_Get
///
/// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// The name of the failover group.
+ /// The name of the virtual cluster.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
- public static async Task> GetInstanceFailoverGroupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string failoverGroupName, CancellationToken cancellationToken = default)
+ public static async Task> GetVirtualClusterAsync(this ResourceGroupResource resourceGroupResource, string virtualClusterName, CancellationToken cancellationToken = default)
{
- return await resourceGroupResource.GetInstanceFailoverGroups(locationName).GetAsync(failoverGroupName, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetVirtualClusters().GetAsync(virtualClusterName, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a failover group.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}
- /// Operation Id: InstanceFailoverGroups_Get
+ /// Gets a virtual cluster.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}
+ /// Operation Id: VirtualClusters_Get
///
/// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// The name of the failover group.
+ /// The name of the virtual cluster.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
- public static Response GetInstanceFailoverGroup(this ResourceGroupResource resourceGroupResource, string locationName, string failoverGroupName, CancellationToken cancellationToken = default)
+ public static Response GetVirtualCluster(this ResourceGroupResource resourceGroupResource, string virtualClusterName, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetInstanceFailoverGroups(locationName).Get(failoverGroupName, cancellationToken);
+ return resourceGroupResource.GetVirtualClusters().Get(virtualClusterName, cancellationToken);
}
- /// Gets a collection of InstancePoolResources in the ResourceGroupResource.
+ /// Gets a collection of SqlServerResources in the ResourceGroupResource.
/// The instance the method will execute against.
- /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource.
- public static InstancePoolCollection GetInstancePools(this ResourceGroupResource resourceGroupResource)
+ /// An object representing collection of SqlServerResources and their operations over a SqlServerResource.
+ public static SqlServerCollection GetSqlServers(this ResourceGroupResource resourceGroupResource)
{
- return GetExtensionClient(resourceGroupResource).GetInstancePools();
+ return GetExtensionClient(resourceGroupResource).GetSqlServers();
}
///
- /// Gets an instance pool.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}
- /// Operation Id: InstancePools_Get
+ /// Gets a server.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}
+ /// Operation Id: Servers_Get
///
/// The instance the method will execute against.
- /// The name of the instance pool to be retrieved.
+ /// The name of the server.
+ /// The child resources to include in the response.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
- public static async Task> GetInstancePoolAsync(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default)
+ public static async Task> GetSqlServerAsync(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default)
{
- return await resourceGroupResource.GetInstancePools().GetAsync(instancePoolName, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetSqlServers().GetAsync(serverName, expand, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets an instance pool.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}
- /// Operation Id: InstancePools_Get
+ /// Gets a server.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}
+ /// Operation Id: Servers_Get
///
/// The instance the method will execute against.
- /// The name of the instance pool to be retrieved.
+ /// The name of the server.
+ /// The child resources to include in the response.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
- public static Response GetInstancePool(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default)
+ public static Response GetSqlServer(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetInstancePools().Get(instancePoolName, cancellationToken);
+ return resourceGroupResource.GetSqlServers().Get(serverName, expand, cancellationToken);
}
/// Gets a collection of ResourceGroupLongTermRetentionBackupResources in the ResourceGroupResource.
@@ -970,135 +1063,6 @@ public static Response GetManagedInstance(this Resource
return resourceGroupResource.GetManagedInstances().Get(managedInstanceName, expand, cancellationToken);
}
- /// Gets a collection of ServerTrustGroupResources in the ResourceGroupResource.
- /// 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 ServerTrustGroupResources and their operations over a ServerTrustGroupResource.
- public static ServerTrustGroupCollection GetServerTrustGroups(this ResourceGroupResource resourceGroupResource, string locationName)
- {
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
-
- return GetExtensionClient(resourceGroupResource).GetServerTrustGroups(locationName);
- }
-
- ///
- /// Gets a server trust group.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}
- /// Operation Id: ServerTrustGroups_Get
- ///
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// The name of the server trust group.
- /// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- [ForwardsClientCalls]
- public static async Task> GetServerTrustGroupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string serverTrustGroupName, CancellationToken cancellationToken = default)
- {
- return await resourceGroupResource.GetServerTrustGroups(locationName).GetAsync(serverTrustGroupName, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets a server trust group.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}
- /// Operation Id: ServerTrustGroups_Get
- ///
- /// The instance the method will execute against.
- /// The name of the region where the resource is located.
- /// The name of the server trust group.
- /// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- [ForwardsClientCalls]
- public static Response GetServerTrustGroup(this ResourceGroupResource resourceGroupResource, string locationName, string serverTrustGroupName, CancellationToken cancellationToken = default)
- {
- return resourceGroupResource.GetServerTrustGroups(locationName).Get(serverTrustGroupName, cancellationToken);
- }
-
- /// Gets a collection of VirtualClusterResources in the ResourceGroupResource.
- /// The instance the method will execute against.
- /// An object representing collection of VirtualClusterResources and their operations over a VirtualClusterResource.
- public static VirtualClusterCollection GetVirtualClusters(this ResourceGroupResource resourceGroupResource)
- {
- return GetExtensionClient(resourceGroupResource).GetVirtualClusters();
- }
-
- ///
- /// Gets a virtual cluster.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}
- /// Operation Id: VirtualClusters_Get
- ///
- /// The instance the method will execute against.
- /// The name of the virtual cluster.
- /// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- [ForwardsClientCalls]
- public static async Task> GetVirtualClusterAsync(this ResourceGroupResource resourceGroupResource, string virtualClusterName, CancellationToken cancellationToken = default)
- {
- return await resourceGroupResource.GetVirtualClusters().GetAsync(virtualClusterName, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets a virtual cluster.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}
- /// Operation Id: VirtualClusters_Get
- ///
- /// The instance the method will execute against.
- /// The name of the virtual cluster.
- /// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- [ForwardsClientCalls]
- public static Response GetVirtualCluster(this ResourceGroupResource resourceGroupResource, string virtualClusterName, CancellationToken cancellationToken = default)
- {
- return resourceGroupResource.GetVirtualClusters().Get(virtualClusterName, cancellationToken);
- }
-
- /// Gets a collection of SqlServerResources in the ResourceGroupResource.
- /// The instance the method will execute against.
- /// An object representing collection of SqlServerResources and their operations over a SqlServerResource.
- public static SqlServerCollection GetSqlServers(this ResourceGroupResource resourceGroupResource)
- {
- return GetExtensionClient(resourceGroupResource).GetSqlServers();
- }
-
- ///
- /// Gets a server.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}
- /// Operation Id: Servers_Get
- ///
- /// The instance the method will execute against.
- /// The name of the server.
- /// The child resources to include in the response.
- /// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- [ForwardsClientCalls]
- public static async Task> GetSqlServerAsync(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default)
- {
- return await resourceGroupResource.GetSqlServers().GetAsync(serverName, expand, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets a server.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}
- /// Operation Id: Servers_Get
- ///
- /// The instance the method will execute against.
- /// The name of the server.
- /// The child resources to include in the response.
- /// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- [ForwardsClientCalls]
- public static Response GetSqlServer(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default)
- {
- return resourceGroupResource.GetSqlServers().Get(serverName, expand, cancellationToken);
- }
-
///
/// Lists the long term retention backups for a given location.
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups
@@ -1362,25 +1326,6 @@ public static ElasticPoolResource GetElasticPoolResource(this ArmClient client,
}
#endregion
- #region ReplicationLinkResource
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static ReplicationLinkResource GetReplicationLinkResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- ReplicationLinkResource.ValidateResourceId(id);
- return new ReplicationLinkResource(client, id);
- }
- );
- }
- #endregion
-
#region ServerCommunicationLinkResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -2128,90 +2073,14 @@ public static JobTargetGroupResource GetJobTargetGroupResource(this ArmClient cl
/// You can use to create a from its components.
///
/// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static JobVersionResource GetJobVersionResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- JobVersionResource.ValidateResourceId(id);
- return new JobVersionResource(client, id);
- }
- );
- }
- #endregion
-
- #region SubscriptionLongTermRetentionBackupResource
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static SubscriptionLongTermRetentionBackupResource GetSubscriptionLongTermRetentionBackupResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- SubscriptionLongTermRetentionBackupResource.ValidateResourceId(id);
- return new SubscriptionLongTermRetentionBackupResource(client, id);
- }
- );
- }
- #endregion
-
- #region ResourceGroupLongTermRetentionBackupResource
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static ResourceGroupLongTermRetentionBackupResource GetResourceGroupLongTermRetentionBackupResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- ResourceGroupLongTermRetentionBackupResource.ValidateResourceId(id);
- return new ResourceGroupLongTermRetentionBackupResource(client, id);
- }
- );
- }
- #endregion
-
- #region SubscriptionLongTermRetentionManagedInstanceBackupResource
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static SubscriptionLongTermRetentionManagedInstanceBackupResource GetSubscriptionLongTermRetentionManagedInstanceBackupResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- SubscriptionLongTermRetentionManagedInstanceBackupResource.ValidateResourceId(id);
- return new SubscriptionLongTermRetentionManagedInstanceBackupResource(client, id);
- }
- );
- }
- #endregion
-
- #region ResourceGroupLongTermRetentionManagedInstanceBackupResource
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static ResourceGroupLongTermRetentionManagedInstanceBackupResource GetResourceGroupLongTermRetentionManagedInstanceBackupResource(this ArmClient client, ResourceIdentifier id)
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static JobVersionResource GetJobVersionResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
- ResourceGroupLongTermRetentionManagedInstanceBackupResource.ValidateResourceId(id);
- return new ResourceGroupLongTermRetentionManagedInstanceBackupResource(client, id);
+ JobVersionResource.ValidateResourceId(id);
+ return new JobVersionResource(client, id);
}
);
}
@@ -2369,44 +2238,6 @@ public static ManagedDatabaseSecurityAlertPolicyResource GetManagedDatabaseSecur
}
#endregion
- #region ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource GetManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource.ValidateResourceId(id);
- return new ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource(client, id);
- }
- );
- }
- #endregion
-
- #region ServerDatabaseSchemaTableColumnSensitivityLabelResource
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static ServerDatabaseSchemaTableColumnSensitivityLabelResource GetServerDatabaseSchemaTableColumnSensitivityLabelResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- ServerDatabaseSchemaTableColumnSensitivityLabelResource.ValidateResourceId(id);
- return new ServerDatabaseSchemaTableColumnSensitivityLabelResource(client, id);
- }
- );
- }
- #endregion
-
#region ManagedTransparentDataEncryptionResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -2578,25 +2409,6 @@ public static ManagedInstancePrivateLinkResource GetManagedInstancePrivateLinkRe
}
#endregion
- #region ManagedInstanceResource
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static ManagedInstanceResource GetManagedInstanceResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- ManagedInstanceResource.ValidateResourceId(id);
- return new ManagedInstanceResource(client, id);
- }
- );
- }
- #endregion
-
#region ManagedInstanceVulnerabilityAssessmentResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -3148,6 +2960,120 @@ public static OutboundFirewallRuleResource GetOutboundFirewallRuleResource(this
}
#endregion
+ #region SqlServerResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static SqlServerResource GetSqlServerResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ SqlServerResource.ValidateResourceId(id);
+ return new SqlServerResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region SubscriptionLongTermRetentionBackupResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static SubscriptionLongTermRetentionBackupResource GetSubscriptionLongTermRetentionBackupResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ SubscriptionLongTermRetentionBackupResource.ValidateResourceId(id);
+ return new SubscriptionLongTermRetentionBackupResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region ResourceGroupLongTermRetentionBackupResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ResourceGroupLongTermRetentionBackupResource GetResourceGroupLongTermRetentionBackupResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ ResourceGroupLongTermRetentionBackupResource.ValidateResourceId(id);
+ return new ResourceGroupLongTermRetentionBackupResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region SubscriptionLongTermRetentionManagedInstanceBackupResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static SubscriptionLongTermRetentionManagedInstanceBackupResource GetSubscriptionLongTermRetentionManagedInstanceBackupResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ SubscriptionLongTermRetentionManagedInstanceBackupResource.ValidateResourceId(id);
+ return new SubscriptionLongTermRetentionManagedInstanceBackupResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region ResourceGroupLongTermRetentionManagedInstanceBackupResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ResourceGroupLongTermRetentionManagedInstanceBackupResource GetResourceGroupLongTermRetentionManagedInstanceBackupResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ ResourceGroupLongTermRetentionManagedInstanceBackupResource.ValidateResourceId(id);
+ return new ResourceGroupLongTermRetentionManagedInstanceBackupResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region ManagedInstanceResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ManagedInstanceResource GetManagedInstanceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ ManagedInstanceResource.ValidateResourceId(id);
+ return new ManagedInstanceResource(client, id);
+ }
+ );
+ }
+ #endregion
+
#region RestorableDroppedDatabaseResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -3186,39 +3112,96 @@ public static RestorableDroppedManagedDatabaseResource GetRestorableDroppedManag
}
#endregion
- #region SqlServerResource
+ #region ServerConnectionPolicyResource
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
///
/// The instance the method will execute against.
/// The resource ID of the resource to get.
- /// Returns a object.
- public static SqlServerResource GetSqlServerResource(this ArmClient client, ResourceIdentifier id)
+ /// Returns a object.
+ public static ServerConnectionPolicyResource GetServerConnectionPolicyResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
- SqlServerResource.ValidateResourceId(id);
- return new SqlServerResource(client, id);
+ ServerConnectionPolicyResource.ValidateResourceId(id);
+ return new ServerConnectionPolicyResource(client, id);
}
);
}
#endregion
- #region ServerConnectionPolicyResource
+ #region ReplicationLinkResource
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
///
/// The instance the method will execute against.
/// The resource ID of the resource to get.
- /// Returns a object.
- public static ServerConnectionPolicyResource GetServerConnectionPolicyResource(this ArmClient client, ResourceIdentifier id)
+ /// Returns a object.
+ public static ReplicationLinkResource GetReplicationLinkResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
- ServerConnectionPolicyResource.ValidateResourceId(id);
- return new ServerConnectionPolicyResource(client, id);
+ ReplicationLinkResource.ValidateResourceId(id);
+ return new ReplicationLinkResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource GetManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource.ValidateResourceId(id);
+ return new ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region ServerDatabaseSchemaTableColumnSensitivityLabelResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ServerDatabaseSchemaTableColumnSensitivityLabelResource GetServerDatabaseSchemaTableColumnSensitivityLabelResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ ServerDatabaseSchemaTableColumnSensitivityLabelResource.ValidateResourceId(id);
+ return new ServerDatabaseSchemaTableColumnSensitivityLabelResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region ManagedServerDnsAliasResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ManagedServerDnsAliasResource GetManagedServerDnsAliasResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ ManagedServerDnsAliasResource.ValidateResourceId(id);
+ return new ManagedServerDnsAliasResource(client, id);
}
);
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs
index 4f8768ca1c845..fc834eda0b0ac 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs
@@ -27,20 +27,18 @@ internal partial class SubscriptionResourceExtensionClient : 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 SubscriptionResourceExtensionClient()
@@ -60,20 +58,18 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie
private InstancePoolsRestOperations InstancePoolRestClient => _instancePoolRestClient ??= new InstancePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(InstancePoolResource.ResourceType));
private ClientDiagnostics CapabilitiesClientDiagnostics => _capabilitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private CapabilitiesRestOperations CapabilitiesRestClient => _capabilitiesRestClient ??= new CapabilitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics LongTermRetentionBackupsClientDiagnostics => _longTermRetentionBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private LongTermRetentionBackupsRestOperations LongTermRetentionBackupsRestClient => _longTermRetentionBackupsRestClient ??= new LongTermRetentionBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics LongTermRetentionManagedInstanceBackupsClientDiagnostics => _longTermRetentionManagedInstanceBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private LongTermRetentionManagedInstanceBackupsRestOperations LongTermRetentionManagedInstanceBackupsRestClient => _longTermRetentionManagedInstanceBackupsRestClient ??= new LongTermRetentionManagedInstanceBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics ManagedInstanceClientDiagnostics => _managedInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstanceResource.ResourceType.Namespace, Diagnostics);
- private ManagedInstancesRestOperations ManagedInstanceRestClient => _managedInstanceRestClient ??= new ManagedInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedInstanceResource.ResourceType));
- private ClientDiagnostics OperationsHealthClientDiagnostics => _operationsHealthClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private OperationsHealthRestOperations OperationsHealthRestClient => _operationsHealthRestClient ??= new OperationsHealthRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private ClientDiagnostics SyncGroupClientDiagnostics => _syncGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", SyncGroupResource.ResourceType.Namespace, Diagnostics);
private SyncGroupsRestOperations SyncGroupRestClient => _syncGroupRestClient ??= new SyncGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SyncGroupResource.ResourceType));
private ClientDiagnostics VirtualClusterClientDiagnostics => _virtualClusterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", VirtualClusterResource.ResourceType.Namespace, Diagnostics);
private VirtualClustersRestOperations VirtualClusterRestClient => _virtualClusterRestClient ??= new VirtualClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(VirtualClusterResource.ResourceType));
private ClientDiagnostics SqlServerServersClientDiagnostics => _sqlServerServersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", SqlServerResource.ResourceType.Namespace, Diagnostics);
private ServersRestOperations SqlServerServersRestClient => _sqlServerServersRestClient ??= new ServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SqlServerResource.ResourceType));
+ private ClientDiagnostics LongTermRetentionBackupsClientDiagnostics => _longTermRetentionBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private LongTermRetentionBackupsRestOperations LongTermRetentionBackupsRestClient => _longTermRetentionBackupsRestClient ??= new LongTermRetentionBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics LongTermRetentionManagedInstanceBackupsClientDiagnostics => _longTermRetentionManagedInstanceBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private LongTermRetentionManagedInstanceBackupsRestOperations LongTermRetentionManagedInstanceBackupsRestClient => _longTermRetentionManagedInstanceBackupsRestClient ??= new LongTermRetentionManagedInstanceBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics ManagedInstanceClientDiagnostics => _managedInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstanceResource.ResourceType.Namespace, Diagnostics);
+ private ManagedInstancesRestOperations ManagedInstanceRestClient => _managedInstanceRestClient ??= new ManagedInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedInstanceResource.ResourceType));
private string GetApiVersionOrNull(ResourceType resourceType)
{
@@ -89,6 +85,22 @@ public virtual DeletedServerCollection GetDeletedServers(string locationName)
return new DeletedServerCollection(Client, Id, locationName);
}
+ /// Gets a collection of SubscriptionUsageResources in the SubscriptionResource.
+ /// The name of the region where the resource is located.
+ /// An object representing collection of SubscriptionUsageResources and their operations over a SubscriptionUsageResource.
+ public virtual SubscriptionUsageCollection GetSubscriptionUsages(string locationName)
+ {
+ return new SubscriptionUsageCollection(Client, Id, locationName);
+ }
+
+ /// Gets a collection of SqlTimeZoneResources in the SubscriptionResource.
+ /// The String to use.
+ /// An object representing collection of SqlTimeZoneResources and their operations over a SqlTimeZoneResource.
+ public virtual SqlTimeZoneCollection GetSqlTimeZones(string locationName)
+ {
+ return new SqlTimeZoneCollection(Client, Id, locationName);
+ }
+
/// Gets a collection of SubscriptionLongTermRetentionBackupResources in the SubscriptionResource.
/// The location of the database.
/// The name of the server.
@@ -109,22 +121,6 @@ public virtual SubscriptionLongTermRetentionManagedInstanceBackupCollection GetS
return new SubscriptionLongTermRetentionManagedInstanceBackupCollection(Client, Id, locationName, managedInstanceName, databaseName);
}
- /// Gets a collection of SubscriptionUsageResources in the SubscriptionResource.
- /// The name of the region where the resource is located.
- /// An object representing collection of SubscriptionUsageResources and their operations over a SubscriptionUsageResource.
- public virtual SubscriptionUsageCollection GetSubscriptionUsages(string locationName)
- {
- return new SubscriptionUsageCollection(Client, Id, locationName);
- }
-
- /// Gets a collection of SqlTimeZoneResources in the SubscriptionResource.
- /// The String to use.
- /// An object representing collection of SqlTimeZoneResources and their operations over a SqlTimeZoneResource.
- 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
@@ -342,25 +338,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("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByLocation");
+ using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(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)
{
@@ -368,14 +362,14 @@ async Task> FirstPageFunc(int?
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByLocation");
+ using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(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)
{
@@ -387,25 +381,23 @@ async Task> NextPageFunc(strin
}
///
- /// 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("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByLocation");
+ using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSyncDatabaseIdsSyncGroups");
scope.Start();
try
{
- var response = LongTermRetentionBackupsRestClient.ListByLocation(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionBackupResource(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)
{
@@ -413,14 +405,14 @@ Page FirstPageFunc(int? pageSizeHin
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByLocation");
+ using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(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)
{
@@ -432,26 +424,22 @@ Page NextPageFunc(string nextLink,
}
///
- /// 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("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByServer");
+ using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(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 VirtualClusterResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -459,14 +447,14 @@ async Task> FirstPageFunc(int?
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByServer");
+ using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(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 VirtualClusterResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -478,26 +466,22 @@ async Task> NextPageFunc(strin
}
///
- /// 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("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByServer");
+ using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ var response = VirtualClusterRestClient.List(Id.SubscriptionId, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new VirtualClusterResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -505,14 +489,14 @@ Page FirstPageFunc(int? pageSizeHin
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByServer");
+ using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(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 VirtualClusterResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -524,26 +508,23 @@ Page NextPageFunc(string nextLink,
}
///
- /// 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("SubscriptionResourceExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(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 SqlServerResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -551,14 +532,14 @@ async Task> Fir
throw;
}
}
- async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(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 SqlServerResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -570,26 +551,23 @@ async Task> Nex
}
///
- /// 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("SubscriptionResourceExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(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 SqlServerResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -597,14 +575,14 @@ Page FirstPageFunc(i
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionManagedInstanceBackupsByInstance");
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(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 SqlServerResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -616,113 +594,71 @@ Page NextPageFunc(st
}
///
- /// 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 virtual async Task> CheckNameAvailabilityServerAsync(CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
{
- async Task> FirstPageFunc(int? pageSizeHint)
+ using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailabilityServer");
+ scope.Start();
+ try
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(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("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(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("SubscriptionResourceExtensionClient.CheckNameAvailabilityServer");
+ scope.Start();
+ try
{
- using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
- scope.Start();
- try
- {
- var response = LongTermRetentionManagedInstanceBackupsRestClient.ListByLocation(Id.SubscriptionId, locationName, onlyLatestPerDatabase, databaseState, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SubscriptionLongTermRetentionManagedInstanceBackupResource(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("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(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("SubscriptionResourceExtensionClient.GetManagedInstances");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 ManagedInstanceResource(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 SubscriptionLongTermRetentionBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -730,14 +666,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("SubscriptionResourceExtensionClient.GetManagedInstances");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 ManagedInstanceResource(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 SubscriptionLongTermRetentionBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -749,23 +685,25 @@ async Task> NextPageFunc(string nextLink, int? pag
}
///
- /// 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("SubscriptionResourceExtensionClient.GetManagedInstances");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = ManagedInstanceRestClient.List(Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstanceResource(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 SubscriptionLongTermRetentionBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -773,14 +711,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetManagedInstances");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionBackupsByLocation");
scope.Start();
try
{
- var response = ManagedInstanceRestClient.ListNextPage(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new ManagedInstanceResource(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 SubscriptionLongTermRetentionBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -792,23 +730,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("SubscriptionResourceExtensionClient.GetOperationsHealthsByLocation");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -816,14 +757,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("SubscriptionResourceExtensionClient.GetOperationsHealthsByLocation");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -835,23 +776,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("SubscriptionResourceExtensionClient.GetOperationsHealthsByLocation");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -859,14 +803,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = OperationsHealthClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetOperationsHealthsByLocation");
+ using var scope = LongTermRetentionBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -878,23 +822,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("SubscriptionResourceExtensionClient.GetSyncDatabaseIdsSyncGroups");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -902,14 +849,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("SubscriptionResourceExtensionClient.GetSyncDatabaseIdsSyncGroups");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -921,23 +868,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("SubscriptionResourceExtensionClient.GetSyncDatabaseIdsSyncGroups");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -945,14 +895,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = SyncGroupClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSyncDatabaseIdsSyncGroups");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SubscriptionLongTermRetentionManagedInstanceBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -964,22 +914,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("SubscriptionResourceExtensionClient.GetVirtualClusters");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = await VirtualClusterRestClient.ListAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualClusterResource(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 SubscriptionLongTermRetentionManagedInstanceBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -987,14 +940,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("SubscriptionResourceExtensionClient.GetVirtualClusters");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 VirtualClusterResource(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 SubscriptionLongTermRetentionManagedInstanceBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1006,22 +959,25 @@ async Task> NextPageFunc(string nextLink, int? page
}
///
- /// 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("SubscriptionResourceExtensionClient.GetVirtualClusters");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = VirtualClusterRestClient.List(Id.SubscriptionId, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualClusterResource(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 SubscriptionLongTermRetentionManagedInstanceBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1029,14 +985,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = VirtualClusterClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetVirtualClusters");
+ using var scope = LongTermRetentionManagedInstanceBackupsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetLongTermRetentionManagedInstanceBackupsByLocation");
scope.Start();
try
{
- var response = VirtualClusterRestClient.ListNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new VirtualClusterResource(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 SubscriptionLongTermRetentionManagedInstanceBackupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1048,23 +1004,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("SubscriptionResourceExtensionClient.GetSqlServers");
+ using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SqlServerResource(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 ManagedInstanceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1072,14 +1028,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("SubscriptionResourceExtensionClient.GetSqlServers");
+ using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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 SqlServerResource(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 ManagedInstanceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1091,23 +1047,23 @@ async Task> NextPageFunc(string nextLink, int? pageSizeH
}
///
- /// 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("SubscriptionResourceExtensionClient.GetSqlServers");
+ using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetManagedInstances");
scope.Start();
try
{
- var response = SqlServerServersRestClient.List(Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServerResource(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 ManagedInstanceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1115,14 +1071,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSqlServers");
+ using var scope = ManagedInstanceClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetManagedInstances");
scope.Start();
try
{
- var response = SqlServerServersRestClient.ListNextPage(nextLink, Id.SubscriptionId, expand, cancellationToken: cancellationToken);
- return Page.FromValues(response.Value.Value.Select(value => new SqlServerResource(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 ManagedInstanceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -1132,51 +1088,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 virtual async Task> CheckNameAvailabilityServerAsync(CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
- {
- using var scope = SqlServerServersClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.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("SubscriptionResourceExtensionClient.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/InstancePoolResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs
index 1f0b2d8297c4f..ade1f032b6a55 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs
@@ -37,10 +37,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.
@@ -65,11 +65,11 @@ internal InstancePoolResource(ArmClient client, ResourceIdentifier id) : base(cl
_instancePoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, Diagnostics);
TryGetApiVersion(ResourceType, out string instancePoolApiVersion);
_instancePoolRestClient = new InstancePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, instancePoolApiVersion);
+ _usagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ _usagesRestClient = new UsagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
_managedInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstanceResource.ResourceType.Namespace, Diagnostics);
TryGetApiVersion(ManagedInstanceResource.ResourceType, out string managedInstanceApiVersion);
_managedInstanceRestClient = new ManagedInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedInstanceApiVersion);
- _usagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- _usagesRestClient = new UsagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
#if DEBUG
ValidateResourceId(Id);
#endif
@@ -200,23 +200,23 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
}
///
- /// 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("InstancePoolResource.GetManagedInstances");
+ using var scope = _usagesClientDiagnostics.CreateScope("InstancePoolResource.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 ManagedInstanceResource(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)
{
@@ -224,14 +224,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("InstancePoolResource.GetManagedInstances");
+ using var scope = _usagesClientDiagnostics.CreateScope("InstancePoolResource.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 ManagedInstanceResource(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)
{
@@ -243,23 +243,23 @@ async Task> NextPageFunc(string nextLink, int? pag
}
///
- /// 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("InstancePoolResource.GetManagedInstances");
+ using var scope = _usagesClientDiagnostics.CreateScope("InstancePoolResource.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 ManagedInstanceResource(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)
{
@@ -267,14 +267,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePoolResource.GetManagedInstances");
+ using var scope = _usagesClientDiagnostics.CreateScope("InstancePoolResource.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 ManagedInstanceResource(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)
{
@@ -286,23 +286,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("InstancePoolResource.GetUsages");
+ using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePoolResource.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 ManagedInstanceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -310,14 +310,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("InstancePoolResource.GetUsages");
+ using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePoolResource.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 ManagedInstanceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -329,23 +329,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("InstancePoolResource.GetUsages");
+ using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePoolResource.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 ManagedInstanceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
@@ -353,14 +353,14 @@ Page FirstPageFunc(int? pageSizeHint)
throw;
}
}
- Page NextPageFunc(string nextLink, int? pageSizeHint)
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
{
- using var scope = _usagesClientDiagnostics.CreateScope("InstancePoolResource.GetUsages");
+ using var scope = _managedInstanceClientDiagnostics.CreateScope("InstancePoolResource.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 ManagedInstanceResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
}
catch (Exception e)
{
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/ManagedServerDnsAliasOperationSource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/ManagedServerDnsAliasOperationSource.cs
new file mode 100644
index 0000000000000..1584715c6788b
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/ManagedServerDnsAliasOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Sql
+{
+ internal class ManagedServerDnsAliasOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal ManagedServerDnsAliasOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ ManagedServerDnsAliasResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = ManagedServerDnsAliasData.DeserializeManagedServerDnsAliasData(document.RootElement);
+ return new ManagedServerDnsAliasResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = ManagedServerDnsAliasData.DeserializeManagedServerDnsAliasData(document.RootElement);
+ return new ManagedServerDnsAliasResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/ReplicationLinkOperationSource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/ReplicationLinkOperationSource.cs
new file mode 100644
index 0000000000000..329679fcee155
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/ReplicationLinkOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Sql
+{
+ internal class ReplicationLinkOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal ReplicationLinkOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ ReplicationLinkResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = ReplicationLinkData.DeserializeReplicationLinkData(document.RootElement);
+ return new ReplicationLinkResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = ReplicationLinkData.DeserializeReplicationLinkData(document.RootElement);
+ return new ReplicationLinkResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.cs
index 5507cd8cad8da..a49490b2d0cb9 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.cs
@@ -1186,6 +1186,92 @@ public virtual Response UpdateRecommendedManagedDatabaseSensitivityLabel(Recomme
}
}
+ ///
+ /// Gets the sensitivity labels of a given database
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/sensitivityLabels
+ /// Operation Id: ManagedDatabaseSensitivityLabels_ListByDatabase
+ ///
+ /// An OData filter expression that filters elements in the collection.
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetManagedDatabaseSensitivityLabelsByDatabaseAsync(string filter = null, CancellationToken cancellationToken = default)
+ {
+ async Task> FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _managedInstanceDatabaseSchemaTableColumnSensitivityLabelManagedDatabaseSensitivityLabelsClientDiagnostics.CreateScope("ManagedDatabaseResource.GetManagedDatabaseSensitivityLabelsByDatabase");
+ scope.Start();
+ try
+ {
+ var response = await _managedInstanceDatabaseSchemaTableColumnSensitivityLabelManagedDatabaseSensitivityLabelsRestClient.ListByDatabaseAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _managedInstanceDatabaseSchemaTableColumnSensitivityLabelManagedDatabaseSensitivityLabelsClientDiagnostics.CreateScope("ManagedDatabaseResource.GetManagedDatabaseSensitivityLabelsByDatabase");
+ scope.Start();
+ try
+ {
+ var response = await _managedInstanceDatabaseSchemaTableColumnSensitivityLabelManagedDatabaseSensitivityLabelsRestClient.ListByDatabaseNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ ///
+ /// Gets the sensitivity labels of a given database
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/sensitivityLabels
+ /// Operation Id: ManagedDatabaseSensitivityLabels_ListByDatabase
+ ///
+ /// An OData filter expression that filters elements in the collection.
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetManagedDatabaseSensitivityLabelsByDatabase(string filter = null, CancellationToken cancellationToken = default)
+ {
+ Page FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _managedInstanceDatabaseSchemaTableColumnSensitivityLabelManagedDatabaseSensitivityLabelsClientDiagnostics.CreateScope("ManagedDatabaseResource.GetManagedDatabaseSensitivityLabelsByDatabase");
+ scope.Start();
+ try
+ {
+ var response = _managedInstanceDatabaseSchemaTableColumnSensitivityLabelManagedDatabaseSensitivityLabelsRestClient.ListByDatabase(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _managedInstanceDatabaseSchemaTableColumnSensitivityLabelManagedDatabaseSensitivityLabelsClientDiagnostics.CreateScope("ManagedDatabaseResource.GetManagedDatabaseSensitivityLabelsByDatabase");
+ scope.Start();
+ try
+ {
+ var response = _managedInstanceDatabaseSchemaTableColumnSensitivityLabelManagedDatabaseSensitivityLabelsRestClient.ListByDatabaseNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new ManagedInstanceDatabaseSchemaTableColumnSensitivityLabelResource(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}/databases/{databaseName}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs
index 4ab5f289a8144..b3059a6698dfd 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 resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, SqlSku 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? restorePointInOn, 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, resourceType, systemData, tags, location)
+ /// The managed instance's service principal.
+ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, SqlSku 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? restorePointInOn, 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, resourceType, systemData, tags, location)
{
Identity = identity;
Sku = sku;
@@ -98,11 +100,13 @@ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType re
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 re
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 re
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/ManagedInstanceResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs
index 53709dc5ed893..b8e302dd45e3e 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs
@@ -531,6 +531,43 @@ public virtual Response GetRestorableD
return GetRestorableDroppedManagedDatabases().Get(restorableDroppedDatabaseId, cancellationToken);
}
+ /// Gets a collection of ManagedServerDnsAliasResources in the ManagedInstance.
+ /// An object representing collection of ManagedServerDnsAliasResources and their operations over a ManagedServerDnsAliasResource.
+ public virtual ManagedServerDnsAliasCollection GetManagedServerDnsAliases()
+ {
+ return GetCachedClient(Client => new ManagedServerDnsAliasCollection(Client, Id));
+ }
+
+ ///
+ /// Gets a server DNS alias.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}
+ /// Operation Id: ManagedServerDnsAliases_Get
+ ///
+ /// The String to use.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public virtual async Task> GetManagedServerDnsAliasAsync(string dnsAliasName, CancellationToken cancellationToken = default)
+ {
+ return await GetManagedServerDnsAliases().GetAsync(dnsAliasName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets a server DNS alias.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}
+ /// Operation Id: ManagedServerDnsAliases_Get
+ ///
+ /// The String to use.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public virtual Response GetManagedServerDnsAlias(string dnsAliasName, CancellationToken cancellationToken = default)
+ {
+ return GetManagedServerDnsAliases().Get(dnsAliasName, cancellationToken);
+ }
+
///
/// Gets a managed instance.
/// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
@@ -777,6 +814,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
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The requested TDE certificate to be created or updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task CreateManagedInstanceTdeCertificateAsync(WaitUntil waitUntil, TdeCertificate parameters, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(parameters, nameof(parameters));
+
+ using var scope = _managedInstanceTdeCertificatesClientDiagnostics.CreateScope("ManagedInstanceResource.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 (waitUntil == WaitUntil.Completed)
+ 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
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The requested TDE certificate to be created or updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation CreateManagedInstanceTdeCertificate(WaitUntil waitUntil, TdeCertificate parameters, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(parameters, nameof(parameters));
+
+ using var scope = _managedInstanceTdeCertificatesClientDiagnostics.CreateScope("ManagedInstanceResource.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 (waitUntil == WaitUntil.Completed)
+ 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("ManagedInstanceResource.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 ServerTrustGroupResource(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("ManagedInstanceResource.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 ServerTrustGroupResource(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("ManagedInstanceResource.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 ServerTrustGroupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page