forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 23334 in Azure/azure-rest-api-specs
Dev cost management microsoft.cost management 2023 04 01 preview (Azure#23334) * Adds base for updating Microsoft.CostManagement from version stable/2022-10-01 to version 2023-04-01-preview * Updates readme * Updates API version in new specs and examples * Adding Budgets API translated from 2022-10-01 stable version of Micro… (Azure#22866) * Adding Budgets API translated from 2022-10-01 stable version of Microsoft.Consumption/budgets * Updating api-version in examples to 2023-04-01-preview * Adding costmanagement.budgets.json to readme * Addressing Swagger LintDiff errors * Updating budget name pattern * Adding suppression for R4011 * Adding budget name pattern regex for only alphanumeric, underscore, or hyphen characters * fixing readme.go.md for budgets * removing "object" type from notifications dictionary keys * removing tags * removing mismatching enum values * updating notifications key type * Revert "updating notifications key type" This reverts commit eeb504b9016fb2214811e279da4ee318c37f6652. * Revert "removing mismatching enum values" This reverts commit cba0132bac27f831c90ef8cfca836c8853680000. * updates to enum name * Removing incorrect/outdated description info * fixing BudgetsList example * Updating example Ids to use Microsoft.CostManagement RP * updating min & max length of budget name per conversations with PMs * Adding suppressions for DeleteOperationResponses, TopLevelResourcesListBySubscription, and NoDuplicatePathsForScopeParameter * fixing indentation in readme * fixing formatting of suppressions in readme * Adding paging back in, specifying as null for future use * Adding support for RU Alerts in new Budgets API version (Azure#23140) * Updating budgets swagger definition to include modifications from RU Alert category * Adding new examples for all scenarios of RU Alerts, added new examples for all scopes for Cost Budgets * Spelling & lintdiff fixes * prettier-fix * Added more descriptions, and some light markdown to larger descripitons * Addressing comments * prettier-fix * Updating description for amount property * addressing Shravan's offline comments * spell check * removing aws scopes from scope description * Addressing comments from internal review, removed legacy tags for EA * Alexprosak microsoft.cost management 2023 04 01 preview (Azure#23362) * Updating readme default tag * specifiying the word "update" in 200 response for budget createorupdate * updating tags to package-preview-2023-04-01 * readme test * Revert "readme test" This reverts commit 566e2e6dbcecc8ed3d0c31770788abcaed4840f8. * Revert "updating tags to package-preview-2023-04-01" This reverts commit f9cf3fe3474820afaad0163800aa2548343fae62. * Updating readme with previous apis not included and updated to current version * Revert "Updating readme with previous apis not included and updated to current version" This reverts commit bb879469fea9bf11852334822369310ee6a64534. * Alexprosak cost management microsoft.cost management 2023 04 01 preview (Azure#23770) * changing azure-sdk-for-net to azure-sdk-for-net-track2 per ask from comment on main branch PR * Adding in descriptions + examples for RU Alerts support at the customer scope * fixing json formatting * fixing example references * Updating costmanagementproxyresource to reference ARM common proxy resource. Minor formatting change on scope parameter * Updating common-types with updates to common-types from 2022-10-01 version * prettier-fix * Alprosms cost management microsoft.cost management 2023 04 01 preview (Azure#23795) * updating costdetailreport swaggers from recent changes to 2022-10-01 version * suppressing invalid LintDiff errors
- Loading branch information
SDKAuto
committed
May 4, 2023
1 parent
9d94f05
commit ca0957a
Showing
13 changed files
with
340 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
...anagement/Azure.ResourceManager.Cost-Management/Azure.ResourceManager.Cost-Management.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("{33ECA988-F5DD-4FB9-B131-EFB51B143AEE}") = "Azure.ResourceManager.Cost_Management", "src\Azure.ResourceManager.Cost_Management.csproj", "{C3289DA0-108B-478D-A7C2-EFF520CE47A2}" | ||
EndProject | ||
Project("{33ECA988-F5DD-4FB9-B131-EFB51B143AEE}") = "Azure.ResourceManager.Cost_Management.Tests", "tests\Azure.ResourceManager.Cost_Management.Tests.csproj", "{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}" | ||
EndProject | ||
Project("{33ECA988-F5DD-4FB9-B131-EFB51B143AEE}") = "Azure.ResourceManager.Cost_Management.Samples", "samples\Azure.ResourceManager.Cost_Management.Samples.csproj", "{66BC3104-1781-4E16-9BA2-0B497C113DA5}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {E5D9BE11-3A70-45C0-85EE-53C9C96E5D42} | ||
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 | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Debug|x64.Build.0 = Debug|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Debug|x86.Build.0 = Debug|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Release|x64.ActiveCfg = Release|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Release|x64.Build.0 = Release|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Release|x86.ActiveCfg = Release|Any CPU | ||
{C3289DA0-108B-478D-A7C2-EFF520CE47A2}.Release|x86.Build.0 = Release|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Debug|x64.Build.0 = Debug|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Debug|x86.Build.0 = Debug|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Release|x64.ActiveCfg = Release|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Release|x64.Build.0 = Release|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Release|x86.ActiveCfg = Release|Any CPU | ||
{B89CC73C-A1D9-4932-8B30-2EBA67B6B2DD}.Release|x86.Build.0 = Release|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Debug|x64.Build.0 = Debug|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Debug|x86.Build.0 = Debug|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Release|x64.ActiveCfg = Release|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Release|x64.Build.0 = Release|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Release|x86.ActiveCfg = Release|Any CPU | ||
{66BC3104-1781-4E16-9BA2-0B497C113DA5}.Release|x86.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
17 changes: 17 additions & 0 deletions
17
sdk/cost-management/Azure.ResourceManager.Cost-Management/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Release History | ||
|
||
## 1.0.0-beta.1 (Unreleased) | ||
|
||
### 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). |
6 changes: 6 additions & 0 deletions
6
sdk/cost-management/Azure.ResourceManager.Cost-Management/Directory.Build.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
80 changes: 80 additions & 0 deletions
80
sdk/cost-management/Azure.ResourceManager.Cost-Management/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Microsoft Azure cost-management 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 cost-management management library for .NET with [NuGet](https://www.nuget.org/): | ||
|
||
```dotnetcli | ||
dotnet add package Azure.ResourceManager.Cost_Management --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 <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 | ||
(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 | ||
<[email protected]> with any other 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/ |
10 changes: 10 additions & 0 deletions
10
...ourceManager.Cost-Management/samples/Azure.ResourceManager.Cost-Management.Samples.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<ItemGroup> | ||
<PackageReference Include="Azure.Identity"/> | ||
<PackageReference Include="NUnit" /> | ||
<PackageReference Include="NUnit3TestAdapter" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\src\Azure.ResourceManager.Cost_Management.csproj" /> | ||
</ItemGroup> | ||
</Project> |
13 changes: 13 additions & 0 deletions
13
...cost-management/Azure.ResourceManager.Cost-Management/samples/autorest.tests.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated code configuration | ||
|
||
Run `dotnet build /t:GenerateTests` to generate code. | ||
|
||
# Azure.ResourceManager.cost-management.Tests | ||
|
||
> see https://aka.ms/autorest | ||
``` yaml | ||
require: ../src/autorest.md | ||
include-x-ms-examples-original-file: true | ||
testgen: | ||
sample: true | ||
``` |
8 changes: 8 additions & 0 deletions
8
...nt/Azure.ResourceManager.Cost-Management/src/Azure.ResourceManager.Cost-Management.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Cost_Management</PackageId> | ||
<Description>Azure Resource Manager client SDK for Azure resource provider cost-management.</Description> | ||
<PackageTags>azure;management;arm;resource manager;cost-management</PackageTags> | ||
</PropertyGroup> | ||
</Project> |
9 changes: 9 additions & 0 deletions
9
sdk/cost-management/Azure.ResourceManager.Cost-Management/src/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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("cost-management")] | ||
|
||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] | ||
[assembly: InternalsVisibleTo("Azure.ResourceManager.Cost_Management.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] |
49 changes: 49 additions & 0 deletions
49
sdk/cost-management/Azure.ResourceManager.Cost-Management/src/autorest.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Generated code configuration | ||
|
||
Run `dotnet build /t:GenerateCode` to generate code. | ||
|
||
``` yaml | ||
azure-arm: true | ||
csharp: true | ||
library-name: cost-management | ||
namespace: Azure.ResourceManager.cost-management | ||
require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/cost-management/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 | ||
|
||
``` |
5 changes: 5 additions & 0 deletions
5
....ResourceManager.Cost-Management/tests/Azure.ResourceManager.Cost-Management.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Cost_Management.csproj" /> | ||
</ItemGroup> | ||
</Project> |
43 changes: 43 additions & 0 deletions
43
...nagement/Azure.ResourceManager.Cost-Management/tests/cost-managementManagementTestBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.Cost_Management.Tests | ||
{ | ||
public class cost-managementManagementTestBase : ManagementRecordedTestBase<cost-managementManagementTestEnvironment> | ||
{ | ||
protected ArmClient Client { get; private set; } | ||
protected SubscriptionResource DefaultSubscription { get; private set; } | ||
|
||
protected cost-managementManagementTestBase(bool isAsync, RecordedTestMode mode) | ||
: base(isAsync, mode) | ||
{ | ||
} | ||
|
||
protected cost-managementManagementTestBase(bool isAsync) | ||
: base(isAsync) | ||
{ | ||
} | ||
|
||
[SetUp] | ||
public async Task CreateCommonClient() | ||
{ | ||
Client = GetArmClient(); | ||
DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); | ||
} | ||
|
||
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; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...t/Azure.ResourceManager.Cost-Management/tests/cost-managementManagementTestEnvironment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Cost_Management.Tests | ||
{ | ||
public class cost-managementManagementTestEnvironment : TestEnvironment | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/cost-management/ci.mgmt.yml | ||
- sdk/cost-management/Azure.ResourceManager.Cost_Management/ | ||
|
||
extends: | ||
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml | ||
parameters: | ||
ServiceDirectory: cost-management | ||
LimitForPullRequest: true | ||
Artifacts: | ||
- name: Azure.ResourceManager.Cost_Management | ||
safeName: AzureResourceManagerCost-Management |