Skip to content

Commit

Permalink
.NET SDK Resource Provider:'ApplicationInsights'
Browse files Browse the repository at this point in the history
REST Spec PR 'Azure/azure-rest-api-specs#5505'
REST Spec PR Author 'alexeldeib'
REST Spec PR Last commit
  • Loading branch information
adxsdknet committed Mar 29, 2019
1 parent 56de654 commit e48c4b5
Show file tree
Hide file tree
Showing 98 changed files with 14,932 additions and 169 deletions.
2 changes: 1 addition & 1 deletion src/SDKs/ApplicationInsights/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--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-->
<PropertyGroup>
<AzureApiTag />
<AzureApiTag>Insights_2015-05-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
/// Gets a list of API keys of an Application Insights component.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand Down Expand Up @@ -86,14 +86,43 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
if (resourceGroupName.Length > 90)
{
throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
}
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
if (Client.ApiVersion != null)
{
if (Client.ApiVersion.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
}
}
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
if (Client.SubscriptionId != null)
{
if (Client.SubscriptionId.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
if (resourceName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
Expand All @@ -112,7 +141,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ApiKeys").ToString();
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
Expand Down Expand Up @@ -250,7 +279,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
/// Create an API Key of an Application Insights component.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand Down Expand Up @@ -286,14 +315,43 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
if (resourceGroupName.Length > 90)
{
throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
}
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
if (Client.ApiVersion != null)
{
if (Client.ApiVersion.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
}
}
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
if (Client.SubscriptionId != null)
{
if (Client.SubscriptionId.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
if (resourceName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
Expand All @@ -317,7 +375,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ApiKeys").ToString();
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
Expand Down Expand Up @@ -461,7 +519,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
/// Delete an API Key of an Application Insights component.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand Down Expand Up @@ -496,14 +554,43 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
if (resourceGroupName.Length > 90)
{
throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
}
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
if (Client.ApiVersion != null)
{
if (Client.ApiVersion.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
}
}
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
if (Client.SubscriptionId != null)
{
if (Client.SubscriptionId.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
if (resourceName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
Expand All @@ -527,7 +614,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/APIKeys/{keyId}").ToString();
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
Expand Down Expand Up @@ -666,7 +753,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
/// Get the API Key for this key id.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand Down Expand Up @@ -701,14 +788,43 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
if (resourceGroupName.Length > 90)
{
throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
}
if (resourceGroupName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
if (Client.ApiVersion != null)
{
if (Client.ApiVersion.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
}
}
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
if (Client.SubscriptionId != null)
{
if (Client.SubscriptionId.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
if (resourceName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
Expand All @@ -732,7 +848,7 @@ internal APIKeysOperations(ApplicationInsightsManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/APIKeys/{keyId}").ToString();
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static partial class APIKeysOperationsExtensions
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand All @@ -47,7 +47,7 @@ public static IEnumerable<ApplicationInsightsComponentAPIKey> List(this IAPIKeys
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand All @@ -70,7 +70,7 @@ public static IEnumerable<ApplicationInsightsComponentAPIKey> List(this IAPIKeys
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand All @@ -91,7 +91,7 @@ public static ApplicationInsightsComponentAPIKey Create(this IAPIKeysOperations
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand All @@ -118,7 +118,7 @@ public static ApplicationInsightsComponentAPIKey Create(this IAPIKeysOperations
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand All @@ -138,7 +138,7 @@ public static ApplicationInsightsComponentAPIKey Delete(this IAPIKeysOperations
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand All @@ -164,7 +164,7 @@ public static ApplicationInsightsComponentAPIKey Delete(this IAPIKeysOperations
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand All @@ -184,7 +184,7 @@ public static ApplicationInsightsComponentAPIKey Get(this IAPIKeysOperations ope
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='resourceName'>
/// The name of the Application Insights component resource.
Expand Down
Loading

0 comments on commit e48c4b5

Please sign in to comment.