Skip to content

Commit dd68ed0

Browse files
adxsdknetdsgouda
authored andcommitted
.NET SDK Resource Provider:'ApplicationInsights' (#5626)
REST Spec PR 'Azure/azure-rest-api-specs#5505' REST Spec PR Author 'alexeldeib' REST Spec PR Last commit
1 parent 70d7eab commit dd68ed0

File tree

98 files changed

+14932
-169
lines changed

Some content is hidden

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

98 files changed

+14932
-169
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
33
<PropertyGroup>
4-
<AzureApiTag />
4+
<AzureApiTag>Insights_2015-05-01;</AzureApiTag>
55
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
66
</PropertyGroup>
77
</Project>

src/SDKs/ApplicationInsights/Management/Management.ApplicationInsights/Generated/APIKeysOperations.cs

Lines changed: 124 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
5454
/// Gets a list of API keys of an Application Insights component.
5555
/// </summary>
5656
/// <param name='resourceGroupName'>
57-
/// The name of the resource group.
57+
/// The name of the resource group. The name is case insensitive.
5858
/// </param>
5959
/// <param name='resourceName'>
6060
/// The name of the Application Insights component resource.
@@ -86,14 +86,43 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
8686
{
8787
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
8888
}
89+
if (resourceGroupName != null)
90+
{
91+
if (resourceGroupName.Length > 90)
92+
{
93+
throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
94+
}
95+
if (resourceGroupName.Length < 1)
96+
{
97+
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
98+
}
99+
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
100+
{
101+
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
102+
}
103+
}
89104
if (Client.ApiVersion == null)
90105
{
91106
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
92107
}
108+
if (Client.ApiVersion != null)
109+
{
110+
if (Client.ApiVersion.Length < 1)
111+
{
112+
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
113+
}
114+
}
93115
if (Client.SubscriptionId == null)
94116
{
95117
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
96118
}
119+
if (Client.SubscriptionId != null)
120+
{
121+
if (Client.SubscriptionId.Length < 1)
122+
{
123+
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
124+
}
125+
}
97126
if (resourceName == null)
98127
{
99128
throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
@@ -112,7 +141,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
112141
}
113142
// Construct URL
114143
var _baseUrl = Client.BaseUri.AbsoluteUri;
115-
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ApiKeys").ToString();
144+
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys").ToString();
116145
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
117146
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
118147
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
@@ -250,7 +279,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
250279
/// Create an API Key of an Application Insights component.
251280
/// </summary>
252281
/// <param name='resourceGroupName'>
253-
/// The name of the resource group.
282+
/// The name of the resource group. The name is case insensitive.
254283
/// </param>
255284
/// <param name='resourceName'>
256285
/// The name of the Application Insights component resource.
@@ -286,14 +315,43 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
286315
{
287316
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
288317
}
318+
if (resourceGroupName != null)
319+
{
320+
if (resourceGroupName.Length > 90)
321+
{
322+
throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
323+
}
324+
if (resourceGroupName.Length < 1)
325+
{
326+
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
327+
}
328+
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
329+
{
330+
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
331+
}
332+
}
289333
if (Client.ApiVersion == null)
290334
{
291335
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
292336
}
337+
if (Client.ApiVersion != null)
338+
{
339+
if (Client.ApiVersion.Length < 1)
340+
{
341+
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
342+
}
343+
}
293344
if (Client.SubscriptionId == null)
294345
{
295346
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
296347
}
348+
if (Client.SubscriptionId != null)
349+
{
350+
if (Client.SubscriptionId.Length < 1)
351+
{
352+
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
353+
}
354+
}
297355
if (resourceName == null)
298356
{
299357
throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
@@ -317,7 +375,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
317375
}
318376
// Construct URL
319377
var _baseUrl = Client.BaseUri.AbsoluteUri;
320-
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ApiKeys").ToString();
378+
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys").ToString();
321379
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
322380
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
323381
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
@@ -461,7 +519,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
461519
/// Delete an API Key of an Application Insights component.
462520
/// </summary>
463521
/// <param name='resourceGroupName'>
464-
/// The name of the resource group.
522+
/// The name of the resource group. The name is case insensitive.
465523
/// </param>
466524
/// <param name='resourceName'>
467525
/// The name of the Application Insights component resource.
@@ -496,14 +554,43 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
496554
{
497555
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
498556
}
557+
if (resourceGroupName != null)
558+
{
559+
if (resourceGroupName.Length > 90)
560+
{
561+
throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
562+
}
563+
if (resourceGroupName.Length < 1)
564+
{
565+
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
566+
}
567+
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
568+
{
569+
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
570+
}
571+
}
499572
if (Client.ApiVersion == null)
500573
{
501574
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
502575
}
576+
if (Client.ApiVersion != null)
577+
{
578+
if (Client.ApiVersion.Length < 1)
579+
{
580+
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
581+
}
582+
}
503583
if (Client.SubscriptionId == null)
504584
{
505585
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
506586
}
587+
if (Client.SubscriptionId != null)
588+
{
589+
if (Client.SubscriptionId.Length < 1)
590+
{
591+
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
592+
}
593+
}
507594
if (resourceName == null)
508595
{
509596
throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
@@ -527,7 +614,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
527614
}
528615
// Construct URL
529616
var _baseUrl = Client.BaseUri.AbsoluteUri;
530-
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/APIKeys/{keyId}").ToString();
617+
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}").ToString();
531618
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
532619
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
533620
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
@@ -666,7 +753,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
666753
/// Get the API Key for this key id.
667754
/// </summary>
668755
/// <param name='resourceGroupName'>
669-
/// The name of the resource group.
756+
/// The name of the resource group. The name is case insensitive.
670757
/// </param>
671758
/// <param name='resourceName'>
672759
/// The name of the Application Insights component resource.
@@ -701,14 +788,43 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
701788
{
702789
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
703790
}
791+
if (resourceGroupName != null)
792+
{
793+
if (resourceGroupName.Length > 90)
794+
{
795+
throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
796+
}
797+
if (resourceGroupName.Length < 1)
798+
{
799+
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
800+
}
801+
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
802+
{
803+
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
804+
}
805+
}
704806
if (Client.ApiVersion == null)
705807
{
706808
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
707809
}
810+
if (Client.ApiVersion != null)
811+
{
812+
if (Client.ApiVersion.Length < 1)
813+
{
814+
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
815+
}
816+
}
708817
if (Client.SubscriptionId == null)
709818
{
710819
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
711820
}
821+
if (Client.SubscriptionId != null)
822+
{
823+
if (Client.SubscriptionId.Length < 1)
824+
{
825+
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
826+
}
827+
}
712828
if (resourceName == null)
713829
{
714830
throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
@@ -732,7 +848,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
732848
}
733849
// Construct URL
734850
var _baseUrl = Client.BaseUri.AbsoluteUri;
735-
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/APIKeys/{keyId}").ToString();
851+
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}").ToString();
736852
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
737853
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
738854
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));

