diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupCollection.cs
new file mode 100644
index 0000000000000..5640d630c107d
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupCollection.cs
@@ -0,0 +1,333 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Sql
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetDistributedAvailabilityGroups method from an instance of .
+ ///
+ public partial class DistributedAvailabilityGroupCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _distributedAvailabilityGroupClientDiagnostics;
+ private readonly DistributedAvailabilityGroupsRestOperations _distributedAvailabilityGroupRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected DistributedAvailabilityGroupCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal DistributedAvailabilityGroupCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _distributedAvailabilityGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", DistributedAvailabilityGroupResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(DistributedAvailabilityGroupResource.ResourceType, out string distributedAvailabilityGroupApiVersion);
+ _distributedAvailabilityGroupRestClient = new DistributedAvailabilityGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, distributedAvailabilityGroupApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ManagedInstanceResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ManagedInstanceResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Creates a distributed availability group between Sql On-Prem and Sql Managed Instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_CreateOrUpdate
+ ///
+ /// "F:Azure.WaitUntil.Completed" if the method should wait to return until the long-running operation has completed on the service; "F:Azure.WaitUntil.Started" if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The distributed availability group name.
+ /// The distributed availability group info.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string distributedAvailabilityGroupName, DistributedAvailabilityGroupData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _distributedAvailabilityGroupRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, distributedAvailabilityGroupName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new SqlArmOperation(new DistributedAvailabilityGroupOperationSource(Client), _distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, distributedAvailabilityGroupName, data).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Creates a distributed availability group between Sql On-Prem and Sql Managed Instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_CreateOrUpdate
+ ///
+ /// "F:Azure.WaitUntil.Completed" if the method should wait to return until the long-running operation has completed on the service; "F:Azure.WaitUntil.Started" if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The distributed availability group name.
+ /// The distributed availability group info.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string distributedAvailabilityGroupName, DistributedAvailabilityGroupData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _distributedAvailabilityGroupRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, distributedAvailabilityGroupName, data, cancellationToken);
+ var operation = new SqlArmOperation(new DistributedAvailabilityGroupOperationSource(Client), _distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, distributedAvailabilityGroupName, data).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a distributed availability group info.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Get
+ ///
+ /// The distributed availability group name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string distributedAvailabilityGroupName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName));
+
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _distributedAvailabilityGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, distributedAvailabilityGroupName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DistributedAvailabilityGroupResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a distributed availability group info.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Get
+ ///
+ /// The distributed availability group name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string distributedAvailabilityGroupName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName));
+
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _distributedAvailabilityGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, distributedAvailabilityGroupName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DistributedAvailabilityGroupResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a list of a distributed availability groups in instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups
+ /// Operation Id: DistributedAvailabilityGroups_ListByInstance
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ async Task> FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.GetAll");
+ scope.Start();
+ try
+ {
+ var response = await _distributedAvailabilityGroupRestClient.ListByInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new DistributedAvailabilityGroupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.GetAll");
+ scope.Start();
+ try
+ {
+ var response = await _distributedAvailabilityGroupRestClient.ListByInstanceNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new DistributedAvailabilityGroupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ ///
+ /// Gets a list of a distributed availability groups in instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups
+ /// Operation Id: DistributedAvailabilityGroups_ListByInstance
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ Page FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.GetAll");
+ scope.Start();
+ try
+ {
+ var response = _distributedAvailabilityGroupRestClient.ListByInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new DistributedAvailabilityGroupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.GetAll");
+ scope.Start();
+ try
+ {
+ var response = _distributedAvailabilityGroupRestClient.ListByInstanceNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new DistributedAvailabilityGroupResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Get
+ ///
+ /// The distributed availability group name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string distributedAvailabilityGroupName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName));
+
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _distributedAvailabilityGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, distributedAvailabilityGroupName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Get
+ ///
+ /// The distributed availability group name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string distributedAvailabilityGroupName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName));
+
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _distributedAvailabilityGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, distributedAvailabilityGroupName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.cs
new file mode 100644
index 0000000000000..06d9c4fc49fee
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.cs
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.Sql.Models;
+
+namespace Azure.ResourceManager.Sql
+{
+ /// A class representing the DistributedAvailabilityGroup data model.
+ public partial class DistributedAvailabilityGroupData : ResourceData
+ {
+ /// Initializes a new instance of DistributedAvailabilityGroupData.
+ public DistributedAvailabilityGroupData()
+ {
+ }
+
+ /// Initializes a new instance of DistributedAvailabilityGroupData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The name of the target database.
+ /// The source endpoint.
+ /// The primary availability group name.
+ /// The secondary availability group name.
+ /// The replication mode of a distributed availability group. Parameter will be ignored during link creation.
+ /// The distributed availability group id.
+ /// The source replica id.
+ /// The target replica id.
+ /// The link state.
+ /// The last hardened lsn.
+ internal DistributedAvailabilityGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string targetDatabase, string sourceEndpoint, string primaryAvailabilityGroupName, string secondaryAvailabilityGroupName, ReplicationMode? replicationMode, Guid? distributedAvailabilityGroupId, Guid? sourceReplicaId, Guid? targetReplicaId, string linkState, string lastHardenedLsn) : base(id, name, resourceType, systemData)
+ {
+ TargetDatabase = targetDatabase;
+ SourceEndpoint = sourceEndpoint;
+ PrimaryAvailabilityGroupName = primaryAvailabilityGroupName;
+ SecondaryAvailabilityGroupName = secondaryAvailabilityGroupName;
+ ReplicationMode = replicationMode;
+ DistributedAvailabilityGroupId = distributedAvailabilityGroupId;
+ SourceReplicaId = sourceReplicaId;
+ TargetReplicaId = targetReplicaId;
+ LinkState = linkState;
+ LastHardenedLsn = lastHardenedLsn;
+ }
+
+ /// The name of the target database.
+ public string TargetDatabase { get; set; }
+ /// The source endpoint.
+ public string SourceEndpoint { get; set; }
+ /// The primary availability group name.
+ public string PrimaryAvailabilityGroupName { get; set; }
+ /// The secondary availability group name.
+ public string SecondaryAvailabilityGroupName { get; set; }
+ /// The replication mode of a distributed availability group. Parameter will be ignored during link creation.
+ public ReplicationMode? ReplicationMode { get; set; }
+ /// The distributed availability group id.
+ public Guid? DistributedAvailabilityGroupId { get; }
+ /// The source replica id.
+ public Guid? SourceReplicaId { get; }
+ /// The target replica id.
+ public Guid? TargetReplicaId { get; }
+ /// The link state.
+ public string LinkState { get; }
+ /// The last hardened lsn.
+ public string LastHardenedLsn { get; }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupResource.cs
new file mode 100644
index 0000000000000..95d1aef9c0b31
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupResource.cs
@@ -0,0 +1,249 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Sql
+{
+ ///
+ /// A Class representing a DistributedAvailabilityGroup along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetDistributedAvailabilityGroupResource method.
+ /// Otherwise you can get one from its parent resource using the GetDistributedAvailabilityGroup method.
+ ///
+ public partial class DistributedAvailabilityGroupResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _distributedAvailabilityGroupClientDiagnostics;
+ private readonly DistributedAvailabilityGroupsRestOperations _distributedAvailabilityGroupRestClient;
+ private readonly DistributedAvailabilityGroupData _data;
+
+ /// Initializes a new instance of the class for mocking.
+ protected DistributedAvailabilityGroupResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal DistributedAvailabilityGroupResource(ArmClient client, DistributedAvailabilityGroupData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal DistributedAvailabilityGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _distributedAvailabilityGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string distributedAvailabilityGroupApiVersion);
+ _distributedAvailabilityGroupRestClient = new DistributedAvailabilityGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, distributedAvailabilityGroupApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Sql/managedInstances/distributedAvailabilityGroups";
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual DistributedAvailabilityGroupData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Gets a distributed availability group info.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Get
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _distributedAvailabilityGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DistributedAvailabilityGroupResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a distributed availability group info.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Get
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _distributedAvailabilityGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DistributedAvailabilityGroupResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Drops a distributed availability group between Sql On-Prem and Sql Managed Instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Delete
+ ///
+ /// "F:Azure.WaitUntil.Completed" if the method should wait to return until the long-running operation has completed on the service; "F:Azure.WaitUntil.Started" if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _distributedAvailabilityGroupRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new SqlArmOperation(_distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Drops a distributed availability group between Sql On-Prem and Sql Managed Instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Delete
+ ///
+ /// "F:Azure.WaitUntil.Completed" if the method should wait to return until the long-running operation has completed on the service; "F:Azure.WaitUntil.Started" if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _distributedAvailabilityGroupRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new SqlArmOperation(_distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Updates a distributed availability group replication mode.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Update
+ ///
+ /// "F:Azure.WaitUntil.Completed" if the method should wait to return until the long-running operation has completed on the service; "F:Azure.WaitUntil.Started" if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The distributed availability group info.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, DistributedAvailabilityGroupData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _distributedAvailabilityGroupRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var operation = new SqlArmOperation(new DistributedAvailabilityGroupOperationSource(Client), _distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Updates a distributed availability group replication mode.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}
+ /// Operation Id: DistributedAvailabilityGroups_Update
+ ///
+ /// "F:Azure.WaitUntil.Completed" if the method should wait to return until the long-running operation has completed on the service; "F:Azure.WaitUntil.Started" if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The distributed availability group info.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, DistributedAvailabilityGroupData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _distributedAvailabilityGroupRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken);
+ var operation = new SqlArmOperation(new DistributedAvailabilityGroupOperationSource(Client), _distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs
index 669aedfb4f583..888bd7559fee6 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs
@@ -185,7 +185,7 @@ public virtual Response Get(string elasticPoolName, Cancell
/// The number of elements in the collection to skip.
/// The cancellation token to use.
/// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetAllAsync(int? skip = null, CancellationToken cancellationToken = default)
+ public virtual AsyncPageable GetAllAsync(long? skip = null, CancellationToken cancellationToken = default)
{
async Task> FirstPageFunc(int? pageSizeHint)
{
@@ -228,7 +228,7 @@ async Task> NextPageFunc(string nextLink, int? pageSiz
/// The number of elements in the collection to skip.
/// The cancellation token to use.
/// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetAll(int? skip = null, CancellationToken cancellationToken = default)
+ public virtual Pageable GetAll(long? skip = null, CancellationToken cancellationToken = default)
{
Page FirstPageFunc(int? pageSizeHint)
{
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolData.cs
index 016833416d727..d32f0b61af230 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolData.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolData.cs
@@ -47,7 +47,8 @@ public ElasticPoolData(AzureLocation location) : base(location)
/// Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones.
/// The license type to apply for this elastic pool.
/// Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur.
- internal ElasticPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SqlSku sku, string kind, ElasticPoolState? state, DateTimeOffset? creationOn, long? maxSizeBytes, ElasticPoolPerDatabaseSettings perDatabaseSettings, bool? zoneRedundant, ElasticPoolLicenseType? licenseType, string maintenanceConfigurationId) : base(id, name, resourceType, systemData, tags, location)
+ /// The number of secondary replicas associated with the elastic pool that are used to provide high availability.
+ internal ElasticPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SqlSku sku, string kind, ElasticPoolState? state, DateTimeOffset? creationOn, long? maxSizeBytes, ElasticPoolPerDatabaseSettings perDatabaseSettings, bool? zoneRedundant, ElasticPoolLicenseType? licenseType, string maintenanceConfigurationId, int? highAvailabilityReplicaCount) : base(id, name, resourceType, systemData, tags, location)
{
Sku = sku;
Kind = kind;
@@ -58,6 +59,7 @@ internal ElasticPoolData(ResourceIdentifier id, string name, ResourceType resour
ZoneRedundant = zoneRedundant;
LicenseType = licenseType;
MaintenanceConfigurationId = maintenanceConfigurationId;
+ HighAvailabilityReplicaCount = highAvailabilityReplicaCount;
}
///
@@ -87,5 +89,7 @@ internal ElasticPoolData(ResourceIdentifier id, string name, ResourceType resour
public ElasticPoolLicenseType? LicenseType { get; set; }
/// Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur.
public string MaintenanceConfigurationId { get; set; }
+ /// The number of secondary replicas associated with the elastic pool that are used to provide high availability.
+ public int? HighAvailabilityReplicaCount { get; set; }
}
}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateCollection.cs
new file mode 100644
index 0000000000000..3216e8bff1aac
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateCollection.cs
@@ -0,0 +1,267 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Sql
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get an instance call the GetEndpointCertificates method from an instance of .
+ ///
+ public partial class EndpointCertificateCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _endpointCertificateClientDiagnostics;
+ private readonly EndpointCertificatesRestOperations _endpointCertificateRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected EndpointCertificateCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal EndpointCertificateCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _endpointCertificateClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", EndpointCertificateResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(EndpointCertificateResource.ResourceType, out string endpointCertificateApiVersion);
+ _endpointCertificateRestClient = new EndpointCertificatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, endpointCertificateApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ManagedInstanceResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ManagedInstanceResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Gets a certificate used on the endpoint with the given id.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}
+ /// Operation Id: EndpointCertificates_Get
+ ///
+ /// Type of the endpoint whose certificate the customer is looking for.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string endpointType, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(endpointType, nameof(endpointType));
+
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _endpointCertificateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new EndpointCertificateResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a certificate used on the endpoint with the given id.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}
+ /// Operation Id: EndpointCertificates_Get
+ ///
+ /// Type of the endpoint whose certificate the customer is looking for.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string endpointType, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(endpointType, nameof(endpointType));
+
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _endpointCertificateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new EndpointCertificateResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List certificates used on endpoints on the target instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates
+ /// Operation Id: EndpointCertificates_ListByInstance
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ async Task> FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateCollection.GetAll");
+ scope.Start();
+ try
+ {
+ var response = await _endpointCertificateRestClient.ListByInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new EndpointCertificateResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateCollection.GetAll");
+ scope.Start();
+ try
+ {
+ var response = await _endpointCertificateRestClient.ListByInstanceNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value.Select(value => new EndpointCertificateResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ ///
+ /// List certificates used on endpoints on the target instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates
+ /// Operation Id: EndpointCertificates_ListByInstance
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ Page FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateCollection.GetAll");
+ scope.Start();
+ try
+ {
+ var response = _endpointCertificateRestClient.ListByInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new EndpointCertificateResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateCollection.GetAll");
+ scope.Start();
+ try
+ {
+ var response = _endpointCertificateRestClient.ListByInstanceNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken);
+ return Page.FromValues(response.Value.Value.Select(value => new EndpointCertificateResource(Client, value)), response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}
+ /// Operation Id: EndpointCertificates_Get
+ ///
+ /// Type of the endpoint whose certificate the customer is looking for.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string endpointType, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(endpointType, nameof(endpointType));
+
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _endpointCertificateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}
+ /// Operation Id: EndpointCertificates_Get
+ ///
+ /// Type of the endpoint whose certificate the customer is looking for.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string endpointType, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(endpointType, nameof(endpointType));
+
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _endpointCertificateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateData.cs
new file mode 100644
index 0000000000000..64845a6fe7cca
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateData.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure.Core;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Sql
+{
+ /// A class representing the EndpointCertificate data model.
+ public partial class EndpointCertificateData : ResourceData
+ {
+ /// Initializes a new instance of EndpointCertificateData.
+ public EndpointCertificateData()
+ {
+ }
+
+ /// Initializes a new instance of EndpointCertificateData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The certificate public blob.
+ internal EndpointCertificateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string publicBlob) : base(id, name, resourceType, systemData)
+ {
+ PublicBlob = publicBlob;
+ }
+
+ /// The certificate public blob.
+ public string PublicBlob { get; set; }
+ }
+}
diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.cs
new file mode 100644
index 0000000000000..7bae5b94fbad0
--- /dev/null
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.cs
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Sql
+{
+ ///
+ /// A Class representing an EndpointCertificate along with the instance operations that can be performed on it.
+ /// If you have a you can construct an
+ /// from an instance of using the GetEndpointCertificateResource method.
+ /// Otherwise you can get one from its parent resource using the GetEndpointCertificate method.
+ ///
+ public partial class EndpointCertificateResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string managedInstanceName, string endpointType)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _endpointCertificateClientDiagnostics;
+ private readonly EndpointCertificatesRestOperations _endpointCertificateRestClient;
+ private readonly EndpointCertificateData _data;
+
+ /// Initializes a new instance of the class for mocking.
+ protected EndpointCertificateResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal EndpointCertificateResource(ArmClient client, EndpointCertificateData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal EndpointCertificateResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _endpointCertificateClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string endpointCertificateApiVersion);
+ _endpointCertificateRestClient = new EndpointCertificatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, endpointCertificateApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Sql/managedInstances/endpointCertificates";
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual EndpointCertificateData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Gets a certificate used on the endpoint with the given id.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}
+ /// Operation Id: EndpointCertificates_Get
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _endpointCertificateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new EndpointCertificateResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a certificate used on the endpoint with the given id.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}
+ /// Operation Id: EndpointCertificates_Get
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _endpointCertificateClientDiagnostics.CreateScope("EndpointCertificateResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _endpointCertificateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new EndpointCertificateResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
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 ffc1931565c50..e6c12a33141a2 100644
--- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs
+++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs
@@ -74,6 +74,96 @@ 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.
+ 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.
+ 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.
+ 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.
+ 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.
@@ -180,96 +270,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.
- 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.
- 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.
- 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.
- 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
@@ -359,157 +359,131 @@ public static Response GetByLocationCapability(this Subscr
}
///
- /// 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 instance the method will execute against.
- /// The location of the database.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The name of the region where the resource is located.
/// The cancellation token to use.
/// 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 GetLongTermRetentionBackupsByLocationAsync(this SubscriptionResource subscriptionResource, 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 static AsyncPageable GetSyncDatabaseIdsSyncGroupsAsync(this SubscriptionResource subscriptionResource, string locationName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- return GetExtensionClient(subscriptionResource).GetLongTermRetentionBackupsByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetSyncDatabaseIdsSyncGroupsAsync(locationName, cancellationToken);
}
///
- /// 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 instance the method will execute against.
- /// The location of the database.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The name of the region where the resource is located.
/// The cancellation token to use.
/// 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 GetLongTermRetentionBackupsByLocation(this SubscriptionResource subscriptionResource, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// 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).GetLongTermRetentionBackupsByLocation(locationName, onlyLatestPerDatabase, databaseState, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetSyncDatabaseIdsSyncGroups(locationName, cancellationToken);
}
///
- /// 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 instance the method will execute against.
- /// The location of the database.
- /// The name of the server.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetLongTermRetentionBackupsByServerAsync(this SubscriptionResource subscriptionResource, 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 static AsyncPageable GetVirtualClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- Argument.AssertNotNullOrEmpty(longTermRetentionServerName, nameof(longTermRetentionServerName));
-
- return GetExtensionClient(subscriptionResource).GetLongTermRetentionBackupsByServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetVirtualClustersAsync(cancellationToken);
}
///
- /// 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 instance the method will execute against.
- /// The location of the database.
- /// The name of the server.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetLongTermRetentionBackupsByServer(this SubscriptionResource subscriptionResource, 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 static Pageable GetVirtualClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- Argument.AssertNotNullOrEmpty(longTermRetentionServerName, nameof(longTermRetentionServerName));
-
- return GetExtensionClient(subscriptionResource).GetLongTermRetentionBackupsByServer(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetVirtualClusters(cancellationToken);
}
///
- /// 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 instance the method will execute against.
- /// The location of the database.
- /// The name of the managed instance.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The child resources to include in the response.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetLongTermRetentionManagedInstanceBackupsByInstanceAsync(this SubscriptionResource subscriptionResource, 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 static AsyncPageable GetSqlServersAsync(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName));
+ return GetExtensionClient(subscriptionResource).GetSqlServersAsync(expand, cancellationToken);
+ }
- return GetExtensionClient(subscriptionResource).GetLongTermRetentionManagedInstanceBackupsByInstanceAsync(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, 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);
}
///
- /// 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
+ /// 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 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 name availability request parameters.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetLongTermRetentionManagedInstanceBackupsByInstance(this SubscriptionResource subscriptionResource, string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// is null.
+ public static async Task> CheckNameAvailabilityServerAsync(this SubscriptionResource subscriptionResource, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName));
+ Argument.AssertNotNull(parameters, nameof(parameters));
- return GetExtensionClient(subscriptionResource).GetLongTermRetentionManagedInstanceBackupsByInstance(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken);
+ return await GetExtensionClient(subscriptionResource).CheckNameAvailabilityServerAsync(parameters, cancellationToken).ConfigureAwait(false);
}
///
- /// 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 instance the method will execute against.
- /// The location of the database.
- /// Whether or not to only get the latest backup for each database.
- /// Whether to query against just live databases, just deleted databases, or all databases.
+ /// The name availability request parameters.
/// The cancellation token to use.
- /// 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 GetLongTermRetentionManagedInstanceBackupsByLocationAsync(this SubscriptionResource subscriptionResource, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
+ /// is null.
+ public static Response CheckNameAvailabilityServer(this SubscriptionResource subscriptionResource, CheckNameAvailabilityRequest parameters, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+ Argument.AssertNotNull(parameters, nameof(parameters));
- return GetExtensionClient(subscriptionResource).GetLongTermRetentionManagedInstanceBackupsByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, cancellationToken);
+ return GetExtensionClient(subscriptionResource).CheckNameAvailabilityServer(parameters, cancellationToken);
}
///
- /// 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
+ /// 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 instance the method will execute against.
/// The location of the database.
@@ -518,198 +492,188 @@ public static AsyncPageable 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 GetLongTermRetentionManagedInstanceBackupsByLocation(this SubscriptionResource subscriptionResource, 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 static AsyncPageable GetLongTermRetentionBackupsByLocationAsync(this SubscriptionResource subscriptionResource, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- return GetExtensionClient(subscriptionResource).GetLongTermRetentionManagedInstanceBackupsByLocation(locationName, onlyLatestPerDatabase, databaseState, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetLongTermRetentionBackupsByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, cancellationToken);
}
///
- /// 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 instance the method will execute against.
- /// The child resources to include in the response.
+ /// The location of the database.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetManagedInstancesAsync(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default)
+ /// 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 GetLongTermRetentionBackupsByLocation(this SubscriptionResource subscriptionResource, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- return GetExtensionClient(subscriptionResource).GetManagedInstancesAsync(expand, cancellationToken);
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+
+ return GetExtensionClient(subscriptionResource).GetLongTermRetentionBackupsByLocation(locationName, onlyLatestPerDatabase, databaseState, cancellationToken);
}
///
- /// 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 server.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
+ /// Operation Id: LongTermRetentionBackups_ListByServer
///
/// The instance the method will execute against.
- /// The child resources to include in the response.
+ /// 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 static Pageable GetManagedInstances(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetLongTermRetentionBackupsByServerAsync(this SubscriptionResource subscriptionResource, string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- return GetExtensionClient(subscriptionResource).GetManagedInstances(expand, cancellationToken);
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+ Argument.AssertNotNullOrEmpty(longTermRetentionServerName, nameof(longTermRetentionServerName));
+
+ return GetExtensionClient(subscriptionResource).GetLongTermRetentionBackupsByServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken);
}
///
- /// 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 instance the method will execute against.
- /// The name of the region where the resource is located.
+ /// The location of the database.
+ /// The name of the server.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
- /// 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)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetLongTermRetentionBackupsByServer(this SubscriptionResource subscriptionResource, string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+ Argument.AssertNotNullOrEmpty(longTermRetentionServerName, nameof(longTermRetentionServerName));
- return GetExtensionClient(subscriptionResource).GetOperationsHealthsByLocationAsync(locationName, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetLongTermRetentionBackupsByServer(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken);
}
///
- /// 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 managed instance.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups
+ /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByInstance
///
/// The instance the method will execute against.
- /// The name of the region where the resource is located.
+ /// The location of the database.
+ /// The name of the managed instance.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
- /// 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)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetLongTermRetentionManagedInstanceBackupsByInstanceAsync(this SubscriptionResource subscriptionResource, string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+ Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName));
- return GetExtensionClient(subscriptionResource).GetOperationsHealthsByLocation(locationName, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetLongTermRetentionManagedInstanceBackupsByInstanceAsync(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken);
}
///
- /// 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 instance the method will execute against.
- /// The name of the region where the resource is located.
+ /// The location of the database.
+ /// The name of the managed instance.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
- /// 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.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetLongTermRetentionManagedInstanceBackupsByInstance(this SubscriptionResource subscriptionResource, string locationName, string managedInstanceName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+ Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName));
- return GetExtensionClient(subscriptionResource).GetSyncDatabaseIdsSyncGroupsAsync(locationName, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetLongTermRetentionManagedInstanceBackupsByInstance(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, cancellationToken);
}
///
- /// 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 managed databases in a given location.
+ /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups
+ /// Operation Id: LongTermRetentionManagedInstanceBackups_ListByLocation
///
/// The instance the method will execute against.
- /// The name of the region where the resource is located.
+ /// 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.
/// 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)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetLongTermRetentionManagedInstanceBackupsByLocationAsync(this SubscriptionResource subscriptionResource, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- return GetExtensionClient(subscriptionResource).GetSyncDatabaseIdsSyncGroups(locationName, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetLongTermRetentionManagedInstanceBackupsByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, cancellationToken);
}
///
- /// 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 instance the method will execute against.
+ /// The location of the database.
+ /// Whether or not to only get the latest backup for each database.
+ /// Whether to query against just live databases, just deleted databases, or all databases.
/// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetVirtualClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ /// 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 GetLongTermRetentionManagedInstanceBackupsByLocation(this SubscriptionResource subscriptionResource, string locationName, bool? onlyLatestPerDatabase = null, DatabaseState? databaseState = null, CancellationToken cancellationToken = default)
{
- return GetExtensionClient(subscriptionResource).GetVirtualClustersAsync(cancellationToken);
- }
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- ///
- /// 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);
+ return GetExtensionClient(subscriptionResource).GetLongTermRetentionManagedInstanceBackupsByLocation(locationName, onlyLatestPerDatabase, databaseState, cancellationToken);
}
///
- /// 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 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)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetManagedInstancesAsync(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default)
{
- return GetExtensionClient(subscriptionResource).GetSqlServersAsync(expand, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetManagedInstancesAsync(expand, cancellationToken);
}
///
- /// 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 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)
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetManagedInstances(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(parameters, nameof(parameters));
-
- return GetExtensionClient(subscriptionResource).CheckNameAvailabilityServer(parameters, cancellationToken);
+ return GetExtensionClient(subscriptionResource).GetManagedInstances(expand, cancellationToken);
}
private static ResourceGroupResourceExtensionClient GetExtensionClient(ResourceGroupResource resourceGroupResource)
@@ -804,273 +768,273 @@ public static Response GetInstancePool(this ResourceGroupR
return resourceGroupResource.GetInstancePools().Get(instancePoolName, cancellationToken);
}
- /// Gets a collection of ResourceGroupLongTermRetentionBackupResources in the ResourceGroupResource.
+ /// Gets a collection of ServerTrustGroupResources in the ResourceGroupResource.
/// The instance the method will execute against.
- /// The location of the database.
- /// The name of the server.
- /// The name of the database.
- /// , or is an empty string, and was expected to be non-empty.
- /// , or is null.
- /// An object representing collection of ResourceGroupLongTermRetentionBackupResources and their operations over a ResourceGroupLongTermRetentionBackupResource.
- public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLongTermRetentionBackups(this ResourceGroupResource resourceGroupResource, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName)
+ /// 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));
- Argument.AssertNotNullOrEmpty(longTermRetentionServerName, nameof(longTermRetentionServerName));
- Argument.AssertNotNullOrEmpty(longTermRetentionDatabaseName, nameof(longTermRetentionDatabaseName));
- return GetExtensionClient(resourceGroupResource).GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName);
+ return GetExtensionClient(resourceGroupResource).GetServerTrustGroups(locationName);
}
///
- /// Gets a long term retention backup.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}
- /// Operation Id: LongTermRetentionBackups_GetByResourceGroup
+ /// 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 location of the database.
- /// The name of the server.
- /// The name of the database.
- /// The backup name.
+ /// 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.
- public static async Task> GetResourceGroupLongTermRetentionBackupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public static async Task> GetServerTrustGroupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string serverTrustGroupName, CancellationToken cancellationToken = default)
{
- return await resourceGroupResource.GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName).GetAsync(backupName, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetServerTrustGroups(locationName).GetAsync(serverTrustGroupName, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a long term retention backup.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}
- /// Operation Id: LongTermRetentionBackups_GetByResourceGroup
+ /// 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 location of the database.
- /// The name of the server.
- /// The name of the database.
- /// The backup name.
+ /// 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.
- public static Response GetResourceGroupLongTermRetentionBackup(this ResourceGroupResource resourceGroupResource, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public static Response GetServerTrustGroup(this ResourceGroupResource resourceGroupResource, string locationName, string serverTrustGroupName, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName).Get(backupName, cancellationToken);
+ return resourceGroupResource.GetServerTrustGroups(locationName).Get(serverTrustGroupName, cancellationToken);
}
- /// Gets a collection of ResourceGroupLongTermRetentionManagedInstanceBackupResources in the ResourceGroupResource.
+ /// Gets a collection of VirtualClusterResources in the ResourceGroupResource.
/// The instance the method will execute against.
- /// The location of the database.
- /// The name of the managed instance.
- /// The name of the managed database.
- /// , or is an empty string, and was expected to be non-empty.
- /// , or is null.
- /// An object representing collection of ResourceGroupLongTermRetentionManagedInstanceBackupResources and their operations over a ResourceGroupLongTermRetentionManagedInstanceBackupResource.
- public static ResourceGroupLongTermRetentionManagedInstanceBackupCollection GetResourceGroupLongTermRetentionManagedInstanceBackups(this ResourceGroupResource resourceGroupResource, string locationName, string managedInstanceName, string databaseName)
+ /// An object representing collection of VirtualClusterResources and their operations over a VirtualClusterResource.
+ public static VirtualClusterCollection GetVirtualClusters(this ResourceGroupResource resourceGroupResource)
{
- Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
- Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName));
- Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
-
- return GetExtensionClient(resourceGroupResource).GetResourceGroupLongTermRetentionManagedInstanceBackups(locationName, managedInstanceName, databaseName);
+ return GetExtensionClient(resourceGroupResource).GetVirtualClusters();
}
///
- /// Gets a long term retention backup for a managed database.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}
- /// Operation Id: LongTermRetentionManagedInstanceBackups_GetByResourceGroup
+ /// 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 location of the database.
- /// The name of the managed instance.
- /// The name of the managed database.
- /// The backup name.
+ /// 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.
- public static async Task> GetResourceGroupLongTermRetentionManagedInstanceBackupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string managedInstanceName, string databaseName, string backupName, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public static async Task> GetVirtualClusterAsync(this ResourceGroupResource resourceGroupResource, string virtualClusterName, CancellationToken cancellationToken = default)
{
- return await resourceGroupResource.GetResourceGroupLongTermRetentionManagedInstanceBackups(locationName, managedInstanceName, databaseName).GetAsync(backupName, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetVirtualClusters().GetAsync(virtualClusterName, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a long term retention backup for a managed database.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}
- /// Operation Id: LongTermRetentionManagedInstanceBackups_GetByResourceGroup
+ /// 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 location of the database.
- /// The name of the managed instance.
- /// The name of the managed database.
- /// The backup name.
+ /// 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.
- public static Response GetResourceGroupLongTermRetentionManagedInstanceBackup(this ResourceGroupResource resourceGroupResource, string locationName, string managedInstanceName, string databaseName, string backupName, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public static Response GetVirtualCluster(this ResourceGroupResource resourceGroupResource, string virtualClusterName, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetResourceGroupLongTermRetentionManagedInstanceBackups(locationName, managedInstanceName, databaseName).Get(backupName, cancellationToken);
+ return resourceGroupResource.GetVirtualClusters().Get(virtualClusterName, cancellationToken);
}
- /// Gets a collection of ManagedInstanceResources in the ResourceGroupResource.
+ /// Gets a collection of SqlServerResources in the ResourceGroupResource.
/// The instance the method will execute against.
- /// An object representing collection of ManagedInstanceResources and their operations over a ManagedInstanceResource.
- public static ManagedInstanceCollection GetManagedInstances(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).GetManagedInstances();
+ return GetExtensionClient(resourceGroupResource).GetSqlServers();
}
///
- /// Gets a managed instance.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
- /// Operation Id: ManagedInstances_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 managed instance.
+ /// 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.
- public static async Task> GetManagedInstanceAsync(this ResourceGroupResource resourceGroupResource, string managedInstanceName, string expand = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public static async Task> GetSqlServerAsync(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default)
{
- return await resourceGroupResource.GetManagedInstances().GetAsync(managedInstanceName, expand, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetSqlServers().GetAsync(serverName, expand, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a managed instance.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
- /// Operation Id: ManagedInstances_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 managed instance.
+ /// 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.
- public static Response GetManagedInstance(this ResourceGroupResource resourceGroupResource, string managedInstanceName, string expand = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public static Response GetSqlServer(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetManagedInstances().Get(managedInstanceName, expand, cancellationToken);
+ return resourceGroupResource.GetSqlServers().Get(serverName, expand, cancellationToken);
}
- /// Gets a collection of ServerTrustGroupResources in the ResourceGroupResource.
+ /// Gets a collection of ResourceGroupLongTermRetentionBackupResources 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)
+ /// The location of the database.
+ /// The name of the server.
+ /// The name of the database.
+ /// , or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ /// An object representing collection of ResourceGroupLongTermRetentionBackupResources and their operations over a ResourceGroupLongTermRetentionBackupResource.
+ public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLongTermRetentionBackups(this ResourceGroupResource resourceGroupResource, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName)
{
Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+ Argument.AssertNotNullOrEmpty(longTermRetentionServerName, nameof(longTermRetentionServerName));
+ Argument.AssertNotNullOrEmpty(longTermRetentionDatabaseName, nameof(longTermRetentionDatabaseName));
- return GetExtensionClient(resourceGroupResource).GetServerTrustGroups(locationName);
+ return GetExtensionClient(resourceGroupResource).GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName);
}
///
- /// Gets a server trust group.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}
- /// Operation Id: ServerTrustGroups_Get
+ /// Gets a long term retention backup.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}
+ /// Operation Id: LongTermRetentionBackups_GetByResourceGroup
///
/// 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 location of the database.
+ /// The name of the server.
+ /// The name of the database.
+ /// The backup name.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- public static async Task> GetServerTrustGroupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string serverTrustGroupName, CancellationToken cancellationToken = default)
+ /// , , or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static async Task> GetResourceGroupLongTermRetentionBackupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default)
{
- return await resourceGroupResource.GetServerTrustGroups(locationName).GetAsync(serverTrustGroupName, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName).GetAsync(backupName, 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
+ /// Gets a long term retention backup.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}
+ /// Operation Id: LongTermRetentionBackups_GetByResourceGroup
///
/// 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.
- public static Response GetServerTrustGroup(this ResourceGroupResource resourceGroupResource, string locationName, string serverTrustGroupName, CancellationToken cancellationToken = default)
+ /// The location of the database.
+ /// The name of the server.
+ /// The name of the database.
+ /// The backup name.
+ /// The cancellation token to use.
+ /// , , or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static Response GetResourceGroupLongTermRetentionBackup(this ResourceGroupResource resourceGroupResource, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetServerTrustGroups(locationName).Get(serverTrustGroupName, cancellationToken);
+ return resourceGroupResource.GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName).Get(backupName, cancellationToken);
}
- /// Gets a collection of VirtualClusterResources in the ResourceGroupResource.
+ /// Gets a collection of ResourceGroupLongTermRetentionManagedInstanceBackupResources 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)
+ /// The location of the database.
+ /// The name of the managed instance.
+ /// The name of the managed database.
+ /// , or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ /// An object representing collection of ResourceGroupLongTermRetentionManagedInstanceBackupResources and their operations over a ResourceGroupLongTermRetentionManagedInstanceBackupResource.
+ public static ResourceGroupLongTermRetentionManagedInstanceBackupCollection GetResourceGroupLongTermRetentionManagedInstanceBackups(this ResourceGroupResource resourceGroupResource, string locationName, string managedInstanceName, string databaseName)
{
- return GetExtensionClient(resourceGroupResource).GetVirtualClusters();
+ Argument.AssertNotNullOrEmpty(locationName, nameof(locationName));
+ Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName));
+ Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
+
+ return GetExtensionClient(resourceGroupResource).GetResourceGroupLongTermRetentionManagedInstanceBackups(locationName, managedInstanceName, databaseName);
}
///
- /// Gets a virtual cluster.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}
- /// Operation Id: VirtualClusters_Get
+ /// Gets a long term retention backup for a managed database.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}
+ /// Operation Id: LongTermRetentionManagedInstanceBackups_GetByResourceGroup
///
/// The instance the method will execute against.
- /// The name of the virtual cluster.
+ /// The location of the database.
+ /// The name of the managed instance.
+ /// The name of the managed database.
+ /// The backup name.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- public static async Task> GetVirtualClusterAsync(this ResourceGroupResource resourceGroupResource, string virtualClusterName, CancellationToken cancellationToken = default)
+ /// , , or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static async Task> GetResourceGroupLongTermRetentionManagedInstanceBackupAsync(this ResourceGroupResource resourceGroupResource, string locationName, string managedInstanceName, string databaseName, string backupName, CancellationToken cancellationToken = default)
{
- return await resourceGroupResource.GetVirtualClusters().GetAsync(virtualClusterName, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetResourceGroupLongTermRetentionManagedInstanceBackups(locationName, managedInstanceName, databaseName).GetAsync(backupName, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a virtual cluster.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}
- /// Operation Id: VirtualClusters_Get
+ /// Gets a long term retention backup for a managed database.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}
+ /// Operation Id: LongTermRetentionManagedInstanceBackups_GetByResourceGroup
///
/// The instance the method will execute against.
- /// The name of the virtual cluster.
+ /// The location of the database.
+ /// The name of the managed instance.
+ /// The name of the managed database.
+ /// The backup name.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- public static Response GetVirtualCluster(this ResourceGroupResource resourceGroupResource, string virtualClusterName, CancellationToken cancellationToken = default)
+ /// , , or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static Response GetResourceGroupLongTermRetentionManagedInstanceBackup(this ResourceGroupResource resourceGroupResource, string locationName, string managedInstanceName, string databaseName, string backupName, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetVirtualClusters().Get(virtualClusterName, cancellationToken);
+ return resourceGroupResource.GetResourceGroupLongTermRetentionManagedInstanceBackups(locationName, managedInstanceName, databaseName).Get(backupName, cancellationToken);
}
- /// Gets a collection of SqlServerResources in the ResourceGroupResource.
+ /// Gets a collection of ManagedInstanceResources 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)
+ /// An object representing collection of ManagedInstanceResources and their operations over a ManagedInstanceResource.
+ public static ManagedInstanceCollection GetManagedInstances(this ResourceGroupResource resourceGroupResource)
{
- return GetExtensionClient(resourceGroupResource).GetSqlServers();
+ return GetExtensionClient(resourceGroupResource).GetManagedInstances();
}
///
- /// Gets a server.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}
- /// Operation Id: Servers_Get
+ /// Gets a managed instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
+ /// Operation Id: ManagedInstances_Get
///
/// The instance the method will execute against.
- /// The name of the server.
+ /// The name of the managed instance.
/// 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.
- public static async Task> GetSqlServerAsync(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public static async Task> GetManagedInstanceAsync(this ResourceGroupResource resourceGroupResource, string managedInstanceName, string expand = null, CancellationToken cancellationToken = default)
{
- return await resourceGroupResource.GetSqlServers().GetAsync(serverName, expand, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetManagedInstances().GetAsync(managedInstanceName, expand, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a server.
- /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}
- /// Operation Id: Servers_Get
+ /// Gets a managed instance.
+ /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}
+ /// Operation Id: ManagedInstances_Get
///
/// The instance the method will execute against.
- /// The name of the server.
+ /// The name of the managed instance.
/// 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.
- public static Response GetSqlServer(this ResourceGroupResource resourceGroupResource, string serverName, string expand = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public static Response GetManagedInstance(this ResourceGroupResource resourceGroupResource, string managedInstanceName, string expand = null, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetSqlServers().Get(serverName, expand, cancellationToken);
+ return resourceGroupResource.GetManagedInstances().Get(managedInstanceName, expand, cancellationToken);
}
///
@@ -1336,25 +1300,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.
@@ -2115,82 +2060,6 @@ public static JobVersionResource GetJobVersionResource(this ArmClient client, Re
}
#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 LongTermRetentionPolicyResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -2343,44 +2212,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.
@@ -2526,46 +2357,27 @@ public static ManagedInstancePrivateEndpointConnectionResource GetManagedInstanc
{
return client.GetResourceClient(() =>
{
- ManagedInstancePrivateEndpointConnectionResource.ValidateResourceId(id);
- return new ManagedInstancePrivateEndpointConnectionResource(client, id);
- }
- );
- }
- #endregion
-
- #region ManagedInstancePrivateLinkResource
- ///
- /// 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 ManagedInstancePrivateLinkResource GetManagedInstancePrivateLinkResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- ManagedInstancePrivateLinkResource.ValidateResourceId(id);
- return new ManagedInstancePrivateLinkResource(client, id);
+ ManagedInstancePrivateEndpointConnectionResource.ValidateResourceId(id);
+ return new ManagedInstancePrivateEndpointConnectionResource(client, id);
}
);
}
#endregion
- #region ManagedInstanceResource
+ #region ManagedInstancePrivateLinkResource
///
- /// 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 ManagedInstanceResource GetManagedInstanceResource(this ArmClient client, ResourceIdentifier id)
+ /// Returns a object.
+ public static ManagedInstancePrivateLinkResource GetManagedInstancePrivateLinkResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
- ManagedInstanceResource.ValidateResourceId(id);
- return new ManagedInstanceResource(client, id);
+ ManagedInstancePrivateLinkResource.ValidateResourceId(id);
+ return new ManagedInstancePrivateLinkResource(client, id);
}
);
}
@@ -3122,6 +2934,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.
@@ -3160,39 +3086,172 @@ 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 DistributedAvailabilityGroupResource
///
- /// 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 DistributedAvailabilityGroupResource GetDistributedAvailabilityGroupResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
- ServerConnectionPolicyResource.ValidateResourceId(id);
- return new ServerConnectionPolicyResource(client, id);
+ DistributedAvailabilityGroupResource.ValidateResourceId(id);
+ return new DistributedAvailabilityGroupResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region ServerTrustCertificateResource
+ ///
+ /// 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 ServerTrustCertificateResource GetServerTrustCertificateResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ ServerTrustCertificateResource.ValidateResourceId(id);
+ return new ServerTrustCertificateResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region IPv6FirewallRuleResource
+ ///
+ /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
+ /// You can use to create an from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static IPv6FirewallRuleResource GetIPv6FirewallRuleResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ IPv6FirewallRuleResource.ValidateResourceId(id);
+ return new IPv6FirewallRuleResource(client, id);
+ }
+ );
+ }
+ #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 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);
+ }
+ );
+ }
+ #endregion
+
+ #region EndpointCertificateResource
+ ///
+ /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
+ /// You can use to create an from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static EndpointCertificateResource GetEndpointCertificateResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ EndpointCertificateResource.ValidateResourceId(id);
+ return new EndpointCertificateResource(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