diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln
new file mode 100644
index 000000000000..fecd2294f9aa
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln
@@ -0,0 +1,65 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30309.148
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.DatabaseFleetManager", "src\Azure.ResourceManager.DatabaseFleetManager.csproj", "{848F28F3-DA60-4234-A348-872B4D46BDF2}"
+EndProject
+Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.DatabaseFleetManager.Tests", "tests\Azure.ResourceManager.DatabaseFleetManager.Tests.csproj", "{BAFD4CFA-48E6-4408-8054-0C62C3B2196D}"
+EndProject
+Project("{1AD596F6-F64F-497A-A3D6-A6B8AB08A680}") = "Azure.ResourceManager.DatabaseFleetManager.Samples", "samples\Azure.ResourceManager.DatabaseFleetManager.Samples.csproj", "{AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}"
+EndProject
+Global
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A6FFC348-C044-4BD3-BAA3-D3DFA56A5D85}
+ EndGlobalSection
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|x64.Build.0 = Debug|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Debug|x86.Build.0 = Debug|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|x64.ActiveCfg = Release|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|x64.Build.0 = Release|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|x86.ActiveCfg = Release|Any CPU
+ {848F28F3-DA60-4234-A348-872B4D46BDF2}.Release|x86.Build.0 = Release|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|x64.Build.0 = Debug|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Debug|x86.Build.0 = Debug|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|x64.ActiveCfg = Release|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|x64.Build.0 = Release|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|x86.ActiveCfg = Release|Any CPU
+ {BAFD4CFA-48E6-4408-8054-0C62C3B2196D}.Release|x86.Build.0 = Release|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|x64.Build.0 = Debug|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Debug|x86.Build.0 = Debug|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|x64.ActiveCfg = Release|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|x64.Build.0 = Release|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|x86.ActiveCfg = Release|Any CPU
+ {AB50CDAA-32F7-484A-A1B8-CAB0E95B8E33}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md
new file mode 100644
index 000000000000..d96467959e81
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md
@@ -0,0 +1,17 @@
+# Release History
+
+## 1.0.0-beta.1 (2023-09-26)
+
+### General New Features
+
+This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities:
+
+ - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET.
+ - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
+ - HTTP pipeline with custom policies.
+ - Better error-handling.
+ - Support uniform telemetry across all languages.
+
+This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues).
+
+> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet).
\ No newline at end of file
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props
new file mode 100644
index 000000000000..1a9611bd4924
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/README.md b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/README.md
new file mode 100644
index 000000000000..36589e5302a9
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/README.md
@@ -0,0 +1,80 @@
+# Microsoft Azure Database Fleet Manager management client library for .NET
+
+Azure Database Fleet Manager empowers Azure SQL customers who have adopted database scale-out to achieve more by simplifying implementation and operation.
+
+This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities:
+
+ - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET.
+ - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
+ - HTTP pipeline with custom policies.
+ - Better error-handling.
+ - Support uniform telemetry across all languages.
+
+## Getting started
+
+### Install the package
+
+Install the Microsoft Azure Fleet management library for .NET with [NuGet](https://www.nuget.org/):
+
+```dotnetcli
+dotnet add package Azure.ResourceManager.DatabaseFleetManager --prerelease
+```
+
+### Prerequisites
+
+* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/).
+
+### Authenticate the Client
+
+To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+
+## Key concepts
+
+Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html)
+
+## Documentation
+
+Documentation is available to help you learn how to use this package:
+
+- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet).
+- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md).
+
+## Examples
+
+Code samples for using the management library for .NET can be found in the following locations
+- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples)
+
+## Troubleshooting
+
+- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues).
+- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags.
+
+## Next steps
+
+For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/).
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing
+guide][cg].
+
+This project welcomes contributions and suggestions. Most contributions
+require you to agree to a Contributor License Agreement (CLA) declaring
+that you have the right to, and actually do, grant us the rights to use
+your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine
+whether you need to provide a CLA and decorate the PR appropriately
+(for example, label, comment). Follow the instructions provided by the
+bot. You'll only need to do this action once across all repositories
+using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For
+more information, see the [Code of Conduct FAQ][coc_faq] or contact
+ with any other questions or comments.
+
+
+[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
\ No newline at end of file
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs
new file mode 100644
index 000000000000..a31cbdfb9281
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs
@@ -0,0 +1,403 @@
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ public partial class DatabaseFleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable
+ {
+ protected DatabaseFleetCollection() { }
+ public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Exists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.NullableResponse GetIfExists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; }
+ System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; }
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+ }
+ public partial class DatabaseFleetData : Azure.ResourceManager.Models.TrackedResourceData
+ {
+ public DatabaseFleetData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { }
+ public Azure.ETag? ETag { get { throw null; } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile HubProfile { get { throw null; } set { } }
+ public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState? ProvisioningState { get { throw null; } }
+ }
+ public static partial class DatabaseFleetManagerExtensions
+ {
+ public static Azure.Response GetDatabaseFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static System.Threading.Tasks.Task> GetDatabaseFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberResource GetDatabaseFleetMemberResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetResource GetDatabaseFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetCollection GetDatabaseFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; }
+ public static Azure.Pageable GetDatabaseFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.AsyncPageable GetDatabaseFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunResource GetDatabaseFleetUpdateRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; }
+ }
+ public partial class DatabaseFleetMemberCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable
+ {
+ protected DatabaseFleetMemberCollection() { }
+ public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetMemberName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Exists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.NullableResponse GetIfExists(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; }
+ System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; }
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+ }
+ public partial class DatabaseFleetMemberData : Azure.ResourceManager.Models.ResourceData
+ {
+ public DatabaseFleetMemberData() { }
+ public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } set { } }
+ public Azure.ETag? ETag { get { throw null; } }
+ public string Group { get { throw null; } set { } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState? ProvisioningState { get { throw null; } }
+ }
+ public partial class DatabaseFleetMemberResource : Azure.ResourceManager.ArmResource
+ {
+ public static readonly Azure.Core.ResourceType ResourceType;
+ protected DatabaseFleetMemberResource() { }
+ public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData Data { get { throw null; } }
+ public virtual bool HasData { get { throw null; } }
+ public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetMemberPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class DatabaseFleetResource : Azure.ResourceManager.ArmResource
+ {
+ public static readonly Azure.Core.ResourceType ResourceType;
+ protected DatabaseFleetResource() { }
+ public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData Data { get { throw null; } }
+ public virtual bool HasData { get { throw null; } }
+ public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response GetCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response GetDatabaseFleetMember(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetDatabaseFleetMemberAsync(string fleetMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberCollection GetDatabaseFleetMembers() { throw null; }
+ public virtual Azure.Response GetDatabaseFleetUpdateRun(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetDatabaseFleetUpdateRunAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunCollection GetDatabaseFleetUpdateRuns() { throw null; }
+ public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseFleetPatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class DatabaseFleetUpdateRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable
+ {
+ protected DatabaseFleetUpdateRunCollection() { }
+ public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string updateRunName, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Exists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> ExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.NullableResponse GetIfExists(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string updateRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; }
+ System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; }
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+ }
+ public partial class DatabaseFleetUpdateRunData : Azure.ResourceManager.Models.ResourceData
+ {
+ public DatabaseFleetUpdateRunData() { }
+ public Azure.ETag? ETag { get { throw null; } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpdate ManagedClusterUpdate { get { throw null; } set { } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState? ProvisioningState { get { throw null; } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunStatus Status { get { throw null; } }
+ public System.Collections.Generic.IList StrategyStages { get { throw null; } set { } }
+ }
+ public partial class DatabaseFleetUpdateRunResource : Azure.ResourceManager.ArmResource
+ {
+ public static readonly Azure.Core.ResourceType ResourceType;
+ protected DatabaseFleetUpdateRunResource() { }
+ public virtual Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData Data { get { throw null; } }
+ public virtual bool HasData { get { throw null; } }
+ public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.ResourceManager.DatabaseFleetManager.Models
+{
+ public static partial class ArmDatabaseFleetManagerModelFactory
+ {
+ public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetData DatabaseFleetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile hubProfile = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetMemberData DatabaseFleetMemberData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.Core.ResourceIdentifier clusterResourceId = null, string group = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState?)) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.DatabaseFleetUpdateRunData DatabaseFleetUpdateRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState?), System.Collections.Generic.IEnumerable strategyStages = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpdate managedClusterUpdate = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunStatus status = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetCredentialResults FleetCredentialResults(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetHubProfile FleetHubProfile(string dnsPrefix = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetApiServerAccessProfile apiServerAccessProfile = null, Azure.Core.ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateGroupStatus FleetUpdateGroupStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, string name = null, System.Collections.Generic.IEnumerable members = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus FleetUpdateOperationStatus(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState? state = default(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState?), Azure.ResponseError error = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunStatus FleetUpdateRunStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, System.Collections.Generic.IEnumerable stages = null, System.Collections.Generic.IEnumerable selectedNodeImageVersions = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateStageStatus FleetUpdateStageStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, string name = null, System.Collections.Generic.IEnumerable groups = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetWaitStatus afterStageWaitStatus = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetWaitStatus FleetWaitStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, int? waitDurationInSeconds = default(int?)) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.MemberUpdateStatus MemberUpdateStatus(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus status = null, string name = null, Azure.Core.ResourceIdentifier clusterResourceId = null, string operationId = null, string message = null) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageVersion NodeImageVersion(string version = null) { throw null; }
+ }
+ public partial class DatabaseFleetMemberPatch
+ {
+ public DatabaseFleetMemberPatch() { }
+ public string Group { get { throw null; } set { } }
+ }
+ public partial class DatabaseFleetPatch
+ {
+ public DatabaseFleetPatch() { }
+ public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
+ public System.Collections.Generic.IDictionary Tags { get { throw null; } }
+ }
+ public partial class FleetApiServerAccessProfile
+ {
+ public FleetApiServerAccessProfile() { }
+ public bool? EnablePrivateCluster { get { throw null; } set { } }
+ public bool? EnableVnetIntegration { get { throw null; } set { } }
+ public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } }
+ }
+ public partial class FleetCredentialResult
+ {
+ internal FleetCredentialResult() { }
+ public string Name { get { throw null; } }
+ public byte[] Value { get { throw null; } }
+ }
+ public partial class FleetCredentialResults
+ {
+ internal FleetCredentialResults() { }
+ public System.Collections.Generic.IReadOnlyList Kubeconfigs { get { throw null; } }
+ }
+ public partial class FleetHubProfile
+ {
+ public FleetHubProfile() { }
+ public Azure.Core.ResourceIdentifier AgentSubnetId { get { throw null; } set { } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetApiServerAccessProfile ApiServerAccessProfile { get { throw null; } set { } }
+ public string DnsPrefix { get { throw null; } set { } }
+ public string Fqdn { get { throw null; } }
+ public string KubernetesVersion { get { throw null; } }
+ }
+ public partial class FleetManagedClusterUpdate
+ {
+ public FleetManagedClusterUpdate(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeSpec upgrade) { }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType? SelectionType { get { throw null; } set { } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeSpec Upgrade { get { throw null; } set { } }
+ }
+ public partial class FleetManagedClusterUpgradeSpec
+ {
+ public FleetManagedClusterUpgradeSpec(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType upgradeType) { }
+ public string KubernetesVersion { get { throw null; } set { } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType UpgradeType { get { throw null; } set { } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct FleetManagedClusterUpgradeType : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public FleetManagedClusterUpgradeType(string value) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType Full { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType NodeImageOnly { get { throw null; } }
+ public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType right) { throw null; }
+ public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType (string value) { throw null; }
+ public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetManagedClusterUpgradeType right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct FleetMemberProvisioningState : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public FleetMemberProvisioningState(string value) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Canceled { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Failed { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Joining { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Leaving { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Succeeded { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState Updating { get { throw null; } }
+ public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState right) { throw null; }
+ public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState (string value) { throw null; }
+ public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetMemberProvisioningState right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct FleetProvisioningState : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public FleetProvisioningState(string value) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Canceled { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Creating { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Deleting { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Failed { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Succeeded { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState Updating { get { throw null; } }
+ public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState right) { throw null; }
+ public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState (string value) { throw null; }
+ public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetProvisioningState right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class FleetUpdateGroup
+ {
+ public FleetUpdateGroup(string name) { }
+ public string Name { get { throw null; } set { } }
+ }
+ public partial class FleetUpdateGroupStatus
+ {
+ internal FleetUpdateGroupStatus() { }
+ public System.Collections.Generic.IReadOnlyList Members { get { throw null; } }
+ public string Name { get { throw null; } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } }
+ }
+ public partial class FleetUpdateOperationStatus
+ {
+ internal FleetUpdateOperationStatus() { }
+ public System.DateTimeOffset? CompletedOn { get { throw null; } }
+ public Azure.ResponseError Error { get { throw null; } }
+ public System.DateTimeOffset? StartOn { get { throw null; } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState? State { get { throw null; } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct FleetUpdateRunProvisioningState : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public FleetUpdateRunProvisioningState(string value) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState Canceled { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState Failed { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState Succeeded { get { throw null; } }
+ public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState right) { throw null; }
+ public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState (string value) { throw null; }
+ public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateRunProvisioningState right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class FleetUpdateRunStatus
+ {
+ internal FleetUpdateRunStatus() { }
+ public System.Collections.Generic.IReadOnlyList SelectedNodeImageVersions { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList Stages { get { throw null; } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } }
+ }
+ public partial class FleetUpdateStage
+ {
+ public FleetUpdateStage(string name) { }
+ public int? AfterStageWaitInSeconds { get { throw null; } set { } }
+ public System.Collections.Generic.IList Groups { get { throw null; } }
+ public string Name { get { throw null; } set { } }
+ }
+ public partial class FleetUpdateStageStatus
+ {
+ internal FleetUpdateStageStatus() { }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetWaitStatus AfterStageWaitStatus { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } }
+ public string Name { get { throw null; } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct FleetUpdateState : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public FleetUpdateState(string value) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Completed { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Failed { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState NotStarted { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Running { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Skipped { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Stopped { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState Stopping { get { throw null; } }
+ public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState right) { throw null; }
+ public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState (string value) { throw null; }
+ public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState left, Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateState right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class FleetWaitStatus
+ {
+ internal FleetWaitStatus() { }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } }
+ public int? WaitDurationInSeconds { get { throw null; } }
+ }
+ public partial class MemberUpdateStatus
+ {
+ internal MemberUpdateStatus() { }
+ public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } }
+ public string Message { get { throw null; } }
+ public string Name { get { throw null; } }
+ public string OperationId { get { throw null; } }
+ public Azure.ResourceManager.DatabaseFleetManager.Models.FleetUpdateOperationStatus Status { get { throw null; } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct NodeImageSelectionType : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public NodeImageSelectionType(string value) { throw null; }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Consistent { get { throw null; } }
+ public static Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType Latest { get { throw null; } }
+ public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; }
+ public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType (string value) { throw null; }
+ public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType left, Azure.ResourceManager.DatabaseFleetManager.Models.NodeImageSelectionType right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ public partial class NodeImageVersion
+ {
+ internal NodeImageVersion() { }
+ public string Version { get { throw null; } }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/assets.json b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/assets.json
new file mode 100644
index 000000000000..bdd6dca027d4
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/assets.json
@@ -0,0 +1,6 @@
+{
+ "AssetsRepo": "Azure/azure-sdk-assets",
+ "AssetsRepoPrefixPath": "net",
+ "TagPrefix": "net//Azure.ResourceManager.DatabaseFleetManager",
+ "Tag": ""
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj
new file mode 100644
index 000000000000..fcd626b89d42
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetCollection.cs
new file mode 100644
index 000000000000..a8b25c48a370
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetCollection.cs
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.DatabaseFleetManager;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.DatabaseFleetManager.Samples
+{
+ public partial class Sample_DatabaseFleetCollection
+ {
+ // Lists the Fleet resources in a resource group.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListsTheFleetResourcesInAResourceGroup()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListByResourceGroup.json
+ // this example is just showing the usage of "Fleets_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this DatabaseFleetResource
+ DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets();
+
+ // invoke the operation and iterate over the result
+ await foreach (DatabaseFleetResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Gets a Fleet resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsAFleetResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json
+ // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this DatabaseFleetResource
+ DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets();
+
+ // invoke the operation
+ string fleetName = "fleet1";
+ DatabaseFleetResource result = await collection.GetAsync(fleetName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Gets a Fleet resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetsAFleetResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json
+ // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this DatabaseFleetResource
+ DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets();
+
+ // invoke the operation
+ string fleetName = "fleet1";
+ bool result = await collection.ExistsAsync(fleetName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Gets a Fleet resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetsAFleetResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json
+ // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this DatabaseFleetResource
+ DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets();
+
+ // invoke the operation
+ string fleetName = "fleet1";
+ NullableResponse response = await collection.GetIfExistsAsync(fleetName);
+ DatabaseFleetResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Creates a Fleet resource with a long running operation.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreatesAFleetResourceWithALongRunningOperation()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_CreateOrUpdate.json
+ // this example is just showing the usage of "Fleets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this DatabaseFleetResource
+ DatabaseFleetCollection collection = resourceGroupResource.GetDatabaseFleets();
+
+ // invoke the operation
+ string fleetName = "fleet1";
+ DatabaseFleetData data = new DatabaseFleetData(new AzureLocation("East US"))
+ {
+ HubProfile = new FleetHubProfile()
+ {
+ DnsPrefix = "dnsprefix1",
+ },
+ Tags =
+{
+["archv2"] = "",
+["tier"] = "production",
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetName, data);
+ DatabaseFleetResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberCollection.cs
new file mode 100644
index 000000000000..969d9d7ac673
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberCollection.cs
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.DatabaseFleetManager;
+
+namespace Azure.ResourceManager.DatabaseFleetManager.Samples
+{
+ public partial class Sample_DatabaseFleetMemberCollection
+ {
+ // Lists the members of a Fleet.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListsTheMembersOfAFleet()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_ListByFleet.json
+ // this example is just showing the usage of "FleetMembers_ListByFleet" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetMemberResource
+ DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers();
+
+ // invoke the operation and iterate over the result
+ await foreach (DatabaseFleetMemberResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetMemberData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Gets a FleetMember resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsAFleetMemberResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json
+ // this example is just showing the usage of "FleetMembers_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetMemberResource
+ DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers();
+
+ // invoke the operation
+ string fleetMemberName = "member-1";
+ DatabaseFleetMemberResource result = await collection.GetAsync(fleetMemberName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetMemberData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Gets a FleetMember resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetsAFleetMemberResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json
+ // this example is just showing the usage of "FleetMembers_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetMemberResource
+ DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers();
+
+ // invoke the operation
+ string fleetMemberName = "member-1";
+ bool result = await collection.ExistsAsync(fleetMemberName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Gets a FleetMember resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetsAFleetMemberResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json
+ // this example is just showing the usage of "FleetMembers_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetMemberResource
+ DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers();
+
+ // invoke the operation
+ string fleetMemberName = "member-1";
+ NullableResponse response = await collection.GetIfExistsAsync(fleetMemberName);
+ DatabaseFleetMemberResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetMemberData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Creates a FleetMember resource with a long running operation.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreatesAFleetMemberResourceWithALongRunningOperation()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Create.json
+ // this example is just showing the usage of "FleetMembers_Create" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetMemberResource
+ DatabaseFleetMemberCollection collection = databaseFleet.GetDatabaseFleetMembers();
+
+ // invoke the operation
+ string fleetMemberName = "member-1";
+ DatabaseFleetMemberData data = new DatabaseFleetMemberData()
+ {
+ ClusterResourceId = new ResourceIdentifier("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1"),
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetMemberName, data);
+ DatabaseFleetMemberResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetMemberData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberResource.cs
new file mode 100644
index 000000000000..ba2d23068ac1
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetMemberResource.cs
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.DatabaseFleetManager;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+
+namespace Azure.ResourceManager.DatabaseFleetManager.Samples
+{
+ public partial class Sample_DatabaseFleetMemberResource
+ {
+ // Gets a FleetMember resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsAFleetMemberResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json
+ // this example is just showing the usage of "FleetMembers_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetMemberResource created on azure
+ // for more information of creating DatabaseFleetMemberResource, please refer to the document of DatabaseFleetMemberResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ string fleetMemberName = "member-1";
+ ResourceIdentifier databaseFleetMemberResourceId = DatabaseFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName);
+ DatabaseFleetMemberResource databaseFleetMember = client.GetDatabaseFleetMemberResource(databaseFleetMemberResourceId);
+
+ // invoke the operation
+ DatabaseFleetMemberResource result = await databaseFleetMember.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetMemberData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Updates a FleetMember resource synchronously.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_UpdatesAFleetMemberResourceSynchronously()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Update.json
+ // this example is just showing the usage of "FleetMembers_Update" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetMemberResource created on azure
+ // for more information of creating DatabaseFleetMemberResource, please refer to the document of DatabaseFleetMemberResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ string fleetMemberName = "member-1";
+ ResourceIdentifier databaseFleetMemberResourceId = DatabaseFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName);
+ DatabaseFleetMemberResource databaseFleetMember = client.GetDatabaseFleetMemberResource(databaseFleetMemberResourceId);
+
+ // invoke the operation
+ DatabaseFleetMemberPatch patch = new DatabaseFleetMemberPatch()
+ {
+ Group = "staging",
+ };
+ ArmOperation lro = await databaseFleetMember.UpdateAsync(WaitUntil.Completed, patch);
+ DatabaseFleetMemberResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetMemberData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Deletes a FleetMember resource asynchronously with a long running operation.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Delete.json
+ // this example is just showing the usage of "FleetMembers_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetMemberResource created on azure
+ // for more information of creating DatabaseFleetMemberResource, please refer to the document of DatabaseFleetMemberResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ string fleetMemberName = "member-1";
+ ResourceIdentifier databaseFleetMemberResourceId = DatabaseFleetMemberResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetMemberName);
+ DatabaseFleetMemberResource databaseFleetMember = client.GetDatabaseFleetMemberResource(databaseFleetMemberResourceId);
+
+ // invoke the operation
+ await databaseFleetMember.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetResource.cs
new file mode 100644
index 000000000000..e1fb1cf53f64
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetResource.cs
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.DatabaseFleetManager;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.DatabaseFleetManager.Samples
+{
+ public partial class Sample_DatabaseFleetResource
+ {
+ // Lists the Fleet resources in a subscription.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetDatabaseFleets_ListsTheFleetResourcesInASubscription()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListBySub.json
+ // this example is just showing the usage of "Fleets_ListBySubscription" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "subid1";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (DatabaseFleetResource item in subscriptionResource.GetDatabaseFleetsAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Gets a Fleet resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsAFleetResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json
+ // this example is just showing the usage of "Fleets_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // invoke the operation
+ DatabaseFleetResource result = await databaseFleet.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Update a Fleet.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_UpdateAFleet()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_PatchTags.json
+ // this example is just showing the usage of "Fleets_Update" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // invoke the operation
+ DatabaseFleetPatch patch = new DatabaseFleetPatch()
+ {
+ Tags =
+{
+["env"] = "prod",
+["tier"] = "secure",
+},
+ };
+ string ifMatch = "dfjkwelr7384";
+ ArmOperation lro = await databaseFleet.UpdateAsync(WaitUntil.Completed, patch, ifMatch: ifMatch);
+ DatabaseFleetResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Deletes a Fleet resource asynchronously with a long running operation.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeletesAFleetResourceAsynchronouslyWithALongRunningOperation()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Delete.json
+ // this example is just showing the usage of "Fleets_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // invoke the operation
+ await databaseFleet.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Lists the user credentials of a Fleet.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetCredentials_ListsTheUserCredentialsOfAFleet()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListCredentialsResult.json
+ // this example is just showing the usage of "Fleets_ListCredentials" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // invoke the operation
+ FleetCredentialResults result = await databaseFleet.GetCredentialsAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunCollection.cs
new file mode 100644
index 000000000000..ccd8df59dd7b
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunCollection.cs
@@ -0,0 +1,224 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.DatabaseFleetManager;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+
+namespace Azure.ResourceManager.DatabaseFleetManager.Samples
+{
+ public partial class Sample_DatabaseFleetUpdateRunCollection
+ {
+ // Lists the UpdateRun resources by fleet.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListsTheUpdateRunResourcesByFleet()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_ListByFleet.json
+ // this example is just showing the usage of "UpdateRuns_ListByFleet" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetUpdateRunResource
+ DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns();
+
+ // invoke the operation and iterate over the result
+ await foreach (DatabaseFleetUpdateRunResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetUpdateRunData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Gets an UpdateRun resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsAnUpdateRunResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json
+ // this example is just showing the usage of "UpdateRuns_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetUpdateRunResource
+ DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns();
+
+ // invoke the operation
+ string updateRunName = "run1";
+ DatabaseFleetUpdateRunResource result = await collection.GetAsync(updateRunName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetUpdateRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Gets an UpdateRun resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetsAnUpdateRunResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json
+ // this example is just showing the usage of "UpdateRuns_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetUpdateRunResource
+ DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns();
+
+ // invoke the operation
+ string updateRunName = "run1";
+ bool result = await collection.ExistsAsync(updateRunName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Gets an UpdateRun resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetsAnUpdateRunResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json
+ // this example is just showing the usage of "UpdateRuns_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetUpdateRunResource
+ DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns();
+
+ // invoke the operation
+ string updateRunName = "run1";
+ NullableResponse response = await collection.GetIfExistsAsync(updateRunName);
+ DatabaseFleetUpdateRunResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetUpdateRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Create an UpdateRun.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateAnUpdateRun()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_CreateOrUpdate.json
+ // this example is just showing the usage of "UpdateRuns_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetResource created on azure
+ // for more information of creating DatabaseFleetResource, please refer to the document of DatabaseFleetResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ ResourceIdentifier databaseFleetResourceId = DatabaseFleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName);
+ DatabaseFleetResource databaseFleet = client.GetDatabaseFleetResource(databaseFleetResourceId);
+
+ // get the collection of this DatabaseFleetUpdateRunResource
+ DatabaseFleetUpdateRunCollection collection = databaseFleet.GetDatabaseFleetUpdateRuns();
+
+ // invoke the operation
+ string updateRunName = "run1";
+ DatabaseFleetUpdateRunData data = new DatabaseFleetUpdateRunData()
+ {
+ StrategyStages =
+{
+new FleetUpdateStage("stage1")
+{
+Groups =
+{
+new FleetUpdateGroup("group-a")
+},
+AfterStageWaitInSeconds = 3600,
+}
+},
+ ManagedClusterUpdate = new FleetManagedClusterUpdate(new FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType.Full)
+ {
+ KubernetesVersion = "1.26.1",
+ })
+ {
+ SelectionType = NodeImageSelectionType.Latest,
+ },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, updateRunName, data);
+ DatabaseFleetUpdateRunResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetUpdateRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunResource.cs
new file mode 100644
index 000000000000..bbbad88a501a
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_DatabaseFleetUpdateRunResource.cs
@@ -0,0 +1,201 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.DatabaseFleetManager;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+
+namespace Azure.ResourceManager.DatabaseFleetManager.Samples
+{
+ public partial class Sample_DatabaseFleetUpdateRunResource
+ {
+ // Gets an UpdateRun resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsAnUpdateRunResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json
+ // this example is just showing the usage of "UpdateRuns_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure
+ // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ string updateRunName = "run1";
+ ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName);
+ DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId);
+
+ // invoke the operation
+ DatabaseFleetUpdateRunResource result = await databaseFleetUpdateRun.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetUpdateRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Create an UpdateRun.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_CreateAnUpdateRun()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_CreateOrUpdate.json
+ // this example is just showing the usage of "UpdateRuns_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure
+ // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ string updateRunName = "run1";
+ ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName);
+ DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId);
+
+ // invoke the operation
+ DatabaseFleetUpdateRunData data = new DatabaseFleetUpdateRunData()
+ {
+ StrategyStages =
+{
+new FleetUpdateStage("stage1")
+{
+Groups =
+{
+new FleetUpdateGroup("group-a")
+},
+AfterStageWaitInSeconds = 3600,
+}
+},
+ ManagedClusterUpdate = new FleetManagedClusterUpdate(new FleetManagedClusterUpgradeSpec(FleetManagedClusterUpgradeType.Full)
+ {
+ KubernetesVersion = "1.26.1",
+ })
+ {
+ SelectionType = NodeImageSelectionType.Latest,
+ },
+ };
+ ArmOperation lro = await databaseFleetUpdateRun.UpdateAsync(WaitUntil.Completed, data);
+ DatabaseFleetUpdateRunResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetUpdateRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete an updateRun resource.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteAnUpdateRunResource()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Delete.json
+ // this example is just showing the usage of "UpdateRuns_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure
+ // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource
+ string subscriptionId = "subid1";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ string updateRunName = "run1";
+ ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName);
+ DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId);
+
+ // invoke the operation
+ await databaseFleetUpdateRun.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Starts an UpdateRun.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Start_StartsAnUpdateRun()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Start.json
+ // this example is just showing the usage of "UpdateRuns_Start" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure
+ // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ string updateRunName = "run1";
+ ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName);
+ DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId);
+
+ // invoke the operation
+ ArmOperation lro = await databaseFleetUpdateRun.StartAsync(WaitUntil.Completed);
+ DatabaseFleetUpdateRunResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetUpdateRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Stops an UpdateRun.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Stop_StopsAnUpdateRun()
+ {
+ // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Stop.json
+ // this example is just showing the usage of "UpdateRuns_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DatabaseFleetUpdateRunResource created on azure
+ // for more information of creating DatabaseFleetUpdateRunResource, please refer to the document of DatabaseFleetUpdateRunResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "rg1";
+ string fleetName = "fleet1";
+ string updateRunName = "run1";
+ ResourceIdentifier databaseFleetUpdateRunResourceId = DatabaseFleetUpdateRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, updateRunName);
+ DatabaseFleetUpdateRunResource databaseFleetUpdateRun = client.GetDatabaseFleetUpdateRunResource(databaseFleetUpdateRunResourceId);
+
+ // invoke the operation
+ ArmOperation lro = await databaseFleetUpdateRun.StopAsync(WaitUntil.Completed);
+ DatabaseFleetUpdateRunResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatabaseFleetUpdateRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj
new file mode 100644
index 000000000000..cb4d0508a88e
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj
@@ -0,0 +1,8 @@
+
+
+ 1.0.0-beta.1
+ Azure.ResourceManager.DatabaseFleetManager
+ Azure Resource Manager client SDK for Azure resource provider Database Fleet Manager.
+ azure;management;arm;resource manager;fleet
+
+
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs
new file mode 100644
index 000000000000..ddff9724c1a7
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs
@@ -0,0 +1,186 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager.DatabaseFleetManager;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.DatabaseFleetManager.Models
+{
+ /// Model factory for models.
+ public static partial class ArmDatabaseFleetManagerModelFactory
+ {
+ /// Initializes a new instance of DatabaseFleetData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ /// Managed identity.
+ /// The status of the last operation.
+ /// The FleetHubProfile configures the Fleet's hub.
+ /// A new instance for mocking.
+ public static DatabaseFleetData DatabaseFleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedServiceIdentity identity = null, FleetProvisioningState? provisioningState = null, FleetHubProfile hubProfile = null)
+ {
+ tags ??= new Dictionary();
+
+ return new DatabaseFleetData(id, name, resourceType, systemData, tags, location, eTag, identity, provisioningState, hubProfile);
+ }
+
+ /// Initializes a new instance of FleetHubProfile.
+ /// DNS prefix used to create the FQDN for the Fleet hub.
+ /// The access profile for the Fleet hub API server.
+ /// The agent profile for the Fleet hub.
+ /// The FQDN of the Fleet hub.
+ /// The Kubernetes version of the Fleet hub.
+ /// A new instance for mocking.
+ public static FleetHubProfile FleetHubProfile(string dnsPrefix = null, FleetApiServerAccessProfile apiServerAccessProfile = null, ResourceIdentifier agentSubnetId = null, string fqdn = null, string kubernetesVersion = null)
+ {
+ return new FleetHubProfile(dnsPrefix, apiServerAccessProfile, agentSubnetId != null ? new FleetAgentProfile(agentSubnetId) : null, fqdn, kubernetesVersion);
+ }
+
+ /// Initializes a new instance of FleetCredentialResults.
+ /// Array of base64-encoded Kubernetes configuration files.
+ /// A new instance for mocking.
+ public static FleetCredentialResults FleetCredentialResults(IEnumerable kubeconfigs = null)
+ {
+ kubeconfigs ??= new List();
+
+ return new FleetCredentialResults(kubeconfigs?.ToList());
+ }
+
+ /// Initializes a new instance of FleetCredentialResult.
+ /// The name of the credential.
+ /// Base64-encoded Kubernetes configuration file.
+ /// A new instance for mocking.
+ public static FleetCredentialResult FleetCredentialResult(string name = null, byte[] value = null)
+ {
+ return new FleetCredentialResult(name, value);
+ }
+
+ /// Initializes a new instance of DatabaseFleetMemberData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ /// The group this member belongs to for multi-cluster update management.
+ /// The status of the last operation.
+ /// A new instance for mocking.
+ public static DatabaseFleetMemberData DatabaseFleetMemberData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, ResourceIdentifier clusterResourceId = null, string group = null, FleetMemberProvisioningState? provisioningState = null)
+ {
+ return new DatabaseFleetMemberData(id, name, resourceType, systemData, eTag, clusterResourceId, group, provisioningState);
+ }
+
+ /// Initializes a new instance of DatabaseFleetUpdateRunData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ /// The provisioning state of the UpdateRun resource.
+ ///
+ /// The strategy defines the order in which the clusters will be updated.
+ /// If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members.
+ /// The strategy of the UpdateRun can be modified until the run is started.
+ ///
+ /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started.
+ /// The status of the UpdateRun.
+ /// A new instance for mocking.
+ public static DatabaseFleetUpdateRunData DatabaseFleetUpdateRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, FleetUpdateRunProvisioningState? provisioningState = null, IEnumerable strategyStages = null, FleetManagedClusterUpdate managedClusterUpdate = null, FleetUpdateRunStatus status = null)
+ {
+ strategyStages ??= new List();
+
+ return new DatabaseFleetUpdateRunData(id, name, resourceType, systemData, eTag, provisioningState, strategyStages != null ? new FleetUpdateRunStrategy(strategyStages?.ToList()) : null, managedClusterUpdate, status);
+ }
+
+ /// Initializes a new instance of FleetUpdateRunStatus.
+ /// The status of the UpdateRun.
+ /// The stages composing an update run. Stages are run sequentially withing an UpdateRun.
+ /// The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is `Consistent`.
+ /// A new instance for mocking.
+ public static FleetUpdateRunStatus FleetUpdateRunStatus(FleetUpdateOperationStatus status = null, IEnumerable stages = null, IEnumerable selectedNodeImageVersions = null)
+ {
+ stages ??= new List();
+ selectedNodeImageVersions ??= new List();
+
+ return new FleetUpdateRunStatus(status, stages?.ToList(), selectedNodeImageVersions != null ? new NodeImageSelectionStatus(selectedNodeImageVersions?.ToList()) : null);
+ }
+
+ /// Initializes a new instance of FleetUpdateOperationStatus.
+ /// The time the operation or group was started.
+ /// The time the operation or group was completed.
+ /// The State of the operation or group.
+ /// The error details when a failure is encountered.
+ /// A new instance for mocking.
+ public static FleetUpdateOperationStatus FleetUpdateOperationStatus(DateTimeOffset? startOn = null, DateTimeOffset? completedOn = null, FleetUpdateState? state = null, ResponseError error = null)
+ {
+ return new FleetUpdateOperationStatus(startOn, completedOn, state, error);
+ }
+
+ /// Initializes a new instance of FleetUpdateStageStatus.
+ /// The status of the UpdateStage.
+ /// The name of the UpdateStage.
+ /// The list of groups to be updated as part of this UpdateStage.
+ /// The status of the wait period configured on the UpdateStage.
+ /// A new instance for mocking.
+ public static FleetUpdateStageStatus FleetUpdateStageStatus(FleetUpdateOperationStatus status = null, string name = null, IEnumerable groups = null, FleetWaitStatus afterStageWaitStatus = null)
+ {
+ groups ??= new List();
+
+ return new FleetUpdateStageStatus(status, name, groups?.ToList(), afterStageWaitStatus);
+ }
+
+ /// Initializes a new instance of FleetUpdateGroupStatus.
+ /// The status of the UpdateGroup.
+ /// The name of the UpdateGroup.
+ /// The list of member this UpdateGroup updates.
+ /// A new instance for mocking.
+ public static FleetUpdateGroupStatus FleetUpdateGroupStatus(FleetUpdateOperationStatus status = null, string name = null, IEnumerable members = null)
+ {
+ members ??= new List();
+
+ return new FleetUpdateGroupStatus(status, name, members?.ToList());
+ }
+
+ /// Initializes a new instance of MemberUpdateStatus.
+ /// The status of the MemberUpdate operation.
+ /// The name of the FleetMember.
+ /// The Azure resource id of the target Kubernetes cluster.
+ /// The operation resource id of the latest attempt to perform the operation.
+ /// The status message after processing the member update operation.
+ /// A new instance for mocking.
+ public static MemberUpdateStatus MemberUpdateStatus(FleetUpdateOperationStatus status = null, string name = null, ResourceIdentifier clusterResourceId = null, string operationId = null, string message = null)
+ {
+ return new MemberUpdateStatus(status, name, clusterResourceId, operationId, message);
+ }
+
+ /// Initializes a new instance of FleetWaitStatus.
+ /// The status of the wait duration.
+ /// The wait duration configured in seconds.
+ /// A new instance for mocking.
+ public static FleetWaitStatus FleetWaitStatus(FleetUpdateOperationStatus status = null, int? waitDurationInSeconds = null)
+ {
+ return new FleetWaitStatus(status, waitDurationInSeconds);
+ }
+
+ /// Initializes a new instance of NodeImageVersion.
+ /// The image version to upgrade the nodes to (e.g., 'AKSUbuntu-1804gen2containerd-2022.12.13').
+ /// A new instance for mocking.
+ public static NodeImageVersion NodeImageVersion(string version = null)
+ {
+ return new NodeImageVersion(version);
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetCollection.cs
new file mode 100644
index 000000000000..c768823488c5
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetCollection.cs
@@ -0,0 +1,420 @@
+// 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.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ ///
+ /// 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 GetDatabaseFleets method from an instance of .
+ ///
+ public partial class DatabaseFleetCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _databaseFleetFleetsClientDiagnostics;
+ private readonly FleetsRestOperations _databaseFleetFleetsRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected DatabaseFleetCollection()
+ {
+ }
+
+ /// 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 DatabaseFleetCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _databaseFleetFleetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(DatabaseFleetResource.ResourceType, out string databaseFleetFleetsApiVersion);
+ _databaseFleetFleetsRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetFleetsApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceGroupResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Creates or updates a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Fleet resource.
+ /// Resource create parameters.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
+ /// 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 fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetFleetsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Creates or updates a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Fleet resource.
+ /// Resource create parameters.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
+ /// 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 fleetName, DatabaseFleetData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetFleetsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Lists fleets in the specified subscription and resource group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_ListByResourceGroup
+ ///
+ ///
+ ///
+ /// 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)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetFleetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetFleetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), _databaseFleetFleetsClientDiagnostics, Pipeline, "DatabaseFleetCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Lists fleets in the specified subscription and resource group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_ListByResourceGroup
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetFleetsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetFleetsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), _databaseFleetFleetsClientDiagnostics, Pipeline, "DatabaseFleetCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, 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.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetResource(Client, response.Value), 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/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetData.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetData.cs
new file mode 100644
index 000000000000..cebab4756eeb
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetData.cs
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ ///
+ /// A class representing the DatabaseFleet data model.
+ /// The Fleet resource.
+ ///
+ public partial class DatabaseFleetData : TrackedResourceData
+ {
+ /// Initializes a new instance of DatabaseFleetData.
+ /// The location.
+ public DatabaseFleetData(AzureLocation location) : base(location)
+ {
+ }
+
+ /// Initializes a new instance of DatabaseFleetData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ /// Managed identity.
+ /// The status of the last operation.
+ /// The FleetHubProfile configures the Fleet's hub.
+ internal DatabaseFleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedServiceIdentity identity, FleetProvisioningState? provisioningState, FleetHubProfile hubProfile) : base(id, name, resourceType, systemData, tags, location)
+ {
+ ETag = eTag;
+ Identity = identity;
+ ProvisioningState = provisioningState;
+ HubProfile = hubProfile;
+ }
+
+ /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ public ETag? ETag { get; }
+ /// Managed identity.
+ public ManagedServiceIdentity Identity { get; set; }
+ /// The status of the last operation.
+ public FleetProvisioningState? ProvisioningState { get; }
+ /// The FleetHubProfile configures the Fleet's hub.
+ public FleetHubProfile HubProfile { get; set; }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberCollection.cs
new file mode 100644
index 000000000000..d764da53c978
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberCollection.cs
@@ -0,0 +1,419 @@
+// 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.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ ///
+ /// 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 GetDatabaseFleetMembers method from an instance of .
+ ///
+ public partial class DatabaseFleetMemberCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _databaseFleetMemberFleetMembersClientDiagnostics;
+ private readonly FleetMembersRestOperations _databaseFleetMemberFleetMembersRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected DatabaseFleetMemberCollection()
+ {
+ }
+
+ /// 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 DatabaseFleetMemberCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _databaseFleetMemberFleetMembersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetMemberResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(DatabaseFleetMemberResource.ResourceType, out string databaseFleetMemberFleetMembersApiVersion);
+ _databaseFleetMemberFleetMembersRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetMemberFleetMembersApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != DatabaseFleetResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DatabaseFleetResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Create
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Fleet member resource.
+ /// Resource create parameters.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
+ /// 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 fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetMemberFleetMembersRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Create
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Fleet member resource.
+ /// Resource create parameters.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
+ /// 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 fleetMemberName, DatabaseFleetMemberData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetMemberFleetMembersRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet member resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string fleetMemberName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet member resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string fleetMemberName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List FleetMember resources by Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_ListByFleet
+ ///
+ ///
+ ///
+ /// 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)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetMemberResource(Client, DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(e)), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, "DatabaseFleetMemberCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List FleetMember resources by Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_ListByFleet
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetMemberFleetMembersRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetMemberResource(Client, DatabaseFleetMemberData.DeserializeDatabaseFleetMemberData(e)), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, "DatabaseFleetMemberCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet member resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string fleetMemberName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, 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.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet member resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string fleetMemberName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet member resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string fleetMemberName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetMemberFleetMembersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet member resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string fleetMemberName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetMemberName, nameof(fleetMemberName));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetMemberName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), 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/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberData.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberData.cs
new file mode 100644
index 000000000000..61ac559f56c5
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberData.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ ///
+ /// A class representing the DatabaseFleetMember data model.
+ /// A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure.
+ ///
+ public partial class DatabaseFleetMemberData : ResourceData
+ {
+ /// Initializes a new instance of DatabaseFleetMemberData.
+ public DatabaseFleetMemberData()
+ {
+ }
+
+ /// Initializes a new instance of DatabaseFleetMemberData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ /// The group this member belongs to for multi-cluster update management.
+ /// The status of the last operation.
+ internal DatabaseFleetMemberData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, ResourceIdentifier clusterResourceId, string group, FleetMemberProvisioningState? provisioningState) : base(id, name, resourceType, systemData)
+ {
+ ETag = eTag;
+ ClusterResourceId = clusterResourceId;
+ Group = group;
+ ProvisioningState = provisioningState;
+ }
+
+ /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ public ETag? ETag { get; }
+ /// The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ public ResourceIdentifier ClusterResourceId { get; set; }
+ /// The group this member belongs to for multi-cluster update management.
+ public string Group { get; set; }
+ /// The status of the last operation.
+ public FleetMemberProvisioningState? ProvisioningState { get; }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberResource.cs
new file mode 100644
index 000000000000..219d517b229e
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetMemberResource.cs
@@ -0,0 +1,302 @@
+// 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;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ ///
+ /// A Class representing a DatabaseFleetMember 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 GetDatabaseFleetMemberResource method.
+ /// Otherwise you can get one from its parent resource using the GetDatabaseFleetMember method.
+ ///
+ public partial class DatabaseFleetMemberResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetMemberName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _databaseFleetMemberFleetMembersClientDiagnostics;
+ private readonly FleetMembersRestOperations _databaseFleetMemberFleetMembersRestClient;
+ private readonly DatabaseFleetMemberData _data;
+
+ /// Initializes a new instance of the class for mocking.
+ protected DatabaseFleetMemberResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal DatabaseFleetMemberResource(ArmClient client, DatabaseFleetMemberData 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 DatabaseFleetMemberResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _databaseFleetMemberFleetMembersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string databaseFleetMemberFleetMembersApiVersion);
+ _databaseFleetMemberFleetMembersRestClient = new FleetMembersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetMemberFleetMembersApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.ContainerService/fleets/members";
+
+ /// 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 DatabaseFleetMemberData 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));
+ }
+
+ ///
+ /// Get a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetMemberFleetMembersRestClient.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 DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetMemberFleetMembersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetMemberResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetMemberFleetMembersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(_databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetMemberFleetMembersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(_databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Update
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetMemberFleetMembersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Update
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, DatabaseFleetMemberPatch patch, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _databaseFleetMemberFleetMembersClientDiagnostics.CreateScope("DatabaseFleetMemberResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetMemberFleetMembersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetMemberOperationSource(Client), _databaseFleetMemberFleetMembersClientDiagnostics, Pipeline, _databaseFleetMemberFleetMembersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetResource.cs
new file mode 100644
index 000000000000..fdd9eccaed67
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetResource.cs
@@ -0,0 +1,780 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ ///
+ /// A Class representing a DatabaseFleet 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 GetDatabaseFleetResource method.
+ /// Otherwise you can get one from its parent resource using the GetDatabaseFleet method.
+ ///
+ public partial class DatabaseFleetResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _databaseFleetFleetsClientDiagnostics;
+ private readonly FleetsRestOperations _databaseFleetFleetsRestClient;
+ private readonly DatabaseFleetData _data;
+
+ /// Initializes a new instance of the class for mocking.
+ protected DatabaseFleetResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal DatabaseFleetResource(ArmClient client, DatabaseFleetData 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 DatabaseFleetResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _databaseFleetFleetsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string databaseFleetFleetsApiVersion);
+ _databaseFleetFleetsRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetFleetsApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.ContainerService/fleets";
+
+ /// 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 DatabaseFleetData 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 collection of DatabaseFleetMemberResources in the DatabaseFleet.
+ /// An object representing collection of DatabaseFleetMemberResources and their operations over a DatabaseFleetMemberResource.
+ public virtual DatabaseFleetMemberCollection GetDatabaseFleetMembers()
+ {
+ return GetCachedClient(Client => new DatabaseFleetMemberCollection(Client, Id));
+ }
+
+ ///
+ /// Get a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet member resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public virtual async Task> GetDatabaseFleetMemberAsync(string fleetMemberName, CancellationToken cancellationToken = default)
+ {
+ return await GetDatabaseFleetMembers().GetAsync(fleetMemberName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a FleetMember
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}
+ ///
+ /// -
+ /// Operation Id
+ /// FleetMembers_Get
+ ///
+ ///
+ ///
+ /// The name of the Fleet member resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public virtual Response GetDatabaseFleetMember(string fleetMemberName, CancellationToken cancellationToken = default)
+ {
+ return GetDatabaseFleetMembers().Get(fleetMemberName, cancellationToken);
+ }
+
+ /// Gets a collection of DatabaseFleetUpdateRunResources in the DatabaseFleet.
+ /// An object representing collection of DatabaseFleetUpdateRunResources and their operations over a DatabaseFleetUpdateRunResource.
+ public virtual DatabaseFleetUpdateRunCollection GetDatabaseFleetUpdateRuns()
+ {
+ return GetCachedClient(Client => new DatabaseFleetUpdateRunCollection(Client, Id));
+ }
+
+ ///
+ /// Get a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The name of the UpdateRun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public virtual async Task> GetDatabaseFleetUpdateRunAsync(string updateRunName, CancellationToken cancellationToken = default)
+ {
+ return await GetDatabaseFleetUpdateRuns().GetAsync(updateRunName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The name of the UpdateRun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public virtual Response GetDatabaseFleetUpdateRun(string updateRunName, CancellationToken cancellationToken = default)
+ {
+ return GetDatabaseFleetUpdateRuns().Get(updateRunName, cancellationToken);
+ }
+
+ ///
+ /// Gets a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetFleetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(_databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetFleetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(_databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Update
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetFleetsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Update
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, DatabaseFleetPatch patch, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetFleetsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetOperationSource(Client), _databaseFleetFleetsClientDiagnostics, Pipeline, _databaseFleetFleetsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Lists the user credentials of a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_ListCredentials
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetCredentialsAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.GetCredentials");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetFleetsRestClient.ListCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Lists the user credentials of a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_ListCredentials
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response GetCredentials(CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.GetCredentials");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetFleetsRestClient.ListCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues[key] = value;
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new DatabaseFleetPatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues[key] = value;
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new DatabaseFleetPatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new DatabaseFleetPatch();
+ patch.Tags.ReplaceWith(tags);
+ var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken);
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new DatabaseFleetPatch();
+ patch.Tags.ReplaceWith(tags);
+ var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.Remove(key);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _databaseFleetFleetsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new DatabaseFleetPatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _databaseFleetFleetsClientDiagnostics.CreateScope("DatabaseFleetResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.Remove(key);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _databaseFleetFleetsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new DatabaseFleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new DatabaseFleetPatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunCollection.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunCollection.cs
new file mode 100644
index 000000000000..7ab5e958d599
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunCollection.cs
@@ -0,0 +1,419 @@
+// 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.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ ///
+ /// 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 GetDatabaseFleetUpdateRuns method from an instance of .
+ ///
+ public partial class DatabaseFleetUpdateRunCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _databaseFleetUpdateRunUpdateRunsClientDiagnostics;
+ private readonly UpdateRunsRestOperations _databaseFleetUpdateRunUpdateRunsRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected DatabaseFleetUpdateRunCollection()
+ {
+ }
+
+ /// 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 DatabaseFleetUpdateRunCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _databaseFleetUpdateRunUpdateRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetUpdateRunResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(DatabaseFleetUpdateRunResource.ResourceType, out string databaseFleetUpdateRunUpdateRunsApiVersion);
+ _databaseFleetUpdateRunUpdateRunsRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetUpdateRunUpdateRunsApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != DatabaseFleetResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DatabaseFleetResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the UpdateRun resource.
+ /// Resource create parameters.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
+ /// 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 updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the UpdateRun resource.
+ /// Resource create parameters.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
+ /// 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 updateRunName, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The name of the UpdateRun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string updateRunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The name of the UpdateRun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string updateRunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List UpdateRun resources by Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_ListByFleet
+ ///
+ ///
+ ///
+ /// 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)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetUpdateRunResource(Client, DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(e)), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, "DatabaseFleetUpdateRunCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List UpdateRun resources by Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_ListByFleet
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseFleetUpdateRunUpdateRunsRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetUpdateRunResource(Client, DatabaseFleetUpdateRunData.DeserializeDatabaseFleetUpdateRunData(e)), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, "DatabaseFleetUpdateRunCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The name of the UpdateRun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string updateRunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, 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.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The name of the UpdateRun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string updateRunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The name of the UpdateRun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string updateRunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetUpdateRunUpdateRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The name of the UpdateRun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string updateRunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(updateRunName, nameof(updateRunName));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, updateRunName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), 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/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunData.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunData.cs
new file mode 100644
index 000000000000..772fc6730a74
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunData.cs
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager.DatabaseFleetManager.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ ///
+ /// A class representing the DatabaseFleetUpdateRun data model.
+ /// An UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ ///
+ public partial class DatabaseFleetUpdateRunData : ResourceData
+ {
+ /// Initializes a new instance of DatabaseFleetUpdateRunData.
+ public DatabaseFleetUpdateRunData()
+ {
+ }
+
+ /// Initializes a new instance of DatabaseFleetUpdateRunData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ /// The provisioning state of the UpdateRun resource.
+ ///
+ /// The strategy defines the order in which the clusters will be updated.
+ /// If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members.
+ /// The strategy of the UpdateRun can be modified until the run is started.
+ ///
+ /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started.
+ /// The status of the UpdateRun.
+ internal DatabaseFleetUpdateRunData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, FleetUpdateRunProvisioningState? provisioningState, FleetUpdateRunStrategy strategy, FleetManagedClusterUpdate managedClusterUpdate, FleetUpdateRunStatus status) : base(id, name, resourceType, systemData)
+ {
+ ETag = eTag;
+ ProvisioningState = provisioningState;
+ Strategy = strategy;
+ ManagedClusterUpdate = managedClusterUpdate;
+ Status = status;
+ }
+
+ /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ public ETag? ETag { get; }
+ /// The provisioning state of the UpdateRun resource.
+ public FleetUpdateRunProvisioningState? ProvisioningState { get; }
+ ///
+ /// The strategy defines the order in which the clusters will be updated.
+ /// If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members.
+ /// The strategy of the UpdateRun can be modified until the run is started.
+ ///
+ internal FleetUpdateRunStrategy Strategy { get; set; }
+ /// The list of stages that compose this update run.
+ public IList StrategyStages
+ {
+ get => Strategy is null ? default : Strategy.Stages;
+ set => Strategy = new FleetUpdateRunStrategy(value);
+ }
+
+ /// The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started.
+ public FleetManagedClusterUpdate ManagedClusterUpdate { get; set; }
+ /// The status of the UpdateRun.
+ public FleetUpdateRunStatus Status { get; }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunResource.cs
new file mode 100644
index 000000000000..43a937381106
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/DatabaseFleetUpdateRunResource.cs
@@ -0,0 +1,443 @@
+// 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.DatabaseFleetManager
+{
+ ///
+ /// A Class representing a DatabaseFleetUpdateRun 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 GetDatabaseFleetUpdateRunResource method.
+ /// Otherwise you can get one from its parent resource using the GetDatabaseFleetUpdateRun method.
+ ///
+ public partial class DatabaseFleetUpdateRunResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _databaseFleetUpdateRunUpdateRunsClientDiagnostics;
+ private readonly UpdateRunsRestOperations _databaseFleetUpdateRunUpdateRunsRestClient;
+ private readonly DatabaseFleetUpdateRunData _data;
+
+ /// Initializes a new instance of the class for mocking.
+ protected DatabaseFleetUpdateRunResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal DatabaseFleetUpdateRunResource(ArmClient client, DatabaseFleetUpdateRunData 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 DatabaseFleetUpdateRunResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _databaseFleetUpdateRunUpdateRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string databaseFleetUpdateRunUpdateRunsApiVersion);
+ _databaseFleetUpdateRunUpdateRunsRestClient = new UpdateRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, databaseFleetUpdateRunUpdateRunsApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.ContainerService/fleets/updateRuns";
+
+ /// 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 DatabaseFleetUpdateRunData 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));
+ }
+
+ ///
+ /// Get a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetUpdateRunUpdateRunsRestClient.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 DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetUpdateRunUpdateRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DatabaseFleetUpdateRunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetUpdateRunUpdateRunsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(_databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetUpdateRunUpdateRunsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(_databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Resource create parameters.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a UpdateRun
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Resource create parameters.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, DatabaseFleetUpdateRunData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetUpdateRunUpdateRunsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Starts an UpdateRun.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Start
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual async Task> StartAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Start");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetUpdateRunUpdateRunsRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Starts an UpdateRun.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Start
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual ArmOperation Start(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Start");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetUpdateRunUpdateRunsRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Stops an UpdateRun.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Stop
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual async Task> StopAsync(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Stop");
+ scope.Start();
+ try
+ {
+ var response = await _databaseFleetUpdateRunUpdateRunsRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Stops an UpdateRun.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop
+ ///
+ /// -
+ /// Operation Id
+ /// UpdateRuns_Stop
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual ArmOperation Stop(WaitUntil waitUntil, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _databaseFleetUpdateRunUpdateRunsClientDiagnostics.CreateScope("DatabaseFleetUpdateRunResource.Stop");
+ scope.Start();
+ try
+ {
+ var response = _databaseFleetUpdateRunUpdateRunsRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken);
+ var operation = new DatabaseFleetManagerArmOperation(new DatabaseFleetUpdateRunOperationSource(Client), _databaseFleetUpdateRunUpdateRunsClientDiagnostics, Pipeline, _databaseFleetUpdateRunUpdateRunsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs
new file mode 100644
index 000000000000..0ed163b3dbe3
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs
@@ -0,0 +1,207 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ /// A class to add extension methods to Azure.ResourceManager.DatabaseFleetManager.
+ public static partial class DatabaseFleetManagerExtensions
+ {
+ private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmResource resource)
+ {
+ return resource.GetCachedClient(client =>
+ {
+ return new ResourceGroupResourceExtensionClient(client, resource.Id);
+ });
+ }
+
+ private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier scope)
+ {
+ return client.GetResourceClient(() =>
+ {
+ return new ResourceGroupResourceExtensionClient(client, scope);
+ });
+ }
+
+ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmResource resource)
+ {
+ return resource.GetCachedClient(client =>
+ {
+ return new SubscriptionResourceExtensionClient(client, resource.Id);
+ });
+ }
+
+ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier scope)
+ {
+ return client.GetResourceClient(() =>
+ {
+ return new SubscriptionResourceExtensionClient(client, scope);
+ });
+ }
+ #region DatabaseFleetResource
+ ///
+ /// 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 DatabaseFleetResource GetDatabaseFleetResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ DatabaseFleetResource.ValidateResourceId(id);
+ return new DatabaseFleetResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region DatabaseFleetMemberResource
+ ///
+ /// 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 DatabaseFleetMemberResource GetDatabaseFleetMemberResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ DatabaseFleetMemberResource.ValidateResourceId(id);
+ return new DatabaseFleetMemberResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region DatabaseFleetUpdateRunResource
+ ///
+ /// 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 DatabaseFleetUpdateRunResource GetDatabaseFleetUpdateRunResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ DatabaseFleetUpdateRunResource.ValidateResourceId(id);
+ return new DatabaseFleetUpdateRunResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ /// Gets a collection of DatabaseFleetResources in the ResourceGroupResource.
+ /// The instance the method will execute against.
+ /// An object representing collection of DatabaseFleetResources and their operations over a DatabaseFleetResource.
+ public static DatabaseFleetCollection GetDatabaseFleets(this ResourceGroupResource resourceGroupResource)
+ {
+ return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetDatabaseFleets();
+ }
+
+ ///
+ /// Gets a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Fleet resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public static async Task> GetDatabaseFleetAsync(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default)
+ {
+ return await resourceGroupResource.GetDatabaseFleets().GetAsync(fleetName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets a Fleet.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Fleet resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public static Response GetDatabaseFleet(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default)
+ {
+ return resourceGroupResource.GetDatabaseFleets().Get(fleetName, cancellationToken);
+ }
+
+ ///
+ /// Lists fleets in the specified subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_ListBySubscription
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetDatabaseFleetsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDatabaseFleetsAsync(cancellationToken);
+ }
+
+ ///
+ /// Lists fleets in the specified subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_ListBySubscription
+ ///
+ ///
+ ///
+ /// 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 GetDatabaseFleets(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDatabaseFleets(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs
new file mode 100644
index 000000000000..0e28b7080602
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ /// A class to add extension methods to ResourceGroupResource.
+ internal partial class ResourceGroupResourceExtensionClient : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected ResourceGroupResourceExtensionClient()
+ {
+ }
+
+ /// 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 ResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ /// Gets a collection of DatabaseFleetResources in the ResourceGroupResource.
+ /// An object representing collection of DatabaseFleetResources and their operations over a DatabaseFleetResource.
+ public virtual DatabaseFleetCollection GetDatabaseFleets()
+ {
+ return GetCachedClient(Client => new DatabaseFleetCollection(Client, Id));
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs
new file mode 100644
index 000000000000..e19ae88235b0
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Threading;
+using Autorest.CSharp.Core;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+ /// A class to add extension methods to SubscriptionResource.
+ internal partial class SubscriptionResourceExtensionClient : ArmResource
+ {
+ private ClientDiagnostics _databaseFleetFleetsClientDiagnostics;
+ private FleetsRestOperations _databaseFleetFleetsRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected SubscriptionResourceExtensionClient()
+ {
+ }
+
+ /// 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 SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private ClientDiagnostics DatabaseFleetFleetsClientDiagnostics => _databaseFleetFleetsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", DatabaseFleetResource.ResourceType.Namespace, Diagnostics);
+ private FleetsRestOperations DatabaseFleetFleetsRestClient => _databaseFleetFleetsRestClient ??= new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DatabaseFleetResource.ResourceType));
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// Lists fleets in the specified subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_ListBySubscription
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetDatabaseFleetsAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), DatabaseFleetFleetsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDatabaseFleets", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Lists fleets in the specified subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_ListBySubscription
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetDatabaseFleets(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatabaseFleetFleetsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatabaseFleetResource(Client, DatabaseFleetData.DeserializeDatabaseFleetData(e)), DatabaseFleetFleetsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDatabaseFleets", "value", "nextLink", cancellationToken);
+ }
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs
new file mode 100644
index 000000000000..919c363d8a1c
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+#pragma warning disable SA1649 // File name should match first type name
+ internal class DatabaseFleetManagerArmOperation : ArmOperation
+#pragma warning restore SA1649 // File name should match first type name
+ {
+ private readonly OperationInternal _operation;
+
+ /// Initializes a new instance of DatabaseFleetManagerArmOperation for mocking.
+ protected DatabaseFleetManagerArmOperation()
+ {
+ }
+
+ internal DatabaseFleetManagerArmOperation(Response response)
+ {
+ _operation = OperationInternal.Succeeded(response);
+ }
+
+ internal DatabaseFleetManagerArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null)
+ {
+ var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue);
+ _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DatabaseFleetManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy());
+ }
+
+ ///
+#pragma warning disable CA1822
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public override string Id => throw new NotImplementedException();
+#pragma warning restore CA1822
+
+ ///
+ public override bool HasCompleted => _operation.HasCompleted;
+
+ ///
+ public override Response GetRawResponse() => _operation.RawResponse;
+
+ ///
+ public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken);
+
+ ///
+ public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken);
+
+ ///
+ public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken);
+
+ ///
+ public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken);
+
+ ///
+ public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken);
+
+ ///
+ public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken);
+ }
+}
diff --git a/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs
new file mode 100644
index 000000000000..ce6524018cef
--- /dev/null
+++ b/sdk/fleet/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.DatabaseFleetManager
+{
+#pragma warning disable SA1649 // File name should match first type name
+ internal class DatabaseFleetManagerArmOperation : ArmOperation
+#pragma warning restore SA1649 // File name should match first type name
+ {
+ private readonly OperationInternal _operation;
+
+ /// Initializes a new instance of DatabaseFleetManagerArmOperation for mocking.
+ protected DatabaseFleetManagerArmOperation()
+ {
+ }
+
+ internal DatabaseFleetManagerArmOperation(Response response)
+ {
+ _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value);
+ }
+
+ internal DatabaseFleetManagerArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null)
+ {
+ var nextLinkOperation = NextLinkOperationImplementation.Create(source, pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue);
+ _operation = new OperationInternal