Skip to content

Commit 3b9196f

Browse files
ransinha1989CopilotCopilot
authored
[Az.TrafficManager] Upgrade SDK to stable API version 2026-09-01 (GA RecordType) (#30192)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Copilot-Session: 17669e35-4f22-43b6-8b90-0c891186c571 Copilot-Session: f9a6fe31-5d27-4a95-a0fe-f01fd42ab007
1 parent 8c25121 commit 3b9196f

82 files changed

Lines changed: 3352 additions & 991 deletions

File tree

Some content is hidden

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

‎src/TrafficManager/TrafficManager.Management.Sdk/Generated/EndpointsOperations.cs‎

Lines changed: 81 additions & 120 deletions
Large diffs are not rendered by default.

‎src/TrafficManager/TrafficManager.Management.Sdk/Generated/EndpointsOperationsExtensions.cs‎

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Microsoft.Azure.Management.TrafficManager
1313
public static partial class EndpointsOperationsExtensions
1414
{
1515
/// <summary>
16-
/// Update a Traffic Manager endpoint.
16+
/// Gets a Traffic Manager endpoint.
1717
/// </summary>
1818
/// <param name='operations'>
1919
/// The operations group for this extension method.
@@ -25,18 +25,18 @@ public static partial class EndpointsOperationsExtensions
2525
/// The name of the Traffic Manager profile.
2626
/// </param>
2727
/// <param name='endpointType'>
28-
/// The type of the Traffic Manager endpoint to be updated. Only AzureEndpoints, ExternalEndpoints and NestedEndpoints are allowed here.
28+
/// The type of the Traffic Manager endpoint.
2929
/// </param>
3030
/// <param name='endpointName'>
31-
/// The name of the Traffic Manager endpoint to be updated.
31+
/// The name of the Traffic Manager endpoint.
3232
/// </param>
33-
public static Endpoint Update(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters)
33+
public static Endpoint Get(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName)
3434
{
35-
return ((IEndpointsOperations)operations).UpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).GetAwaiter().GetResult();
35+
return ((IEndpointsOperations)operations).GetAsync(resourceGroupName, profileName, endpointType, endpointName).GetAwaiter().GetResult();
3636
}
3737

3838
/// <summary>
39-
/// Update a Traffic Manager endpoint.
39+
/// Gets a Traffic Manager endpoint.
4040
/// </summary>
4141
/// <param name='operations'>
4242
/// The operations group for this extension method.
@@ -48,23 +48,23 @@ public static Endpoint Update(this IEndpointsOperations operations, string resou
4848
/// The name of the Traffic Manager profile.
4949
/// </param>
5050
/// <param name='endpointType'>
51-
/// The type of the Traffic Manager endpoint to be updated. Only AzureEndpoints, ExternalEndpoints and NestedEndpoints are allowed here.
51+
/// The type of the Traffic Manager endpoint.
5252
/// </param>
5353
/// <param name='endpointName'>
54-
/// The name of the Traffic Manager endpoint to be updated.
54+
/// The name of the Traffic Manager endpoint.
5555
/// </param>
5656
/// <param name='cancellationToken'>
5757
/// The cancellation token.
5858
/// </param>
59-
public static async System.Threading.Tasks.Task<Endpoint> UpdateAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
59+
public static async System.Threading.Tasks.Task<Endpoint> GetAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
6060
{
61-
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, null, cancellationToken).ConfigureAwait(false))
61+
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, null, cancellationToken).ConfigureAwait(false))
6262
{
6363
return _result.Body;
6464
}
6565
}
6666
/// <summary>
67-
/// Gets a Traffic Manager endpoint.
67+
/// Create or update a Traffic Manager endpoint.
6868
/// </summary>
6969
/// <param name='operations'>
7070
/// The operations group for this extension method.
@@ -76,18 +76,18 @@ public static Endpoint Update(this IEndpointsOperations operations, string resou
7676
/// The name of the Traffic Manager profile.
7777
/// </param>
7878
/// <param name='endpointType'>
79-
/// The type of the Traffic Manager endpoint. Only AzureEndpoints, ExternalEndpoints and NestedEndpoints are allowed here.
79+
/// The type of the Traffic Manager endpoint.
8080
/// </param>
8181
/// <param name='endpointName'>
8282
/// The name of the Traffic Manager endpoint.
8383
/// </param>
84-
public static Endpoint Get(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName)
84+
public static Endpoint CreateOrUpdate(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters)
8585
{
86-
return ((IEndpointsOperations)operations).GetAsync(resourceGroupName, profileName, endpointType, endpointName).GetAwaiter().GetResult();
86+
return ((IEndpointsOperations)operations).CreateOrUpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).GetAwaiter().GetResult();
8787
}
8888

