diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/Azure.ResourceManager.Migrate.sln b/sdk/migrate/Azure.ResourceManager.Migrate/Azure.ResourceManager.Migrate.sln new file mode 100644 index 000000000000..f0972ecef88e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/Azure.ResourceManager.Migrate.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("{F81DBCA3-38F4-49FB-B2DD-6988A7C5E5AF}") = "Azure.ResourceManager.Migrate", "src\Azure.ResourceManager.Migrate.csproj", "{1628E78F-1D91-4BF5-A63C-1634460131AA}" +EndProject +Project("{F81DBCA3-38F4-49FB-B2DD-6988A7C5E5AF}") = "Azure.ResourceManager.Migrate.Tests", "tests\Azure.ResourceManager.Migrate.Tests.csproj", "{CAD5AECF-F68B-47E5-8119-F270E6DA52CA}" +EndProject +Project("{F81DBCA3-38F4-49FB-B2DD-6988A7C5E5AF}") = "Azure.ResourceManager.Migrate.Samples", "samples\Azure.ResourceManager.Migrate.Samples.csproj", "{70444845-D9DC-4F9D-9CA5-437FB455B270}" +EndProject +Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {58138783-8C6D-41AA-AF59-6B1AC84AE768} + 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 + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Debug|x64.ActiveCfg = Debug|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Debug|x64.Build.0 = Debug|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Debug|x86.Build.0 = Debug|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Release|Any CPU.Build.0 = Release|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Release|x64.ActiveCfg = Release|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Release|x64.Build.0 = Release|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Release|x86.ActiveCfg = Release|Any CPU + {1628E78F-1D91-4BF5-A63C-1634460131AA}.Release|x86.Build.0 = Release|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Debug|x64.ActiveCfg = Debug|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Debug|x64.Build.0 = Debug|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Debug|x86.ActiveCfg = Debug|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Debug|x86.Build.0 = Debug|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Release|Any CPU.Build.0 = Release|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Release|x64.ActiveCfg = Release|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Release|x64.Build.0 = Release|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Release|x86.ActiveCfg = Release|Any CPU + {CAD5AECF-F68B-47E5-8119-F270E6DA52CA}.Release|x86.Build.0 = Release|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Debug|x64.ActiveCfg = Debug|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Debug|x64.Build.0 = Debug|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Debug|x86.ActiveCfg = Debug|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Debug|x86.Build.0 = Debug|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Release|Any CPU.Build.0 = Release|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Release|x64.ActiveCfg = Release|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Release|x64.Build.0 = Release|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Release|x86.ActiveCfg = Release|Any CPU + {70444845-D9DC-4F9D-9CA5-437FB455B270}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/CHANGELOG.md b/sdk/migrate/Azure.ResourceManager.Migrate/CHANGELOG.md new file mode 100644 index 000000000000..1a85987a15b9 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/CHANGELOG.md @@ -0,0 +1,19 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + + + +### Features Added + +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/migrate/Azure.ResourceManager.Migrate/Directory.Build.props b/sdk/migrate/Azure.ResourceManager.Migrate/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/README.md b/sdk/migrate/Azure.ResourceManager.Migrate/README.md new file mode 100644 index 000000000000..a214291e6255 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure migrate management client library for .NET + +**[Describe the service briefly first.]** + +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 migrate management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.Migrate --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/migrate/Azure.ResourceManager.Migrate/assets.json b/sdk/migrate/Azure.ResourceManager.Migrate/assets.json new file mode 100644 index 000000000000..66f80c3423df --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/migrate/Azure.ResourceManager.Migrate", + "Tag": "" +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/samples/Azure.ResourceManager.Migrate.Samples.csproj b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Azure.ResourceManager.Migrate.Samples.csproj new file mode 100644 index 000000000000..34492554781c --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/samples/Azure.ResourceManager.Migrate.Samples.csproj @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Azure.ResourceManager.Migrate.csproj b/sdk/migrate/Azure.ResourceManager.Migrate/src/Azure.ResourceManager.Migrate.csproj new file mode 100644 index 000000000000..c6d0ba9c0768 --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Azure.ResourceManager.Migrate.csproj @@ -0,0 +1,8 @@ + + + 1.0.0-beta.1 + Azure.ResourceManager.Migrate + Azure Resource Manager client SDK for Azure resource provider migrate. + azure;management;arm;resource manager;migrate + + diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/src/Properties/AssemblyInfo.cs b/sdk/migrate/Azure.ResourceManager.Migrate/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..ba25bd9808ef --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/src/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: Azure.Core.AzureResourceProviderNamespace("migrate")] + +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.Migrate.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/tests/Azure.ResourceManager.Migrate.Tests.csproj b/sdk/migrate/Azure.ResourceManager.Migrate/tests/Azure.ResourceManager.Migrate.Tests.csproj new file mode 100644 index 000000000000..9a1d129d3f4e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/tests/Azure.ResourceManager.Migrate.Tests.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/tests/migrateManagementTestBase.cs b/sdk/migrate/Azure.ResourceManager.Migrate/tests/migrateManagementTestBase.cs new file mode 100644 index 000000000000..ec88771b996e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/tests/migrateManagementTestBase.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.Migrate.Tests +{ + public class migrateManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected migrateManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected migrateManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/tests/migrateManagementTestEnvironment.cs b/sdk/migrate/Azure.ResourceManager.Migrate/tests/migrateManagementTestEnvironment.cs new file mode 100644 index 000000000000..ee8d7e3b107e --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/tests/migrateManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.Migrate.Tests +{ + public class migrateManagementTestEnvironment : TestEnvironment + { + } +} \ No newline at end of file diff --git a/sdk/migrate/Azure.ResourceManager.Migrate/tsp-location.yaml b/sdk/migrate/Azure.ResourceManager.Migrate/tsp-location.yaml new file mode 100644 index 000000000000..14e2b1bf657d --- /dev/null +++ b/sdk/migrate/Azure.ResourceManager.Migrate/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/migrate/TypeSpecDirectory +commit: CommitId +repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/migrate/ci.mgmt.yml b/sdk/migrate/ci.mgmt.yml new file mode 100644 index 000000000000..af388365c2e7 --- /dev/null +++ b/sdk/migrate/ci.mgmt.yml @@ -0,0 +1,24 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/migrate/ci.mgmt.yml + - sdk/migrate/Azure.ResourceManager.Migrate/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: migrate + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.Migrate + safeName: AzureResourceManagerMigrate diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 960151044171..fb4a824c1f8f 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -125,6 +125,7 @@ trigger: - sdk/marketplace/Azure.ResourceManager.Marketplace - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering - sdk/mediaservices/Azure.ResourceManager.Media + - sdk/migrate/Azure.ResourceManager.Migrate - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap - sdk/mixedreality/Azure.ResourceManager.MixedReality - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork @@ -330,6 +331,7 @@ pr: - sdk/marketplace/Azure.ResourceManager.Marketplace - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering - sdk/mediaservices/Azure.ResourceManager.Media + - sdk/migrate/Azure.ResourceManager.Migrate - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap - sdk/mixedreality/Azure.ResourceManager.MixedReality - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork