Skip to content

Commit 76081d3

Browse files
authored
Upgrade Azure.ResourceManager.Dynatrace (#54174)
1 parent 8f2a77f commit 76081d3

File tree

204 files changed

+10945
-11057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+10945
-11057
lines changed

doc/GeneratorMigration/Library_Inventory.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
- Total libraries: 394
1616
- Management Plane (MPG): 225
17-
- Autorest/Swagger: 159
18-
- New Emitter (TypeSpec): 25
17+
- Autorest/Swagger: 158
18+
- New Emitter (TypeSpec): 26
1919
- Old TypeSpec: 41
2020
- Data Plane (DPG): 169
2121
- Autorest/Swagger: 86
@@ -166,7 +166,7 @@ Libraries that have not yet been migrated to the new TypeSpec emitter. Total: 86
166166

167167
Libraries that provide resource management APIs for Azure services and have been migrated to the new TypeSpec emitter.
168168

169-
**Migration Status**: 25 / 66 (37.9%)
169+
**Migration Status**: 26 / 67 (38.8%)
170170

171171
| Service | Library | New Emitter |
172172
| ------- | ------- | ----------- |
@@ -192,6 +192,7 @@ Libraries that provide resource management APIs for Azure services and have been
192192
| devopsinfrastructure | Azure.ResourceManager.DevOpsInfrastructure | |
193193
| disconnectedoperations | Azure.ResourceManager.DisconnectedOperations | |
194194
| durabletask | Azure.ResourceManager.DurableTask ||
195+
| dynatrace | Azure.ResourceManager.Dynatrace ||
195196
| elastic | Azure.ResourceManager.Elastic | |
196197
| elasticsan | Azure.ResourceManager.ElasticSan | |
197198
| fabric | Azure.ResourceManager.Fabric | |
@@ -240,7 +241,7 @@ Libraries that provide resource management APIs for Azure services and have been
240241

241242
## Management Plane Libraries (MPG) - Still on Swagger
242243

243-
Libraries that have not yet been migrated to the new TypeSpec emitter. Total: 159
244+
Libraries that have not yet been migrated to the new TypeSpec emitter. Total: 158
244245

245246
| Service | Library |
246247
| ------- | ------- |
@@ -301,7 +302,6 @@ Libraries that have not yet been migrated to the new TypeSpec emitter. Total: 15
301302
| digitaltwins | Azure.ResourceManager.DigitalTwins |
302303
| dns | Azure.ResourceManager.Dns |
303304
| dnsresolver | Azure.ResourceManager.DnsResolver |
304-
| dynatrace | Azure.ResourceManager.Dynatrace |
305305
| edgeorder | Azure.ResourceManager.EdgeOrder |
306306
| edgezones | Azure.ResourceManager.EdgeZones |
307307
| eventgrid | Azure.ResourceManager.EventGrid |

sdk/dynatrace/Azure.ResourceManager.Dynatrace/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
### Features Added
66

7-
- - Upgraded api-version tag to 'package-2024-04-24'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/7eb817d513e6b2364a823d1f56db45d25fdca7b7/specification/dynatrace/resource-manager/readme.md.
7+
- Upgraded api-version to '2024-04-24'.
8+
- Make `Azure.ResourceManager.Dynatrace` AOT-compatible.
89

910
## 1.1.1 (2025-03-11)
1011

sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.net8.0.cs

Lines changed: 242 additions & 99 deletions
Large diffs are not rendered by default.

sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.netstandard2.0.cs

Lines changed: 242 additions & 99 deletions
Large diffs are not rendered by default.

sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/ArmDynatraceModelFactory.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33

44
#nullable disable
55

6-
using System;
76
using System.Collections.Generic;
87
using System.ComponentModel;
9-
using System.Linq;
108
using Azure.Core;
119
using Azure.ResourceManager.Models;
1210

sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/DynatraceMonitorData.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
#nullable disable
55

6-
using System;
7-
using System.Collections.Generic;
8-
using Azure.Core;
96
using Azure.ResourceManager.Models;
107

118
namespace Azure.ResourceManager.Dynatrace

sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/DynatraceMonitorResource.cs

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
using System.ComponentModel;
88
using System.Threading;
99
using System.Threading.Tasks;
10-
using Autorest.CSharp.Core;
11-
using Azure.Core;
1210
using Azure.ResourceManager.Dynatrace.Models;
1311

1412
namespace Azure.ResourceManager.Dynatrace
@@ -27,32 +25,18 @@ public partial class DynatraceMonitorResource
2725
/// <description>Monitors_GetAccountCredentials</description>
2826
/// </item>
2927
/// <item>
30-
/// <term>Default Api Version</term>
31-
/// <description>2021-09-01</description>
32-
/// </item>
33-
/// <item>
3428
/// <term>Resource</term>
3529
/// <description><see cref="DynatraceMonitorResource"/></description>
3630
/// </item>
3731
/// </list>
3832
/// </summary>
3933
/// <param name="cancellationToken"> The cancellation token to use. </param>
4034
// Add this custom code due to the api compatibility for operation: Monitors_GetAccountCredentials.
35+
[Obsolete("This method is obsolete and will be removed in a future release.")]
4136
[EditorBrowsable(EditorBrowsableState.Never)]
42-
public virtual async Task<Response<DynatraceAccountCredentialsInfo>> GetAccountCredentialsAsync(CancellationToken cancellationToken = default)
37+
public virtual Task<Response<DynatraceAccountCredentialsInfo>> GetAccountCredentialsAsync(CancellationToken cancellationToken = default)
4338
{
44-
using var scope = _dynatraceMonitorMonitorsClientDiagnostics.CreateScope("DynatraceMonitorResource.GetAccountCredentials");
45-
scope.Start();
46-
try
47-
{
48-
var response = await _dynatraceMonitorMonitorsRestClient.GetAccountCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
49-
return response;
50-
}
51-
catch (Exception e)
52-
{
53-
scope.Failed(e);
54-
throw;
55-
}
39+
throw new NotSupportedException("This method is no longer supported.");
5640
}
5741

5842
/// <summary>
@@ -78,21 +62,11 @@ public virtual async Task<Response<DynatraceAccountCredentialsInfo>> GetAccountC
7862
/// </summary>
7963
/// <param name="cancellationToken"> The cancellation token to use. </param>
8064
// Add this custom code due to the api compatibility for operation: Monitors_GetAccountCredentials.
65+
[Obsolete("This method is obsolete and will be removed in a future release.")]
8166
[EditorBrowsable(EditorBrowsableState.Never)]
8267
public virtual Response<DynatraceAccountCredentialsInfo> GetAccountCredentials(CancellationToken cancellationToken = default)
8368
{
84-
using var scope = _dynatraceMonitorMonitorsClientDiagnostics.CreateScope("DynatraceMonitorResource.GetAccountCredentials");
85-
scope.Start();
86-
try
87-
{
88-
var response = _dynatraceMonitorMonitorsRestClient.GetAccountCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
89-
return response;
90-
}
91-
catch (Exception e)
92-
{
93-
scope.Failed(e);
94-
throw;
95-
}
69+
throw new NotSupportedException("This method is no longer supported.");
9670
}
9771

9872
/// <summary>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
#nullable disable
5+
6+
using Azure.ResourceManager.Dynatrace.Models;
7+
using Azure.ResourceManager.Models;
8+
9+
namespace Azure.ResourceManager.Dynatrace
10+
{
11+
/// <summary> Single sign-on configurations for a given monitor resource. </summary>
12+
public partial class DynatraceSingleSignOnData : ResourceData
13+
{
14+
/// <summary> Initializes a new instance of <see cref="DynatraceSingleSignOnData"/>. </summary>
15+
public DynatraceSingleSignOnData()
16+
{
17+
Properties = new DynatraceSingleSignOnProperties();
18+
}
19+
}
20+
}

sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/DynatraceTagRuleData.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ namespace Azure.ResourceManager.Dynatrace
1111
{
1212
public partial class DynatraceTagRuleData
1313
{
14+
/// <summary> Initializes a new instance of <see cref="DynatraceTagRuleData"/>. </summary>
15+
public DynatraceTagRuleData()
16+
{
17+
Properties = new DynatraceTagRuleProperties();
18+
}
19+
1420
/// <summary> List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. </summary>
1521
// Add this property due to the previous swagger definition for MetricRules only had FilteringTags as a direct child property.
1622
[EditorBrowsable(EditorBrowsableState.Never)]

sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/DynatraceTagRuleResource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public virtual async Task<Response<DynatraceTagRuleResource>> UpdateAsync(Dynatr
4949
MetricRules = patch.MetricRules
5050
};
5151

52-
using var scope = _dynatraceTagRuleTagRulesClientDiagnostics.CreateScope("DynatraceTagRuleResource.UpdateAsync");
52+
using var scope = _tagRulesClientDiagnostics.CreateScope("DynatraceTagRuleResource.UpdateAsync");
5353
scope.Start();
5454
try
5555
{
@@ -98,7 +98,7 @@ public virtual Response<DynatraceTagRuleResource> Update(DynatraceTagRulePatch p
9898
MetricRules = patch.MetricRules
9999
};
100100

101-
using var scope = _dynatraceTagRuleTagRulesClientDiagnostics.CreateScope("DynatraceTagRuleResource.UpdateAsync");
101+
using var scope = _tagRulesClientDiagnostics.CreateScope("DynatraceTagRuleResource.UpdateAsync");
102102
scope.Start();
103103
try
104104
{

0 commit comments

Comments
 (0)