8989
/// <summary>
90-
/// Gets a Traffic Manager endpoint.
90+
/// Create or update a Traffic Manager endpoint.
9191
/// </summary>
9292
/// <param name='operations'>
9393
/// The operations group for this extension method.
@@ -99,23 +99,23 @@ public static Endpoint Get(this IEndpointsOperations operations, string resource
9999
/// The name of the Traffic Manager profile.
100100
/// </param>
101101
/// <param name='endpointType'>
102-
/// The type of the Traffic Manager endpoint. Only AzureEndpoints, ExternalEndpoints and NestedEndpoints are allowed here.
102+
/// The type of the Traffic Manager endpoint.
103103
/// </param>
104104
/// <param name='endpointName'>
105105
/// The name of the Traffic Manager endpoint.
106106
/// </param>
107107
/// <param name='cancellationToken'>
108108
/// The cancellation token.
109109
/// </param>
110-
public static async System.Threading.Tasks.Task<Endpoint> GetAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
110+
public static async System.Threading.Tasks.Task<Endpoint> CreateOrUpdateAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
111111
{
112-
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, null, cancellationToken).ConfigureAwait(false))
112+
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, null, cancellationToken).ConfigureAwait(false))
113113
{
114114
return _result.Body;
115115
}
116116
}
117117
/// <summary>
118-
/// Create or update a Traffic Manager endpoint.
118+
/// Update a Traffic Manager endpoint.
119119
/// </summary>
120120
/// <param name='operations'>
121121
/// The operations group for this extension method.
@@ -127,18 +127,18 @@ public static Endpoint Get(this IEndpointsOperations operations, string resource
127127
/// The name of the Traffic Manager profile.
128128
/// </param>
129129
/// <param name='endpointType'>
130-
/// The type of the Traffic Manager endpoint to be created or updated. Only AzureEndpoints, ExternalEndpoints and NestedEndpoints are allowed here.
130+
/// The type of the Traffic Manager endpoint.
131131
/// </param>
132132
/// <param name='endpointName'>
133-
/// The name of the Traffic Manager endpoint to be created or updated.
133+
/// The name of the Traffic Manager endpoint.
134134
/// </param>
135-
public static Endpoint CreateOrUpdate(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters)
135+
public static Endpoint Update(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters)
136136
{
137-
return ((IEndpointsOperations)operations).CreateOrUpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).GetAwaiter().GetResult();
137+
return ((IEndpointsOperations)operations).UpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).GetAwaiter().GetResult();
138138
}
139139

