Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR Azure.ResourceManager.Sql] Adding new Virtual Cluster APIs #797

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions sdk/sql/Azure.ResourceManager.Sql/Azure.ResourceManager.Sql.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30309.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{90A56966-6BD0-4698-974B-0928F4E62E63}") = "Azure.ResourceManager.Sql", "src\Azure.ResourceManager.Sql.csproj", "{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}"
EndProject
Project("{90A56966-6BD0-4698-974B-0928F4E62E63}") = "Azure.ResourceManager.Sql.Tests", "tests\Azure.ResourceManager.Sql.Tests.csproj", "{1A655146-6AFE-446B-A219-9157A9A15C54}"
EndProject
Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9FD74754-ED2A-4A34-B680-0A1D4178597D}
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
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Debug|x64.ActiveCfg = Debug|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Debug|x64.Build.0 = Debug|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Debug|x86.ActiveCfg = Debug|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Debug|x86.Build.0 = Debug|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Release|Any CPU.Build.0 = Release|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Release|x64.ActiveCfg = Release|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Release|x64.Build.0 = Release|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Release|x86.ActiveCfg = Release|Any CPU
{CB00C427-43A2-46E2-A4EE-4F9577DC1CCC}.Release|x86.Build.0 = Release|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Debug|x64.ActiveCfg = Debug|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Debug|x64.Build.0 = Debug|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Debug|x86.ActiveCfg = Debug|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Debug|x86.Build.0 = Debug|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Release|Any CPU.Build.0 = Release|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Release|x64.ActiveCfg = Release|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Release|x64.Build.0 = Release|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Release|x86.ActiveCfg = Release|Any CPU
{1A655146-6AFE-446B-A219-9157A9A15C54}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
15 changes: 15 additions & 0 deletions sdk/sql/Azure.ResourceManager.Sql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Release History

## 1.0.0-beta.1 (Unreleased)

### General New Features

- 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 follows the [Azure SDK Design Guidelines for .NET](https://azure.github.io/azure-sdk/dotnet_introduction.html) which provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more.

This is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues).
6 changes: 6 additions & 0 deletions sdk/sql/Azure.ResourceManager.Sql/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Add any shared properties you want for the projects under this package directory that need to be set before the auto imported Directory.Build.props
-->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
</Project>
76 changes: 76 additions & 0 deletions sdk/sql/Azure.ResourceManager.Sql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Azure sql Management client library for .NET

This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html) which provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more.

## Getting started

### Install the package

Install the Azure sql management library for .NET with [NuGet](https://www.nuget.org/):

```dotnetcli
dotnet add package Azure.ResourceManager.Sql --prerelease
```

### Prerequisites

* You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/)

### Authenticate the Client

To create an authenticated client and start interacting with Azure resources, please 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 Azure .NET SDK 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://docs.microsoft.com/samples/browse/?branch=master&languages=csharp&term=managing%20using%20Azure%20.NET%20SDK)

## 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 on Azure SDK, please refer to [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 <https://cla.microsoft.com>.

When you submit a pull request, a CLA-bot will automatically determine
whether you need to provide a CLA and decorate the PR appropriately
(e.g., label, comment). Simply follow the instructions provided by the
bot. You will only need to do this 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
<[email protected]> with any additional questions or comments.

<!-- LINKS -->
[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/
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.0-beta.1</Version>
<PackageId>Azure.ResourceManager.Sql</PackageId>
<Description>Azure Resource Manager client SDK for Azure resource provider sql</Description>
<PackageTags>azure;management;arm;resource manager;sql</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Runtime.CompilerServices;

[assembly: Azure.Core.AzureResourceProviderNamespace("sql")]

[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
[assembly: InternalsVisibleTo("Azure.ResourceManager.Sql.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")]
50 changes: 50 additions & 0 deletions sdk/sql/Azure.ResourceManager.Sql/src/autorest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Generated code configuration

Run `dotnet build /t:GenerateCode` to generate code.

``` yaml

azure-arm: true
csharp: true
library-name: sql
namespace: Azure.ResourceManager.sql
require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/sql/resource-manager/readme.md
output-folder: $(this-folder)/Generated
clear-output-folder: true
skip-csproj: true
modelerfour:
flatten-payloads: false



format-by-name-rules:
'tenantId': 'uuid'
'ETag': 'etag'
'location': 'azure-location'
'*Uri': 'Uri'
'*Uris': 'Uri'

rename-rules:
CPU: Cpu
CPUs: Cpus
Os: OS
Ip: IP
Ips: IPs|ips
ID: Id
IDs: Ids
VM: Vm
VMs: Vms
Vmos: VmOS
VMScaleSet: VmScaleSet
DNS: Dns
VPN: Vpn
NAT: Nat
WAN: Wan
Ipv4: IPv4|ipv4
Ipv6: IPv6|ipv6
Ipsec: IPsec|ipsec
SSO: Sso
URI: Uri
Etag: ETag|etag

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\src\Azure.ResourceManager.Sql.csproj" />
</ItemGroup>
</Project>
41 changes: 41 additions & 0 deletions sdk/sql/Azure.ResourceManager.Sql/tests/sqlManagementTestBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// 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.Sql.Tests
{
public class sqlManagementTestBase : ManagementRecordedTestBase<sqlManagementTestEnvironment>
{
protected ArmClient Client { get; private set; }

protected sqlManagementTestBase(bool isAsync, RecordedTestMode mode)
: base(isAsync, mode)
{
}

protected sqlManagementTestBase(bool isAsync)
: base(isAsync)
{
}

[SetUp]
public void CreateCommonClient()
{
Client = GetArmClient();
}

protected async Task<ResourceGroupResource> 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;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core.TestFramework;

namespace Azure.ResourceManager.Sql.Tests
{
public class sqlManagementTestEnvironment : TestEnvironment
{
}
}