src/SDKs/ApplicationInsights/Management/Management.ApplicationInsights/Generated/APIKeysOperationsExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static partial class APIKeysOperationsExtensions
3030
/// The operations group for this extension method.
3131
/// </param>
3232
/// <param name='resourceGroupName'>
33-
/// The name of the resource group.
33+
/// The name of the resource group. The name is case insensitive.
3434
/// </param>
3535
/// <param name='resourceName'>
3636
/// The name of the Application Insights component resource.
@@ -47,7 +47,7 @@ public static IEnumerable<ApplicationInsightsComponentAPIKey> List(this IAPIKeys
4747
/// The operations group for this extension method.
4848
/// </param>
4949
/// <param name='resourceGroupName'>
50-
/// The name of the resource group.
50+
/// The name of the resource group. The name is case insensitive.
5151
/// </param>
5252
/// <param name='resourceName'>
5353
/// The name of the Application Insights component resource.
@@ -70,7 +70,7 @@ public static IEnumerable<ApplicationInsightsComponentAPIKey> List(this IAPIKeys
7070
/// The operations group for this extension method.
7171
/// </param>
7272
/// <param name='resourceGroupName'>
73-
/// The name of the resource group.
73+
/// The name of the resource group. The name is case insensitive.
7474
/// </param>
7575
/// <param name='resourceName'>
7676
/// The name of the Application Insights component resource.
@@ -91,7 +91,7 @@ public static ApplicationInsightsComponentAPIKey Create(this IAPIKeysOperations
9191
/// The operations group for this extension method.
9292
/// </param>
9393
/// <param name='resourceGroupName'>
94-
/// The name of the resource group.
94+
/// The name of the resource group. The name is case insensitive.
9595
/// </param>
9696
/// <param name='resourceName'>
9797
/// The name of the Application Insights component resource.
@@ -118,7 +118,7 @@ public static ApplicationInsightsComponentAPIKey Create(this IAPIKeysOperations
118118
/// The operations group for this extension method.
119119
/// </param>
120120
/// <param name='resourceGroupName'>
121-
/// The name of the resource group.
121+
/// The name of the resource group. The name is case insensitive.
122122
/// </param>
123123
/// <param name='resourceName'>
124124
/// The name of the Application Insights component resource.
@@ -138,7 +138,7 @@ public static ApplicationInsightsComponentAPIKey Delete(this IAPIKeysOperations
138138
/// The operations group for this extension method.
139139
/// </param>
140140
/// <param name='resourceGroupName'>
141-
/// The name of the resource group.
141+
/// The name of the resource group. The name is case insensitive.
142142
/// </param>
143143
/// <param name='resourceName'>
144144
/// The name of the Application Insights component resource.
@@ -164,7 +164,7 @@ public static ApplicationInsightsComponentAPIKey Delete(this IAPIKeysOperations
164164
/// The operations group for this extension method.
165165
/// </param>
166166
/// <param name='resourceGroupName'>
167-
/// The name of the resource group.
167+
/// The name of the resource group. The name is case insensitive.
168168
/// </param>
169169
/// <param name='resourceName'>
170170
/// The name of the Application Insights component resource.
@@ -184,7 +184,7 @@ public static ApplicationInsightsComponentAPIKey Get(this IAPIKeysOperations ope
184184
/// The operations group for this extension method.
185185
/// </param>
186186
/// <param name='resourceGroupName'>
187-
/// The name of the resource group.
187+
/// The name of the resource group. The name is case insensitive.
188188
/// </param>
189189
/// <param name='resourceName'>
190190
/// The name of the Application Insights component resource.

0 commit comments

Comments
 (0)