140140
/// <summary>
141-
/// Create or update a Traffic Manager endpoint.
141+
/// Update a Traffic Manager endpoint.
142142
/// </summary>
143143
/// <param name='operations'>
144144
/// The operations group for this extension method.
@@ -150,17 +150,17 @@ public static Endpoint CreateOrUpdate(this IEndpointsOperations operations, stri
150150
/// The name of the Traffic Manager profile.
151151
/// </param>
152152
/// <param name='endpointType'>
153-
/// The type of the Traffic Manager endpoint to be created or updated. Only AzureEndpoints, ExternalEndpoints and NestedEndpoints are allowed here.
153+
/// The type of the Traffic Manager endpoint.
154154
/// </param>
155155
/// <param name='endpointName'>
156-
/// The name of the Traffic Manager endpoint to be created or updated.
156+
/// The name of the Traffic Manager endpoint.
157157
/// </param>
158158
/// <param name='cancellationToken'>
159159
/// The cancellation token.
160160
/// </param>
161-
public static async System.Threading.Tasks.Task<Endpoint> CreateOrUpdateAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
161+
public static async System.Threading.Tasks.Task<Endpoint> UpdateAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
162162
{
163-
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, null, cancellationToken).ConfigureAwait(false))
163+
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, null, cancellationToken).ConfigureAwait(false))
164164
{
165165
return _result.Body;
166166
}
@@ -178,10 +178,10 @@ public static Endpoint CreateOrUpdate(this IEndpointsOperations operations, stri
178178
/// The name of the Traffic Manager profile.
179179
/// </param>
180180
/// <param name='endpointType'>
181-
/// The type of the Traffic Manager endpoint to be deleted. Only AzureEndpoints, ExternalEndpoints and NestedEndpoints are allowed here.
181+
/// The type of the Traffic Manager endpoint.
182182
/// </param>
183183
/// <param name='endpointName'>
184-
/// The name of the Traffic Manager endpoint to be deleted.
184+
/// The name of the Traffic Manager endpoint.
185185
/// </param>
186186
public static void Delete(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName)
187187
{
@@ -201,10 +201,10 @@ public static void Delete(this IEndpointsOperations operations, string resourceG
201201
/// The name of the Traffic Manager profile.
202202
/// </param>
203203
/// <param name='endpointType'>
204-
/// The type of the Traffic Manager endpoint to be deleted. Only AzureEndpoints, ExternalEndpoints and NestedEndpoints are allowed here.
204+
/// The type of the Traffic Manager endpoint.
205205
/// </param>
206206
/// <param name='endpointName'>
207-
/// The name of the Traffic Manager endpoint to be deleted.
207+
/// The name of the Traffic Manager endpoint.
208208
/// </param>
209209
/// <param name='cancellationToken'>
210210
/// The cancellation token.

‎src/TrafficManager/TrafficManager.Management.Sdk/Generated/GeographicHierarchiesOperations.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ internal GeographicHierarchiesOperations (TrafficManagerManagementClient client)
3939
public TrafficManagerManagementClient Client { get; private set; }
4040

4141
/// <summary>
42-
/// Gets the default Geographic Hierarchy used by the Geographic traffic routing method.
42+
/// Gets the default Geographic Hierarchy used by the Geographic traffic
43+
/// routing method.
4344
/// </summary>
4445
/// <param name='customHeaders'>
4546
/// Headers that will be added to request.

‎src/TrafficManager/TrafficManager.Management.Sdk/Generated/GeographicHierarchiesOperationsExtensions.cs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ namespace Microsoft.Azure.Management.TrafficManager
1313
public static partial class GeographicHierarchiesOperationsExtensions
1414
{
1515
/// <summary>
16-
/// Gets the default Geographic Hierarchy used by the Geographic traffic routing method.
16+
/// Gets the default Geographic Hierarchy used by the Geographic traffic
17+
/// routing method.
1718
/// </summary>
1819
/// <param name='operations'>
1920
/// The operations group for this extension method.
@@ -24,7 +25,8 @@ public static TrafficManagerGeographicHierarchy GetDefault(this IGeographicHiera
2425
}
2526

2627
/// <summary>
27-
/// Gets the default Geographic Hierarchy used by the Geographic traffic routing method.
28+
/// Gets the default Geographic Hierarchy used by the Geographic traffic
29+
/// routing method.
2830
/// </summary>
2931
/// <param name='operations'>
3032
/// The operations group for this extension method.

‎src/TrafficManager/TrafficManager.Management.Sdk/Generated/HeatMapOperations.cs‎

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ internal HeatMapOperations (TrafficManagerManagementClient client)
4848
/// The name of the Traffic Manager profile.
4949
/// </param>
5050
/// <param name='topLeft'>
51-
/// The top left latitude,longitude pair of the rectangular viewport to query for.
51+
/// The top left latitude,longitude pair of the rectangular viewport to query
52+
/// for.
5253
/// </param>
5354
/// <param name='botRight'>
54-
/// The bottom right latitude,longitude pair of the rectangular viewport to query for.
55+
/// The bottom right latitude,longitude pair of the rectangular viewport to
56+
/// query for.
5557
/// </param>
5658
/// <param name='customHeaders'>
5759
/// Headers that will be added to request.
@@ -80,17 +82,12 @@ internal HeatMapOperations (TrafficManagerManagementClient client)
8082

8183
string heatMapType = "default";
8284

83-
if (this.Client.SubscriptionId == null)
84-
{
85-
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
86-
}
87-
if (this.Client.SubscriptionId != null)
85+
if (this.Client.ApiVersion == null)
8886
{
89-
if (this.Client.SubscriptionId.Length < 1)
90-
{
91-
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1);
92-
}
87+
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
9388
}
89+
90+
9491
if (resourceGroupName == null)
9592
{
9693
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
@@ -134,11 +131,6 @@ internal HeatMapOperations (TrafficManagerManagementClient client)
134131
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinItems, "botRight", 2);
135132
}
136133
}
137-
if (this.Client.ApiVersion == null)
138-
{
139-
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
140-
}
141-
142134
// Tracing
143135
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
144136
string _invocationId = null;
@@ -160,12 +152,16 @@ internal HeatMapOperations (TrafficManagerManagementClient client)
160152

161153
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
162154
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}").ToString();
163-
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
155+
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"')));
164156
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
165157
_url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
166158
_url = _url.Replace("{heatMapType}", System.Uri.EscapeDataString(heatMapType));
167159

168160
System.Collections.Generic.List<string> _queryParameters = new System.Collections.Generic.List<string>();
161+
if (this.Client.ApiVersion != null)
162+
{
163+
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
164+
}
169165
if (topLeft != null)
170166
{
171167
_queryParameters.Add(string.Format("topLeft={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(topLeft, this.Client.SerializationSettings).Trim('"'))));
@@ -174,10 +170,6 @@ internal HeatMapOperations (TrafficManagerManagementClient client)
174170
{
175171
_queryParameters.Add(string.Format("botRight={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(botRight, this.Client.SerializationSettings).Trim('"'))));
176172
}
177-
if (this.Client.ApiVersion != null)
178-
{
179-
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
180-
}
181173
if (_queryParameters.Count > 0)
182174
{
183175
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);

0 commit comments

Comments
 (0)