diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/Az.ApplicationInsights.psd1 b/src/ApplicationInsights/ApplicationInsights.Autorest/Az.ApplicationInsights.psd1 index 342b8dd76f19..2786f7102b38 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/Az.ApplicationInsights.psd1 +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/Az.ApplicationInsights.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.ApplicationInsights.private.dll' FormatsToProcess = './Az.ApplicationInsights.format.ps1xml' - FunctionsToExport = 'Get-AzApplicationInsightsWebTest', 'New-AzApplicationInsightsWebTest', 'New-AzApplicationInsightsWebTestGeolocationObject', 'New-AzApplicationInsightsWebTestHeaderFieldObject', 'Remove-AzApplicationInsightsWebTest', 'Update-AzApplicationInsightsWebTestTag', '*' + FunctionsToExport = 'Get-AzApplicationInsights', 'Get-AzApplicationInsightsApiKey', 'Get-AzApplicationInsightsContinuousExport', 'Get-AzApplicationInsightsLinkedStorageAccount', 'Get-AzApplicationInsightsWebTest', 'New-AzApplicationInsights', 'New-AzApplicationInsightsApiKey', 'New-AzApplicationInsightsContinuousExport', 'New-AzApplicationInsightsLinkedStorageAccount', 'New-AzApplicationInsightsWebTest', 'New-AzApplicationInsightsWebTestGeolocationObject', 'New-AzApplicationInsightsWebTestHeaderFieldObject', 'Remove-AzApplicationInsights', 'Remove-AzApplicationInsightsApiKey', 'Remove-AzApplicationInsightsContinuousExport', 'Remove-AzApplicationInsightsLinkedStorageAccount', 'Remove-AzApplicationInsightsWebTest', 'Set-AzApplicationInsightsContinuousExport', 'Set-AzApplicationInsightsDailyCap', 'Set-AzApplicationInsightsPricingPlan', 'Set-AzApplicationInsightsWebTest', 'Update-AzApplicationInsights', 'Update-AzApplicationInsightsLinkedStorageAccount', 'Update-AzApplicationInsightsWebTestTag', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/README.md b/src/ApplicationInsights/ApplicationInsights.Autorest/README.md index 419edef543c0..b2745459795f 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/README.md +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/README.md @@ -36,7 +36,13 @@ require: - $(this-folder)/../../readme.azure.noprofile.md input-file: - $(repo)/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01-preview/webTests_API.json - + - https://github.com/Azure/azure-rest-api-specs/blob/9735d8c1580e6b56e6d4508be6ec00f46e45cb77/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/components_API.json + - https://github.com/Azure/azure-rest-api-specs/blob/e129012901bbd9cc0f182ec5b539bccf2440ef4a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/componentApiKeys_API.json + - https://github.com/Azure/azure-rest-api-specs/blob/8f0d54f788304518eca62ddf281b8c889ad9613c/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/componentAnnotations_API.json + - https://github.com/Azure/azure-rest-api-specs/blob/e129012901bbd9cc0f182ec5b539bccf2440ef4a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/componentFeaturesAndPricing_API.json + - https://github.com/Azure/azure-rest-api-specs/blob/e129012901bbd9cc0f182ec5b539bccf2440ef4a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/componentContinuousExport_API.json + - https://github.com/Azure/azure-rest-api-specs/blob/e129012901bbd9cc0f182ec5b539bccf2440ef4a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/aiOperations_API.json + - https://github.com/Azure/azure-rest-api-specs/blob/88e7838a09868a51de3894114355c75929847a46/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json module-version: 0.1.0 subject-prefix: $(service-name) @@ -45,6 +51,10 @@ resourcegroup-append: true nested-object-to-string: true directive: + - from: swagger-document + where: $.info.title + transform: return "ApplicationInsightsManagementClient" + # Kind 'basic' is not supported on the server. - from: swagger-document where: $.definitions.WebTestProperties.properties.Kind.enum @@ -64,12 +74,130 @@ directive: transform: return $.replace(/providers\/Microsoft.Insights\//g, "providers/microsoft.insights/") - where: - verb: Set + variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ remove: true + # Hide ApplicationInsightsComponent related cmdlets - where: - variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ - remove: true + subject: Component + verb: Remove + parameter-name: ResourceName + set: + parameter-name: Name + - where: + subject: Component + verb: Get|New|Clear|Set + hide: true + # Rename Component related cmdlets + - where: + subject: (^Component$)(.*) + set: + subject: $2 + + # Hide ComponentCurrentBillingFeature related cmdlets + - where: + subject: ComponentCurrentBillingFeature|ComponentQuotaStatus + hide: true + + # Rename ExportConfiguration to ContinuousExport + - where: + subject: ExportConfiguration + set: + subject: ContinuousExport + + # Rename parameters for New|Set ApplicationInsightsExportConfiguration + - where: + subject: ContinuousExport + verb: Get + parameter-name: ResourceName + set: + parameter-name: Name + - where: + subject: ContinuousExport + verb: New|Set + parameter-name: DestinationAccountId + set: + parameter-name: StorageAccountId + - where: + subject: ContinuousExport + verb: New|Set + parameter-name: DestinationAddress + set: + parameter-name: StorageSASUri + - where: + subject: ContinuousExport + verb: New|Set + parameter-name: DestinationStorageLocationId + set: + parameter-name: StorageLocation + - where: + subject: ContinuousExport + verb: New|Set + parameter-name: RecordTypes + set: + parameter-name: DocumentType + - where: + subject: ContinuousExport + verb: New|Set + hide: true + + # Rename parameters for ComponentLinkedStorageAccount + - where: + subject: ComponentLinkedStorageAccountAndUpdate + set: + subject: ComponentLinkedStorageAccount + - where: + subject: ComponentLinkedStorageAccount + parameter-name: ResourceName + set: + parameter-name: ComponentName + - where: + subject: ComponentLinkedStorageAccount + parameter-name: LinkedStorageAccount + set: + parameter-name: LinkedStorageAccountResourceId + - where: + subject: ComponentLinkedStorageAccount + set: + subject: LinkedStorageAccount + + # Rename parameter 'ResourceName' to 'Name' + - where: + subject: ApiKey|ExportConfiguration + verb: Get|Remove + parameter-name: ResourceName + set: + parameter-name: Name + alias: + - ApplicationInsightsComponentNameAlias + - ComponentNameAlias + + # Rename parameter 'KeyId' to 'ApiKeyId' + - where: + subject: ApiKey + verb: Get|Remove + parameter-name: KeyId + set: + parameter-name: ApiKeyId + + # Rename parameter 'InputObject' to 'ApplicationInsightsComponent' + - where: + subject: ApiKey|ExportConfiguration + verb: Get|Remove + parameter-name: InputObject + set: + parameter-name: ApplicationInsightsComponent + + # Hide New-AzApplicationInsightsApiKey for customization + - where: + subject: ApiKey + verb: New + hide: true + + # Hide cmdlets + - where: + subject: Annotation|AvailableFeature|FeatureCapability|PurgeStatus|ComponentTag + hide: true # Hide the SyntheticMonitorId parameter because the default value is passed by the server. - where: diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Get-AzApplicationInsights.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Get-AzApplicationInsights.ps1 new file mode 100644 index 000000000000..8d714185c44b --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Get-AzApplicationInsights.ps1 @@ -0,0 +1,185 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Returns an Application Insights component. +.Description +Returns an Application Insights component. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IApplicationInsightsComponent +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AnnotationId ]: The unique annotation ID. This is unique within a Application Insights component. + [ComponentName ]: The name of the Application Insights component resource. + [ExportId ]: The Continuous Export configuration ID. This is unique within a Application Insights component. + [Id ]: Resource identity path + [KeyId ]: The API Key ID. This is unique within a Application Insights component. + [PurgeId ]: In a purge status request, this is the Id of the operation the status of which is returned. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ResourceName ]: The name of the Application Insights component resource. + [StorageType ]: The type of the Application Insights component data source for the linked storage account. + [SubscriptionId ]: The ID of the target subscription. + [WebTestName ]: The name of the Application Insights WebTest resource. +.Link +https://docs.microsoft.com/powershell/module/az.applicationinsights/get-azapplicationinsightscomponent +#> +function Get-AzApplicationInsights { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent], [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan])] + [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] + param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='ListByResourceGroupName', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the Application Insights component resource. + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='ListByResourceGroupName')] + [Parameter(ParameterSetName='ListBySubscription')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetByResourceId', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String[]] + # The resource ID of applicationinsights component. + ${ResourceId}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByResourceId')] + [Alias("IncludeDailyCap", "IncludeDailyCapStatus", "IncludePricingPlan")] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + ${Full}, + + [Parameter(ParameterSetName='GetByInputObject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + if ($PSBoundParameters.ContainsKey('Full')) { + $full = $PSBoundParameters['Full'] + $null = $PSBoundParameters.Remove('Full') + } + switch ($PSCmdlet.ParameterSetName) { + 'GetByResourceId' { + $resourceId = $PSBoundParameters['ResourceId'] + $null = $PSBoundParameters.Remove('ResourceId') + $component = ($resourceId | . Az.ApplicationInsights.internal\Get-AzApplicationInsightsComponent) + if ($full) { + $pricingPlan = $resourceId | . Az.ApplicationInsights.internal\Get-AzApplicationInsightsComponentCurrentBillingFeature + $dailyCapStatus = $resourceId | . Az.ApplicationInsights.internal\Get-AzApplicationInsightsComponentQuotaStatus + } + break + } + default { + if ($PSBoundParameters['Name']) { + $PSBoundParameters['ResourceName'] = $PSBoundParameters['Name'] + $null = $PSBoundParameters.Remove('Name') + if ($full) { + $pricingPlan = (. Az.ApplicationInsights.internal\Get-AzApplicationInsightsComponentCurrentBillingFeature @PSBoundParameters) + $dailyCapStatus = (. Az.ApplicationInsights.internal\Get-AzApplicationInsightsComponentQuotaStatus @PSBoundParameters) + } + } + $component = (. Az.ApplicationInsights.internal\Get-AzApplicationInsights @PSBoundParameters) + break + } + } + + if ($full) { + $PSCmdlet.WriteObject([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan]::New($component, $pricingPlan, $dailyCapStatus)) + } else { + $PSCmdlet.WriteObject($component) + } + } +} \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSApiKey.cs b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSApiKey.cs new file mode 100644 index 000000000000..d780b73a05aa --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSApiKey.cs @@ -0,0 +1,168 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Text.RegularExpressions; +using System.Linq; +using System; +using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models +{ + internal class ApiKeyRole + { + public string[] readProperties; + public string[] writeProperties; + public string roleName; + public string displayName; + } + + public class PSApiKey + { + private static readonly Regex AccessIdRegex = new Regex(@"^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/microsoft.insights/components/(?[^/]+)/(?[^/]+).*$", RegexOptions.IgnoreCase); + + internal static ApiKeyRole ReadTelemetry = new ApiKeyRole() + { + roleName = "ReadTelemetry", + displayName = "Read Telemetry", + readProperties = new string[] { "api" }, + }; + + internal static ApiKeyRole WriteAnnotations = new ApiKeyRole() + { + roleName = "WriteAnnotations", + displayName = "Write Annotations", + writeProperties = new string[] { "annotations" }, + }; + + internal static ApiKeyRole ReadAgentConfiguration = new ApiKeyRole() + { + roleName = "AuthenticateSDKControlChannel", + displayName = "Authenticate SDK control channel", + readProperties = new string[] { "agentconfig" }, + }; + + public string ApiKey { get; } + + public string CreatedDate { get; set; } + + public string Id { get; } + + public string[] Permissions { get; } + + public string Description { get; set; } + + public PSApiKey(ApplicationInsightsComponentApiKey key) + { + this.ApiKey = key.ApiKey; + this.CreatedDate = key.CreatedDate; + this.Id = key.Id.Split('/')[10]; + this.Description = key.Name; + + List accessPermission = new List(); + + ApiKeyRole[] roles = new ApiKeyRole[] { + ReadTelemetry, + WriteAnnotations, + ReadAgentConfiguration + }; + + if (key.LinkedReadProperty != null) + { + foreach (var readaccess in key.LinkedReadProperty) + { + var role = ExtraRole(roles, readaccess); + if (role != null) + { + accessPermission.Add(role.roleName); + } + } + } + + if (key.LinkedWriteProperty != null) + { + foreach (var writeAccess in key.LinkedWriteProperty) + { + var role = ExtraRole(roles, writeAccess); + if (role != null) + { + accessPermission.Add(role.roleName); + } + } + } + + this.Permissions = accessPermission.ToArray(); + } + + private static ApiKeyRole ExtraRole(ApiKeyRole[] roles, string readaccess) + { + var matches = AccessIdRegex.Match(readaccess); + if (matches.Success) + { + string permission = matches.Groups["Permission"].Value; + + return roles.FirstOrDefault(r => + (r.readProperties != null && r.readProperties.Any(p => StringComparer.OrdinalIgnoreCase.Equals(p, permission))) || + (r.writeProperties != null && r.writeProperties.Any(p => StringComparer.OrdinalIgnoreCase.Equals(p, permission))) + ); + } + + return null; + } + + internal static Tuple BuildApiKeyAccess(string subscriptionId, string resourceGroup, string componentName, string[] permissions) + { + ApiKeyRole[] roles = new ApiKeyRole[] { + ReadTelemetry, + WriteAnnotations, + ReadAgentConfiguration + }; + + List readAccess = new List(); + List writeAccess = new List(); + + foreach (var permission in permissions) + { + var role = roles.FirstOrDefault(r => StringComparer.OrdinalIgnoreCase.Equals(r.roleName, permission)); + if (role != null) + { + if (role.readProperties != null) + { + foreach (var readProperty in role.readProperties) + { + readAccess.Add($"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.insights/components/{componentName}/{readProperty}"); + } + } + + if (role.writeProperties != null) + { + foreach (var writeProperty in role.writeProperties) + { + writeAccess.Add($"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.insights/components/{componentName}/{writeProperty}"); + } + } + } + } + + return Tuple.Create(readAccess.ToArray(), writeAccess.ToArray()); + } + } + + public class PSApiKeyTableView : PSApiKey + { + public PSApiKeyTableView(ApplicationInsightsComponentApiKey key) + : base(key) + { } + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSApplicationInsightsComponent.cs b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSApplicationInsightsComponent.cs new file mode 100644 index 000000000000..0686c675df5c --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSApplicationInsightsComponent.cs @@ -0,0 +1,164 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002; +using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models +{ + public class PSApplicationInsightsComponent + { + public PSApplicationInsightsComponent(ApplicationInsightsComponent component) + { + this.ResourceGroupName = ParseResourceGroupFromId(component.Id); + this.Name = component.Name; + this.Id = component.Id; + this.Location = component.Location; + this.Tags = component.Tag.Keys.ToDictionary(x => x, x => component.Tag[x]); + this.Kind = component.Kind; + this.Type = component.Type; + this.AppId = component.AppId; + this.ApplicationId = component.ApplicationId; + this.ApplicationType = component.ApplicationType; + this.CreationDate = component.CreationDate; + this.FlowType = component.FlowType; + this.HockeyAppId = component.HockeyAppId; + this.HockeyAppToken = component.HockeyAppToken; + this.InstrumentationKey = component.InstrumentationKey; + this.ProvisioningState = component.ProvisioningState; + this.RequestSource = component.RequestSource; + this.SamplingPercentage = component.SamplingPercentage; + this.TenantId = component.TenantId; + this.PublicNetworkAccessForIngestion = component.PublicNetworkAccessForIngestion; + this.PublicNetworkAccessForQuery = component.PublicNetworkAccessForQuery; + this.PrivateLinkScopedResources = component.PrivateLinkScopedResource.ToList(); + this.RetentionInDays = component.RetentionInDay; + this.ConnectionString = component.ConnectionString; + } + + public string Id { get; set; } + + public string ResourceGroupName { get; set; } + + public string Name { get; set; } + + public string Kind { get; set; } + + public string Location { get; set; } + + public string Type { get; set; } + + public string AppId { get; set; } + + public string ApplicationId { get; private set; } + + public string ApplicationType { get; set; } + + public IDictionary Tags { get; set; } + + public DateTime? CreationDate { get; set; } + + public string FlowType { get; set; } + + public string HockeyAppId { get; set; } + + public string HockeyAppToken { get; set; } + + public string InstrumentationKey { get; set; } + + public string ProvisioningState { get; set; } + + public string RequestSource { get; set; } + + public double? SamplingPercentage { get; set; } + + public string TenantId { get; set; } + + public string PublicNetworkAccessForIngestion { get; set; } + + public string PublicNetworkAccessForQuery { get; set; } + + public IList PrivateLinkScopedResources { get; private set; } + + public string ConnectionString { get; private set; } + + public int? RetentionInDays { get; set; } + + public static PSApplicationInsightsComponent Create(ApplicationInsightsComponent component) + { + var result = new PSApplicationInsightsComponent(component); + + return result; + } + + private static string ParseResourceGroupFromId(string idFromServer) + { + if (!string.IsNullOrEmpty(idFromServer)) + { + string[] tokens = idFromServer.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); + + return tokens[3]; + } + + return null; + } + } + + public class PSApplicationInsightsComponentTableView : PSApplicationInsightsComponent + { + public PSApplicationInsightsComponentTableView(ApplicationInsightsComponent component) + : base(component) + { + } + } + + public class PSApplicationInsightsComponentWithPricingPlan : PSApplicationInsightsComponent + { + public string PricingPlan; + + public double? Cap { get; set; } + + public int? ResetTime { get; set; } + + public bool StopSendNotificationWhenHitCap { get; set; } + + public string CapExpirationTime { get; } + + public bool IsCapped { get; } + + public PSApplicationInsightsComponentWithPricingPlan(ApplicationInsightsComponent component, + ApplicationInsightsComponentBillingFeatures billing, + ApplicationInsightsComponentQuotaStatus status) + : base(component) + { + if (billing.CurrentBillingFeature.Any(f => f.Contains("Enterprise"))) + { + this.PricingPlan = "Application Insights Enterprise"; + } + else + { + this.PricingPlan = billing.CurrentBillingFeature.FirstOrDefault(); + } + + this.Cap = billing.DataVolumeCap.Cap; + this.ResetTime = billing.DataVolumeCap.ResetTime; + this.StopSendNotificationWhenHitCap = billing.DataVolumeCap.StopSendNotificationWhenHitCap.Value; + this.CapExpirationTime = status.ExpirationTime; + this.IsCapped = status.ShouldBeThrottled != null ? status.ShouldBeThrottled.Value : false; + } + } +} \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSComponentLinkedStorageAccounts.cs b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSComponentLinkedStorageAccounts.cs new file mode 100644 index 000000000000..24df381a9470 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSComponentLinkedStorageAccounts.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models +{ + public class PSComponentLinkedStorageAccounts + { + public PSComponentLinkedStorageAccounts(string id = default(string), string name = default(string), string type = default(string), string linkedStorageAccount = default(string)) + { + this.Id = id; + this.Name = name; + this.Type = type; + this.LinkedStorageAccount = linkedStorageAccount; + } + + public string Id { get; private set; } + + public string Name { get; private set; } + + public string Type { get; private set; } + + public string LinkedStorageAccount { get; set; } + } +} \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSDailyCap.cs b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSDailyCap.cs new file mode 100644 index 000000000000..671376648b90 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSDailyCap.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models +{ + public class PSDailyCap + { + public double? Cap { get; set; } + + public int? ResetTime { get; set; } + + public bool StopSendNotificationWhenHitCap { get; set; } + + public PSDailyCap(ApplicationInsightsComponentBillingFeatures billing) + { + this.Cap = billing.DataVolumeCap.Cap; + this.ResetTime = billing.DataVolumeCap.ResetTime; + this.StopSendNotificationWhenHitCap = billing.DataVolumeCap.StopSendNotificationWhenHitCap.Value; + } + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSDailyCapStatus.cs b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSDailyCapStatus.cs new file mode 100644 index 000000000000..39698741f28b --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSDailyCapStatus.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models +{ + public class PSDailyCapStatus + { + public string ExpirationTime { get; } + public bool IsCapped { get; } + + public PSDailyCapStatus(ApplicationInsightsComponentQuotaStatus status) + { + ExpirationTime = status.ExpirationTime; + IsCapped = status.ShouldBeThrottled != null ? status.ShouldBeThrottled.Value : false; + } + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSExportConfiguration.cs b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSExportConfiguration.cs new file mode 100644 index 000000000000..1d483932e41b --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSExportConfiguration.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models +{ + public class PSExportConfiguration + { + public string ExportId { get; set; } + public string StorageName { get; set; } + public string ContainerName { get; set; } + public string DocumentTypes { get; set; } + public string DestinationStorageSubscriptionId { get; set; } + public string DestinationStorageLocationId { get; set; } + public string DestinationStorageAccountId { get; set; } + public string IsEnabled { get; set; } + public string ExportStatus { get; set; } + public string LastSuccessTime { get; set; } + + public PSExportConfiguration(ApplicationInsightsComponentExportConfiguration response) + { + this.ExportId = response.ExportId; + + this.DocumentTypes = string.Join(", ", Utilities.ConvertToDocumentType(response.RecordType.Split(','))); + this.DestinationStorageSubscriptionId = response.DestinationStorageSubscriptionId; + this.DestinationStorageLocationId = response.DestinationStorageLocationId; + this.DestinationStorageAccountId = response.DestinationAccountId; + this.IsEnabled = response.IsUserEnabled; + this.ExportStatus = response.ExportStatus; + this.StorageName = response.StorageName; + this.ContainerName = response.ContainerName; + this.LastSuccessTime = response.LastSuccessTime; + } + } + + public class PSExportConfigurationTableView : PSExportConfiguration + { + public PSExportConfigurationTableView(ApplicationInsightsComponentExportConfiguration response) + : base(response) + { } + } +} + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSPrcingPlan.cs b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSPrcingPlan.cs new file mode 100644 index 000000000000..fc0ff8b3c2e8 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/PSPrcingPlan.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models +{ + public class PSPricingPlan : PSDailyCap + { + public string PricingPlan; + + + public static PSPricingPlan Create(ApplicationInsightsComponentBillingFeatures billing) + { + var result = new PSPricingPlan(billing); + + return result; + } + + public PSPricingPlan(ApplicationInsightsComponentBillingFeatures billing) + : base(billing) + { + if (billing.CurrentBillingFeature.Any(f => f.Contains("Enterprise"))) + { + this.PricingPlan = "Application Insights Enterprise"; + } + else + { + this.PricingPlan = billing.CurrentBillingFeature.FirstOrDefault(); + } + } + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/Utilities.cs b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/Utilities.cs new file mode 100644 index 000000000000..4d6a18d21c51 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Models/Utilities.cs @@ -0,0 +1,102 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models +{ + public class Utilities + { + internal static string[] ConvertToDocumentType(string[] recordTypes) + { + Dictionary mapping = new Dictionary(); + mapping.Add(RecordTypes.Requests.ToLowerInvariant(), DocumentTypes.Requests); + mapping.Add(RecordTypes.Event.ToLowerInvariant(), DocumentTypes.Event); + mapping.Add(RecordTypes.Exceptions.ToLowerInvariant(), DocumentTypes.Exceptions); + mapping.Add(RecordTypes.Messages.ToLowerInvariant(), DocumentTypes.Messages); + mapping.Add(RecordTypes.Metrics.ToLowerInvariant(), DocumentTypes.Metrics); + mapping.Add(RecordTypes.PageViewPerformance.ToLowerInvariant(), DocumentTypes.PageViewPerformance); + mapping.Add(RecordTypes.PageViews.ToLowerInvariant(), DocumentTypes.PageViews); + mapping.Add(RecordTypes.RemoteDependency.ToLowerInvariant(), DocumentTypes.RemoteDependency); + mapping.Add(RecordTypes.Availability.ToLowerInvariant(), DocumentTypes.Availability); + mapping.Add(RecordTypes.PerformanceCounters.ToLowerInvariant(), DocumentTypes.PerformanceCounters); + + return recordTypes.Select(d => mapping[d.Trim().ToLowerInvariant()]).ToArray(); + } + + public static string ParseSubscriptionFromId(string idFromServer) + { + if (!string.IsNullOrEmpty(idFromServer)) + { + string[] tokens = idFromServer.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); + + return tokens[1]; + } + + return null; + } + } + + public class ApplicationType + { + public const string WEB = "web"; + public const string JAVA = "java"; + public const string NodeJs = "Node.js"; + public const string General = "other"; + } + + public class DocumentTypes + { + public const string Requests = "Request"; + public const string Event = "Custom Event"; + public const string Exceptions = "Exception"; + public const string Metrics = "Metric"; + public const string PageViews = "Page View"; + public const string PageViewPerformance = "Page Load"; + public const string RemoteDependency = "Dependency"; + public const string PerformanceCounters = "Performance Counter"; + public const string Availability = "Availability"; + public const string Messages = "Trace"; + } + + internal class RecordTypes + { + public const string Requests = "Requests"; + public const string Event = "Event"; + public const string Exceptions = "Exceptions"; + public const string Metrics = "Metrics"; + public const string PageViews = "PageViews"; + public const string PageViewPerformance = "PageViewPerformance"; + public const string RemoteDependency = "Rdd"; + public const string PerformanceCounters = "PerformanceCounters"; + public const string Availability = "Availability"; + public const string Messages = "Messages"; + } + + public class PermissionType + { + public const string ReadTelemetry = "ReadTelemetry"; + public const string WriteAnnotations = "WriteAnnotations"; + public const string AuthenticateSDKControlChannel = "AuthenticateSDKControlChannel"; + } + + public class PricingPlans + { + public const string Basic = "Basic"; + public const string Enterprise = "Application Insights Enterprise"; + public const string LimitedBasic = "Limited Basic"; + } +} \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsights.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsights.ps1 new file mode 100644 index 000000000000..d4ef93d69b73 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsights.ps1 @@ -0,0 +1,247 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. +.Description +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent +.Link +https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsights +#> +function New-AzApplicationInsights { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent])] + [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the Application Insights component resource. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + [ValidateSet("web", "other", "nodejs", "java", "ios", "store", "phone", IgnoreCase)] + # The kind of application that this component refers to, used to customize UI. + # This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. + ${Kind}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # Resource location + ${Location}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.ApplicationType])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.ApplicationType] + # Type of application being monitored. + ${ApplicationType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Disable IP masking. + ${DisableIPMasking}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Disable Non-AAD based Auth. + ${DisableLocalAuth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # Resource etag + ${Etag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.FlowType])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.FlowType] + # Used by the Application Insights system to determine what kind of flow this component was created by. + # This is to be set to 'Bluefield' when creating/updating a component via the REST API. + ${FlowType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Force users to create their own storage account for profiler and debugger. + ${ForceCustomerStorageForProfiler}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp. + ${HockeyAppId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Purge data immediately after 30 days. + ${ImmediatePurgeDataOn30Day}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.IngestionMode])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.IngestionMode] + # Indicates the flow of the ingestion. + ${IngestionMode}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType] + # The network access type for accessing Application Insights ingestion. + ${PublicNetworkAccessForIngestion}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType] + # The network access type for accessing Application Insights query. + ${PublicNetworkAccessForQuery}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.RequestSource])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.RequestSource] + # Describes what tool created this Application Insights component. + # Customers using this API should set this to the default 'rest'. + ${RequestSource}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Int32] + # Retention period in days. + ${RetentionInDays}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Double] + # Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. + ${SamplingPercentage}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IComponentsResourceTags]))] + [System.Collections.Hashtable] + # Resource tags + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # Resource Id of the log analytics workspace which the data will be ingested to. + # This property is required to create an application with this API version. + # Applications from older versions will not have this property. + ${WorkspaceResourceId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + $PSBoundParameters['ResourceName'] = $PSBoundParameters['Name'] + $null = $PSBoundParameters.Remove("Name") + if ($PSBoundParameters.ContainsKey("RetentionInDays")) { + $PSBoundParameters["RetentionInDay"] = $PSBoundParameters["RetentionInDays"] + $null = $PSBoundParameters.Remove("RetentionInDays") + } + if (!$PSBoundParameters.ContainsKey("Kind")) { + $PSBoundParameters["Kind"] = "web" + } + if (!$PSBoundParameters.ContainsKey("ApplicationType")) { + $PSBoundParameters["ApplicationType"] = $PSBoundParameters["Kind"] + } + . Az.ApplicationInsights.internal\New-AzApplicationInsights @PSBoundParameters + } +} + \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsightsApiKey.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsightsApiKey.ps1 new file mode 100644 index 000000000000..ccb6b52e0ff9 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsightsApiKey.ps1 @@ -0,0 +1,159 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an API Key of an Application Insights component. +.Description +Create an API Key of an Application Insights component. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentApiKey +.Link +https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsightsapikey +#> +function New-AzApplicationInsightsApiKey { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentApiKey])] + [CmdletBinding(DefaultParameterSetName='ComponentNameParameterSet', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(ParameterSetName="ComponentNameParameterSet")] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName="ComponentNameParameterSet", Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName="ComponentNameParameterSet", Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the Application Insights component resource. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The name of the API Key. + ${Description}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [ValidateSet("ReadTelemetry", "WriteAnnotations", "AuthenticateSDKControlChannel")] + [System.String[]] + # The read access rights of this API Key. + ${Permissions}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + $PSBoundParameters['ResourceName'] = $PSBoundParameters['Name'] + $PSBoundParameters['Name'] = $PSBoundParameters['Description'] + $null = $PSBoundParameters.Remove('Description') + + $pattern = "/subscriptions/$($PSBoundParameters['SubscriptionId'])/resourceGroups/$($PSBoundParameters['ResourceGroupName'])/providers/microsoft.insights/components/$($PSBoundParameters['ResourceName'])/{0}" + $read = @() + $write = @() + + foreach ($permission in $PSBoundParameters['Permissions']) { + switch ($permission) { + "ReadTelemetry" { + $read += [System.String]::Format($pattern, "api") + break + } + "AuthenticateSDKControlChannel" { + $read += [System.String]::Format($pattern, "agentconfig") + break + } + "WriteAnnotations" { + $write += [System.String]::Format($pattern, "annotations") + break + } + default { + break + } + } + } + $null = $PSBoundParameters.Remove('Permissions') + if ($read.Count -ne 0) { + $PSBoundParameters['LinkedReadProperty'] = $read + } + if ($write.Count -ne 0) { + $PSBoundParameters['LinkedWriteProperty'] = $write + } + + . Az.ApplicationInsights.internal\New-AzApplicationInsightsApiKey @PSBoundParameters + } +} \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsightsContinuousExport.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsightsContinuousExport.ps1 new file mode 100644 index 000000000000..fa0f5ded4922 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/New-AzApplicationInsightsContinuousExport.ps1 @@ -0,0 +1,165 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Continuous Export configuration of an Application Insights component. +.Description +Create a Continuous Export configuration of an Application Insights component. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentExportConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsightscontinuousexport +#> +function New-AzApplicationInsightsContinuousExport { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentExportConfiguration])] + [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the Application Insights component resource. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The Continuous Export destination type. + # This has to be 'Blob'. + ${DestinationType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # Deprecated + ${NotificationQueueEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # Deprecated + ${NotificationQueueUri}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String[]] + # The document types to be exported, as comma separated values. + # Allowed values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', 'Availability', 'Messages'. + ${DocumentType }, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The name of destination storage account. + ${StorageAccountId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The location ID of the destination storage container. + ${StorageLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The SAS URL for the destination storage container. + # It must grant write permission. + ${StorageSASUri}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + if ($PSBoundParameters['StorageAccountId']) { + $PSBoundParameters['DestinationStorageSubscriptionId'] = [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Utilities]::ParseSubscriptionFromId($PSBoundParameters['StorageAccountId']) + } + $PSBoundParameters['ResourceName'] = $PSBoundParameters['Name'] + $null = $PSBoundParameters.Remove('Name') + $PSBoundParameters['RecordType'] = [System.String]::Join(",", $PSBoundParameters['DocumentType']) + $null = $PSBoundParameters.Remove('DocumentType') + $PSBoundParameters['IsEnabled'] = 'true' + + . Az.ApplicationInsights.internal\New-AzApplicationInsightsContinuousExport @PSBoundParameters + } +} + \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Set-AzApplicationInsightsContinuousExport.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Set-AzApplicationInsightsContinuousExport.ps1 new file mode 100644 index 000000000000..db9bb241195a --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Set-AzApplicationInsightsContinuousExport.ps1 @@ -0,0 +1,177 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a Continuous Export configuration of an Application Insights component. +.Description +Create a Continuous Export configuration of an Application Insights component. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentExportConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsightscontinuousexport +#> +function Set-AzApplicationInsightsContinuousExport { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentExportConfiguration])] + [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the Application Insights component resource. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The Continuous Export destination type. + # This has to be 'Blob'. + ${DestinationType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # Deprecated + ${NotificationQueueEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # Deprecated + ${NotificationQueueUri}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String[]] + # The document types to be exported, as comma separated values. + # Allowed values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', 'Availability', 'Messages'. + ${DocumentType }, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The name of destination storage account. + ${StorageAccountId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The location ID of the destination storage container. + ${StorageLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + ${DisableConfiguration}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The SAS URL for the destination storage container. + # It must grant write permission. + ${StorageSASUri}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + if ($PSBoundParameters['StorageAccountId']) { + $PSBoundParameters['DestinationStorageSubscriptionId'] = [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Utilities]::ParseSubscriptionFromId($PSBoundParameters['StorageAccountId']) + } + $PSBoundParameters['ResourceName'] = $PSBoundParameters['Name'] + $null = $PSBoundParameters.Remove('Name') + $PSBoundParameters['RecordType'] = [System.String]::Join(",", $PSBoundParameters['DocumentType']) + $null = $PSBoundParameters.Remove('DocumentType') + if ($PSBoundParameters.ContainsKey('DisableConfiguration')) { + if ($PSBoundParameters['DisableConfiguration']) { + $PSBoundParameters['IsEnabled'] = 'false' + } else { + $PSBoundParameters['IsEnabled'] = 'true' + } + $null = $PSBoundParameters.Remove('DisableConfiguration') + } + + . Az.ApplicationInsights.internal\Set-AzApplicationInsightsContinuousExport @PSBoundParameters + } +} + \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Set-AzApplicationInsightsDailyCap.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Set-AzApplicationInsightsDailyCap.ps1 new file mode 100644 index 000000000000..ac2162904962 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Set-AzApplicationInsightsDailyCap.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update current billing features for an Application Insights component. +.Description +Update current billing features for an Application Insights component. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentBillingFeatures +.Link +https://docs.microsoft.com/powershell/module/az.applicationinsights/set-azapplicationinsightsdailycap +#> +function Set-AzApplicationInsightsDailyCap { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentBillingFeatures])] + [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the Application Insights component resource. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Double] + # Daily data volume cap in GB. + ${DailyCapGB}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Stop send notification when hit cap. + ${DisableNotificationWhenHitCap}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + $PSBoundParameters['ResourceName'] = $PSBoundParameters['Name'] + $null = $PSBoundParameters.Remove('Name') + $feature = (. Az.ApplicationInsights.internal\Get-AzApplicationInsightsComponentCurrentBillingFeature -ResourceGroupName $PSBoundParameters['ResourceGroupName'] -SubscriptionId $PSBoundParameters['SubscriptionId'] -ResourceName $PSBoundParameters['ResourceName']) + if ($PSBoundParameters['DailyCapGB']) { + $PSBoundParameters['DataVolumeCap'] = $PSBoundParameters['DailyCapGB'] + $null = $PSBoundParameters.Remove('DailyCapGB') + } + if ($PSBoundParameters.ContainsKey('DisableNotificationWhenHitCap')) { + $PSBoundParameters['DataVolumeCapStopSendNotificationWhenHitCap'] = $PSBoundParameters['DisableNotificationWhenHitCap'] + $PSBoundParameters.Remove('DisableNotificationWhenHitCap') + } else { + $PSBoundParameters['DataVolumeCapStopSendNotificationWhenHitCap'] = $false + } + + $PSBoundParameters['DataVolumeCapStopSendNotificationWhenHitThreshold'] = $feature.DataVolumeCapStopSendNotificationWhenHitThreshold + $PSBoundParameters['DataVolumeCapWarningThreshold'] = $feature.DataVolumeCapWarningThreshold + $PSBoundParameters['CurrentBillingFeature'] = $feature.CurrentBillingFeature + + . Az.ApplicationInsights.internal\Set-AzApplicationInsightsComponentCurrentBillingFeature @PSBoundParameters + } +} + \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Set-AzApplicationInsightsPricingPlan.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Set-AzApplicationInsightsPricingPlan.ps1 new file mode 100644 index 000000000000..1a8b6ace2ad0 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Set-AzApplicationInsightsPricingPlan.ps1 @@ -0,0 +1,154 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update current billing features for an Application Insights component. +.Description +Update current billing features for an Application Insights component. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentBillingFeatures +.Link +https://docs.microsoft.com/powershell/module/az.applicationinsights/set-azapplicationinsightspricingplan +#> +function Set-AzApplicationInsightsPricingPlan { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentBillingFeatures])] + [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the Application Insights component resource. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [ValidateSet("Basic", "Application Insights Enterprise", "Limited Basic")] + [System.String] + # Current enabled pricing plan. + # When the component is in the Enterprise plan, this will list both 'Basic' and 'Application Insights Enterprise'. + ${PricingPlan}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Double] + # Daily data volume cap in GB. + ${DailyCapGB}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Stop send notification when hit cap. + ${DisableNotificationWhenHitCap}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + $PSBoundParameters['ResourceName'] = $PSBoundParameters['Name'] + $null = $PSBoundParameters.Remove('Name') + $feature = (. Az.ApplicationInsights.internal\Get-AzApplicationInsightsComponentCurrentBillingFeature -ResourceGroupName $PSBoundParameters['ResourceGroupName'] -SubscriptionId $PSBoundParameters['SubscriptionId'] -ResourceName $PSBoundParameters['ResourceName']) + if ($PSBoundParameters['PricingPlan']) { + $PSBoundParameters['CurrentBillingFeature'] = @($PSBoundParameters['PricingPlan']) + $null = $PSBoundParameters.Remove('PricingPlan') + } + if ($PSBoundParameters['DailyCapGB']) { + $PSBoundParameters['DataVolumeCap'] = $PSBoundParameters['DailyCapGB'] + $null = $PSBoundParameters.Remove('DailyCapGB') + } + if ($PSBoundParameters.ContainsKey('DisableNotificationWhenHitCap')) { + $PSBoundParameters['DataVolumeCapStopSendNotificationWhenHitCap'] = $PSBoundParameters['DisableNotificationWhenHitCap'] + $PSBoundParameters.Remove('DisableNotificationWhenHitCap') + } else { + $PSBoundParameters['DataVolumeCapStopSendNotificationWhenHitCap'] = $false + } + + $PSBoundParameters['DataVolumeCapStopSendNotificationWhenHitThreshold'] = $feature.DataVolumeCapStopSendNotificationWhenHitThreshold + $PSBoundParameters['DataVolumeCapWarningThreshold'] = $feature.DataVolumeCapWarningThreshold + + . Az.ApplicationInsights.internal\Set-AzApplicationInsightsComponentCurrentBillingFeature @PSBoundParameters + } +} + \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Update-AzApplicationInsights.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Update-AzApplicationInsights.ps1 new file mode 100644 index 000000000000..fc72c8deef8e --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/custom/Update-AzApplicationInsights.ps1 @@ -0,0 +1,279 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. +.Description +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent +.Link +https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsights +#> +function Update-AzApplicationInsights { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent])] + [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [System.String] + # The name of the Application Insights component resource. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.ApplicationType])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.ApplicationType] + # Type of application being monitored. + ${ApplicationType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Disable IP masking. + ${DisableIPMasking}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Disable Non-AAD based Auth. + ${DisableLocalAuth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # Resource etag + ${Etag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.FlowType])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.FlowType] + # Used by the Application Insights system to determine what kind of flow this component was created by. + # This is to be set to 'Bluefield' when creating/updating a component via the REST API. + ${FlowType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Force users to create their own storage account for profiler and debugger. + ${ForceCustomerStorageForProfiler}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp. + ${HockeyAppId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Purge data immediately after 30 days. + ${ImmediatePurgeDataOn30Day}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.IngestionMode])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.IngestionMode] + # Indicates the flow of the ingestion. + ${IngestionMode}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType] + # The network access type for accessing Application Insights ingestion. + ${PublicNetworkAccessForIngestion}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType] + # The network access type for accessing Application Insights query. + ${PublicNetworkAccessForQuery}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.RequestSource])] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.RequestSource] + # Describes what tool created this Application Insights component. + # Customers using this API should set this to the default 'rest'. + ${RequestSource}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Int32] + # Retention period in days. + ${RetentionInDays}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.Double] + # Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. + ${SamplingPercentage}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IComponentsResourceTags]))] + [System.Collections.Hashtable] + # Resource tags + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Body')] + [System.String] + # Resource Id of the log analytics workspace which the data will be ingested to. + # This property is required to create an application with this API version. + # Applications from older versions will not have this property. + ${WorkspaceResourceId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + try { + $component = . Get-AzApplicationInsights -SubscriptionId $PSBoundParameters["SubscriptionId"] -ResourceGroupName $PSBoundParameters["ResourceGroupName"] -Name $PSBoundParameters["Name"] + } catch { + Write-Warning "component $($PSBoundParameters['Name']) is not existed in Resource Group $($PSBoundParameters["ResourceGroupName"])" + return + } + $PSBoundParameters["Location"] = $component.Location + $PSBoundParameters["Kind"] = $component.Kind + + if (!$PSBoundParameters.ContainsKey("ApplicationType") -and ($null -ne $component.ApplicationType)) { + $PSBoundParameters["ApplicationType"] = $component.ApplicationType + } + if (!$PSBoundParameters.ContainsKey("DisableIPMasking") -and ($null -ne $component.DisableIPMasking)) { + $PSBoundParameters["DisableIPMasking"] = $component.DisableIPMasking + } + if (!$PSBoundParameters.ContainsKey("DisableLocalAuth") -and ($null -ne $component.DisableLocalAuth)) { + $PSBoundParameters["DisableLocalAuth"] = $component.DisableLocalAuth + } + if (!$PSBoundParameters.ContainsKey("Etag") -and ($null -ne $component.Etag)) { + $PSBoundParameters["Etag"] = $component.Etag + } + if (!$PSBoundParameters.ContainsKey("FlowType") -and ($null -ne $component.FlowType)) { + $PSBoundParameters["FlowType"] = $component.FlowType + } + if (!$PSBoundParameters.ContainsKey("ForceCustomerStorageForProfiler") -and ($null -ne $component.ForceCustomerStorageForProfiler)) { + $PSBoundParameters["ForceCustomerStorageForProfiler"] = $component.ForceCustomerStorageForProfiler + } + if (!$PSBoundParameters.ContainsKey("HockeyAppId") -and ($null -ne $component.HockeyAppId)) { + $PSBoundParameters["HockeyAppId"] = $component.HockeyAppId + } + if (!$PSBoundParameters.ContainsKey("ImmediatePurgeDataOn30Day") -and ($null -ne $component.ImmediatePurgeDataOn30Day)) { + $PSBoundParameters["ImmediatePurgeDataOn30Day"] = $component.ImmediatePurgeDataOn30Day + } + if (!$PSBoundParameters.ContainsKey("IngestionMode") -and ($null -ne $component.IngestionMode)) { + $PSBoundParameters["IngestionMode"] = $component.IngestionMode + } + if (!$PSBoundParameters.ContainsKey("PublicNetworkAccessForIngestion") -and ($null -ne $component.PublicNetworkAccessForIngestion)) { + $PSBoundParameters["PublicNetworkAccessForIngestion"] = $component.PublicNetworkAccessForIngestion + } + if (!$PSBoundParameters.ContainsKey("PublicNetworkAccessForQuery") -and ($null -ne $component.PublicNetworkAccessForQuery)) { + $PSBoundParameters["PublicNetworkAccessForQuery"] = $component.PublicNetworkAccessForQuery + } + if (!$PSBoundParameters.ContainsKey("RequestSource") -and ($null -ne $component.RequestSource)) { + $PSBoundParameters["RequestSource"] = $component.RequestSource + } + if (!$PSBoundParameters.ContainsKey("RetentionInDays") -and ($null -ne $component.RetentionInDay)) { + $PSBoundParameters["RetentionInDays"] = $component.RetentionInDay + } + if (!$PSBoundParameters.ContainsKey("SamplingPercentage") -and ($null -ne $component.SamplingPercentage)) { + $PSBoundParameters["SamplingPercentage"] = $component.SamplingPercentage + } + if (!$PSBoundParameters.ContainsKey("Tag") -and ($null -ne $component.Tag)) { + $PSBoundParameters["Tag"] = [System.Collections.Hashtable]$component.Tag.AddtionalProperties + } + if (!$PSBoundParameters.ContainsKey("WorkspaceResourceId") -and ![System.String]::IsNullOrEmpty($component.WorkspaceResourceId)) { + $PSBoundParameters["WorkspaceResourceId"] = $component.WorkspaceResourceId + } + + . New-AzApplicationInsights @PSBoundParameters + } +} + \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Az.ApplicationInsights.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Az.ApplicationInsights.md index 764d39ea9638..1164857dd01a 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Az.ApplicationInsights.md +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Az.ApplicationInsights.md @@ -11,9 +11,34 @@ Locale: en-US Microsoft Azure PowerShell: ApplicationInsights cmdlets ## Az.ApplicationInsights Cmdlets +### [Get-AzApplicationInsights](Get-AzApplicationInsights.md) +Returns an Application Insights component. + +### [Get-AzApplicationInsightsApiKey](Get-AzApplicationInsightsApiKey.md) +Get the API Key for this key id. + +### [Get-AzApplicationInsightsContinuousExport](Get-AzApplicationInsightsContinuousExport.md) +Get the Continuous Export configuration for this export id. + +### [Get-AzApplicationInsightsLinkedStorageAccount](Get-AzApplicationInsightsLinkedStorageAccount.md) +Returns the current linked storage settings for an Application Insights component. + ### [Get-AzApplicationInsightsWebTest](Get-AzApplicationInsightsWebTest.md) Get a specific Application Insights web test definition. +### [New-AzApplicationInsights](New-AzApplicationInsights.md) +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + +### [New-AzApplicationInsightsApiKey](New-AzApplicationInsightsApiKey.md) +Create an API Key of an Application Insights component. + +### [New-AzApplicationInsightsContinuousExport](New-AzApplicationInsightsContinuousExport.md) +Create a Continuous Export configuration of an Application Insights component. + +### [New-AzApplicationInsightsLinkedStorageAccount](New-AzApplicationInsightsLinkedStorageAccount.md) +Replace current linked storage account for an Application Insights component. + ### [New-AzApplicationInsightsWebTest](New-AzApplicationInsightsWebTest.md) Creates or updates an Application Insights web test definition. @@ -23,9 +48,40 @@ Create an in-memory object for WebTestGeolocation. ### [New-AzApplicationInsightsWebTestHeaderFieldObject](New-AzApplicationInsightsWebTestHeaderFieldObject.md) Create a in-memory object for HeaderField +### [Remove-AzApplicationInsights](Remove-AzApplicationInsights.md) +Deletes an Application Insights component. + +### [Remove-AzApplicationInsightsApiKey](Remove-AzApplicationInsightsApiKey.md) +Delete an API Key of an Application Insights component. + +### [Remove-AzApplicationInsightsContinuousExport](Remove-AzApplicationInsightsContinuousExport.md) +Delete a Continuous Export configuration of an Application Insights component. + +### [Remove-AzApplicationInsightsLinkedStorageAccount](Remove-AzApplicationInsightsLinkedStorageAccount.md) +Delete linked storage accounts for an Application Insights component. + ### [Remove-AzApplicationInsightsWebTest](Remove-AzApplicationInsightsWebTest.md) Deletes an Application Insights web test. +### [Set-AzApplicationInsightsContinuousExport](Set-AzApplicationInsightsContinuousExport.md) +Create a Continuous Export configuration of an Application Insights component. + +### [Set-AzApplicationInsightsDailyCap](Set-AzApplicationInsightsDailyCap.md) +Update current billing features for an Application Insights component. + +### [Set-AzApplicationInsightsPricingPlan](Set-AzApplicationInsightsPricingPlan.md) +Update current billing features for an Application Insights component. + +### [Set-AzApplicationInsightsWebTest](Set-AzApplicationInsightsWebTest.md) +Creates or updates an Application Insights web test definition. + +### [Update-AzApplicationInsights](Update-AzApplicationInsights.md) +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + +### [Update-AzApplicationInsightsLinkedStorageAccount](Update-AzApplicationInsightsLinkedStorageAccount.md) +Update linked storage accounts for an Application Insights component. + ### [Update-AzApplicationInsightsWebTestTag](Update-AzApplicationInsightsWebTestTag.md) Creates or updates an Application Insights web test definition. diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsights.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsights.md new file mode 100644 index 000000000000..1bec46497b0c --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsights.md @@ -0,0 +1,212 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/get-azapplicationinsightscomponent +schema: 2.0.0 +--- + +# Get-AzApplicationInsights + +## SYNOPSIS +Returns an Application Insights component. + +## SYNTAX + +### List (Default) +``` +Get-AzApplicationInsights [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzApplicationInsights -Name -ResourceGroupName [-SubscriptionId ] [-Full] + [-DefaultProfile ] [] +``` + +### GetByInputObject +``` +Get-AzApplicationInsights -InputObject [-DefaultProfile ] + [] +``` + +### GetByResourceId +``` +Get-AzApplicationInsights -ResourceId [-Full] [-DefaultProfile ] [] +``` + +### ListByResourceGroupName +``` +Get-AzApplicationInsights -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### ListBySubscription +``` +Get-AzApplicationInsights [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +Returns an Application Insights component. + +## EXAMPLES + +### Example 1: Get application insights resource +```powershell +PS C:\> Get-AzApplicationInsights -ResourceGroupName "testgroup" -Name "test" +``` + +Get application insights resource + +### Example 2: Get application insights resource with pricing plan information +```powershell +PS C:\> Get-AzApplicationInsights -ResourceGroupName "testgroup" -Name "test" -IncludePricingPlan +``` + +Get application insights resource with pricing plan information + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Full + + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: Get, GetByResourceId +Aliases: IncludeDailyCap, IncludeDailyCapStatus, IncludePricingPlan + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +Parameter Sets: GetByInputObject +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, ListByResourceGroupName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +The resource ID of applicationinsights component. + +```yaml +Type: System.String[] +Parameter Sets: GetByResourceId +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, ListByResourceGroupName, ListBySubscription +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.PSApplicationInsightsComponentWithPricingPlan + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. + - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. + - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. + - `[SubscriptionId ]`: The ID of the target subscription. + - `[WebTestName ]`: The name of the Application Insights WebTest resource. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsApiKey.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsApiKey.md new file mode 100644 index 000000000000..ba5c316a4f5e --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsApiKey.md @@ -0,0 +1,181 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/get-azapplicationinsightsapikey +schema: 2.0.0 +--- + +# Get-AzApplicationInsightsApiKey + +## SYNOPSIS +Get the API Key for this key id. + +## SYNTAX + +### List (Default) +``` +Get-AzApplicationInsightsApiKey -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzApplicationInsightsApiKey -ApiKeyId -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzApplicationInsightsApiKey -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get the API Key for this key id. + +## EXAMPLES + +### Example 1: Get Api Keys for an application insights resource +```powershell +PS C:\> Get-AzApplicationInsightsApiKey -ResourceGroupName "testGroup" -Name "test" +``` + +Get Api Keys for an application insights resource + +### Example 2: Get specific API key for an application insights resource +```powershell +PS C:\> Get-AzApplicationInsightsApiKey -ResourceGroupName "testGroup" -Name "test" -ApiKeyId 7c4c61dc-b392-4aa4-992f-ee92b84e5dee +``` + +Get specific API key for an application insights resource + +## PARAMETERS + +### -ApiKeyId +The API Key ID. +This is unique within a Application Insights component. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: ApplicationInsightsComponentNameAlias, ComponentNameAlias + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentApiKey + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. + - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. + - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. + - `[SubscriptionId ]`: The ID of the target subscription. + - `[WebTestName ]`: The name of the Application Insights WebTest resource. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsContinuousExport.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsContinuousExport.md new file mode 100644 index 000000000000..44746f7cb93f --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsContinuousExport.md @@ -0,0 +1,181 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/get-azapplicationinsightscontinuousexport +schema: 2.0.0 +--- + +# Get-AzApplicationInsightsContinuousExport + +## SYNOPSIS +Get the Continuous Export configuration for this export id. + +## SYNTAX + +### List (Default) +``` +Get-AzApplicationInsightsContinuousExport -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzApplicationInsightsContinuousExport -ExportId -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzApplicationInsightsContinuousExport -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get the Continuous Export configuration for this export id. + +## EXAMPLES + +### Example 1: Get continuous export for an application insights resource +```powershell +PS C:\> Get-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" +``` + +Get continuous export for an application insights resource + +### Example 2: Get continuous export for an application insights resource +```powershell +PS C:\> Get-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" -ExportId "ZJrfffySPdtG3ESn3iRxVIEFuNY=" +``` + +Get continuous export for an application insights resource + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExportId +The Continuous Export configuration ID. +This is unique within a Application Insights component. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentExportConfiguration + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. + - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. + - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. + - `[SubscriptionId ]`: The ID of the target subscription. + - `[WebTestName ]`: The name of the Application Insights WebTest resource. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsLinkedStorageAccount.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsLinkedStorageAccount.md new file mode 100644 index 000000000000..b48511420bcf --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsLinkedStorageAccount.md @@ -0,0 +1,152 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/get-azapplicationinsightslinkedstorageaccount +schema: 2.0.0 +--- + +# Get-AzApplicationInsightsLinkedStorageAccount + +## SYNOPSIS +Returns the current linked storage settings for an Application Insights component. + +## SYNTAX + +### Get (Default) +``` +Get-AzApplicationInsightsLinkedStorageAccount -ComponentName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzApplicationInsightsLinkedStorageAccount -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Returns the current linked storage settings for an Application Insights component. + +## EXAMPLES + +### Example 1: Get linked storage account associated with component "componentName" +```powershell +PS C:\> Get-AzApplicationInsightsLinkedStorageAccount -ResourceGroupName "rgName" -ComponentName "componentName" +``` + +Get linked storage account associated with component "componentName" + +## PARAMETERS + +### -ComponentName +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20200301Preview.IComponentLinkedStorageAccounts + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. + - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. + - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. + - `[SubscriptionId ]`: The ID of the target subscription. + - `[WebTestName ]`: The name of the Application Insights WebTest resource. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsWebTest.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsWebTest.md index 5a6efe99cd54..173059502fad 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsWebTest.md +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Get-AzApplicationInsightsWebTest.md @@ -51,6 +51,7 @@ Get a specific Application Insights web test definition. ```powershell Get-AzApplicationInsightsWebTest ``` + ```output Name Location WebTestKind ResourceGroupName ---- -------- ----------- ----------------- @@ -67,6 +68,7 @@ This command lists all Application Insights web tests under a subscription. ```powershell Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test ``` + ```output Name Location WebTestKind ResourceGroupName ---- -------- ----------- ----------------- @@ -83,6 +85,7 @@ This command lists all Application Insights web tests under a resource group. ```powershell Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -AppInsightsName appinsights-portal01 ``` + ```output Name Location WebTestKind ResourceGroupName Enabled ---- -------- ----------- ----------------- ------- @@ -99,6 +102,7 @@ This command lists all Application Insights web tests under a specific Applicati ```powershell Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -Name standard-pwsh01 ``` + ```output Name Location WebTestKind ResourceGroupName Enabled ---- -------- ----------- ----------------- ------- @@ -118,6 +122,7 @@ New-AzApplicationInsightsWebTest -ResourceGroup azpwsh-rg-test -Name standardweb -RuleSslCheck -RuleSslCertRemainingLifetimeCheck 7 -RuleExpectedHttpStatusCode 200 ` -Enabled -Frequency 300 -Timeout 120 -WebTestKind "standard" -RetryEnabled -GeoLocations $location01, $location02 ` |Get-AzApplicationInsightsWebTest ``` + ```output Name Location WebTestKind ResourceGroupName Enabled ---- -------- ----------- ----------------- ------- @@ -241,9 +246,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. - `[SubscriptionId ]`: The ID of the target subscription. - `[WebTestName ]`: The name of the Application Insights WebTest resource. diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsights.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsights.md new file mode 100644 index 000000000000..3733f72f48fb --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsights.md @@ -0,0 +1,423 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsights +schema: 2.0.0 +--- + +# New-AzApplicationInsights + +## SYNOPSIS +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + +## SYNTAX + +``` +New-AzApplicationInsights -Name -ResourceGroupName -Location + [-SubscriptionId ] [-ApplicationType ] [-DisableIPMasking] [-DisableLocalAuth] + [-Etag ] [-FlowType ] [-ForceCustomerStorageForProfiler] [-HockeyAppId ] + [-ImmediatePurgeDataOn30Day] [-IngestionMode ] [-Kind ] + [-PublicNetworkAccessForIngestion ] + [-PublicNetworkAccessForQuery ] [-RequestSource ] + [-RetentionInDays ] [-SamplingPercentage ] [-Tag ] [-WorkspaceResourceId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + +## EXAMPLES + +### Example 1: Create a new application insights resource +```powershell +PS C:\> New-AzApplicationInsights -Kind java -ResourceGroupName testgroup -Name test1027 -location eastus +``` + +Add a new application insights resource named as "test" in resource group "testgroup" with kind "java" + +## PARAMETERS + +### -ApplicationType +Type of application being monitored. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.ApplicationType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisableIPMasking +Disable IP masking. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisableLocalAuth +Disable Non-AAD based Auth. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Etag +Resource etag + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FlowType +Used by the Application Insights system to determine what kind of flow this component was created by. +This is to be set to 'Bluefield' when creating/updating a component via the REST API. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.FlowType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ForceCustomerStorageForProfiler +Force users to create their own storage account for profiler and debugger. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HockeyAppId +The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmediatePurgeDataOn30Day +Purge data immediately after 30 days. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionMode +Indicates the flow of the ingestion. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.IngestionMode +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Kind +The kind of application that this component refers to, used to customize UI. +This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicNetworkAccessForIngestion +The network access type for accessing Application Insights ingestion. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicNetworkAccessForQuery +The network access type for accessing Application Insights query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequestSource +Describes what tool created this Application Insights component. +Customers using this API should set this to the default 'rest'. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.RequestSource +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RetentionInDays +Retention period in days. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SamplingPercentage +Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceResourceId +Resource Id of the log analytics workspace which the data will be ingested to. +This property is required to create an application with this API version. +Applications from older versions will not have this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsApiKey.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsApiKey.md new file mode 100644 index 000000000000..339527bf8a34 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsApiKey.md @@ -0,0 +1,174 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsightsapikey +schema: 2.0.0 +--- + +# New-AzApplicationInsightsApiKey + +## SYNOPSIS +Create an API Key of an Application Insights component. + +## SYNTAX + +``` +New-AzApplicationInsightsApiKey -Name -ResourceGroupName -Description + -Permissions [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create an API Key of an Application Insights component. + +## EXAMPLES + +### Example 1: Create a new Api Key for an application insights resource +```powershell +PS C:\> $apiKeyDescription = "testapiKey" +PS C:\> $permissions = @("ReadTelemetry", "WriteAnnotations") +PS C:\> New-AzApplicationInsightsApiKey -ResourceGroupName "testGroup" -Name "test" -Description $apiKeyDescription -Permissions $permissions + +``` + +Create a new Api Key for an application insights resource + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +The name of the API Key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Permissions +The read access rights of this API Key. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentApiKey + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsContinuousExport.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsContinuousExport.md new file mode 100644 index 000000000000..6adbed165332 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsContinuousExport.md @@ -0,0 +1,255 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsightscontinuousexport +schema: 2.0.0 +--- + +# New-AzApplicationInsightsContinuousExport + +## SYNOPSIS +Create a Continuous Export configuration of an Application Insights component. + +## SYNTAX + +``` +New-AzApplicationInsightsContinuousExport -Name -ResourceGroupName + [-SubscriptionId ] [-DestinationType ] [-DocumentType ] + [-NotificationQueueEnabled ] [-NotificationQueueUri ] [-StorageAccountId ] + [-StorageLocation ] [-StorageSASUri ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a Continuous Export configuration of an Application Insights component. + +## EXAMPLES + +### Example 1: Create a new continuous export configuration for an application insights resource +```powershell +PS C:\> $sastoken = New-AzStorageContainerSASToken -Name testcontainer -Context $context -ExpiryTime (Get-Date).AddYears(50) -Permission w +PS C:\> $sasuri = "https://teststorageaccount.blob.core.windows.net/testcontainer" + $sastoken +PS C:\> New-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" ` +-DocumentType "Request","Trace", "Custom Event" -StorageAccountId "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba96/resourceGroups/testgroup/providers/Microsoft.Storage/storageAccounts/teststorageaccount" -StorageLocation sourcecentralus ` +-StorageSASUri $sasuri +``` + +Create a new application insights continuous export configuration to export "Request" and "Trace" document types to storage contain "testcontainer" in storage account "teststorageaccount" in resource group "testgroup". +The SAS token have to be valid and have write permission to the container, otherwise continuous export feature won't work.If SAS token expired, the continuous export feature will stop working. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationType +The Continuous Export destination type. +This has to be 'Blob'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DocumentType + + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NotificationQueueEnabled +Deprecated + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NotificationQueueUri +Deprecated + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountId +The name of destination storage account. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageLocation +The location ID of the destination storage container. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageSASUri +The SAS URL for the destination storage container. +It must grant write permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentExportConfiguration + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsLinkedStorageAccount.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsLinkedStorageAccount.md new file mode 100644 index 000000000000..7977f59fccef --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsLinkedStorageAccount.md @@ -0,0 +1,157 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsightslinkedstorageaccount +schema: 2.0.0 +--- + +# New-AzApplicationInsightsLinkedStorageAccount + +## SYNOPSIS +Replace current linked storage account for an Application Insights component. + +## SYNTAX + +``` +New-AzApplicationInsightsLinkedStorageAccount -ComponentName -ResourceGroupName + [-SubscriptionId ] [-LinkedStorageAccountResourceId ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Replace current linked storage account for an Application Insights component. + +## EXAMPLES + +### Example 1: Create an application insights linked storage account +```powershell +PS C:\> $account = Get-AzStorageAccount -ResourceGroupName "rgName" -Name "accountName" +PS C:\> Get-AzApplicationInsights -ResourceGroupName "rgName" -Name "componentName" | New-AzApplicationInsightsLinkedStorageAccount -LinkedStorageAccountResourceId $account.Id +``` + +Create linked storage account $account under component "componentName" + +## PARAMETERS + +### -ComponentName +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LinkedStorageAccountResourceId +Linked storage account resource ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20200301Preview.IComponentLinkedStorageAccounts + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTest.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTest.md index d09ff9f0437b..5fc37f0aba72 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTest.md +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTest.md @@ -49,6 +49,7 @@ New-AzApplicationInsightsWebTest -ResourceGroup azpwsh-rg-test -Name standard-pw -RequestUrl "https://www.bing.com" -RequestHttpVerb "GET" -TestName 'standard-pwsh01' ` -RuleExpectedHttpStatusCode 200 -Frequency 300 -Enabled -Timeout 120 -Kind 'standard' -RetryEnabled -GeoLocation $geoLocation ``` + ```output Name Location WebTestKind ResourceGroupName Enabled ---- -------- ----------- ----------------- ------- @@ -70,6 +71,7 @@ New-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -Name 'pingwe -Kind 'ping' -RequestUrl 'https://cn.bing.com' -RequestParseDependent -RuleExpectedHttpStatusCode 200 ` -ContentMatch "status" ``` + ```output Name Location WebTestKind ResourceGroupName Enabled ---- -------- ----------- ----------------- ------- @@ -103,6 +105,7 @@ New-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -Name 'pingwe " ``` + ```output Name Location WebTestKind ResourceGroupName Enabled ---- -------- ----------- ----------------- ------- diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTestGeolocationObject.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTestGeolocationObject.md index 788737930568..3f5721723d00 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTestGeolocationObject.md +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTestGeolocationObject.md @@ -25,6 +25,7 @@ Create an in-memory object for WebTestGeolocation. ```powershell New-AzApplicationInsightsWebTestGeolocationObject -Location "emea-nl-ams-azr" ``` + ```output Location -------- diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTestHeaderFieldObject.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTestHeaderFieldObject.md index 9ad7ad0cea6d..b69213d9c6fe 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTestHeaderFieldObject.md +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/New-AzApplicationInsightsWebTestHeaderFieldObject.md @@ -25,6 +25,7 @@ Create a in-memory object for HeaderField ```powershell New-AzApplicationInsightsWebTestHeaderFieldObject -Name 'version' -Value '2.0.1' ``` + ```output Name Value ---- ----- diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsights.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsights.md new file mode 100644 index 000000000000..7fce7811b051 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsights.md @@ -0,0 +1,198 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/remove-azapplicationinsights +schema: 2.0.0 +--- + +# Remove-AzApplicationInsights + +## SYNOPSIS +Deletes an Application Insights component. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzApplicationInsights -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzApplicationInsights -InputObject [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an Application Insights component. + +## EXAMPLES + +### Example 1: Remove an application insights resource +```powershell +PS C:\> Remove-AzApplicationInsights -ResourceGroupName "testgroup" -Name "test" -PassThru +``` + +Remove an application insights resource named "test" in resource group "testgroup" + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. + - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. + - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. + - `[SubscriptionId ]`: The ID of the target subscription. + - `[WebTestName ]`: The name of the Application Insights WebTest resource. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsApiKey.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsApiKey.md new file mode 100644 index 000000000000..cd9f14c024e3 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsApiKey.md @@ -0,0 +1,199 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/remove-azapplicationinsightsapikey +schema: 2.0.0 +--- + +# Remove-AzApplicationInsightsApiKey + +## SYNOPSIS +Delete an API Key of an Application Insights component. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzApplicationInsightsApiKey -ApiKeyId -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzApplicationInsightsApiKey -InputObject [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete an API Key of an Application Insights component. + +## EXAMPLES + +### Example 1: Remove an application insights api key for an application insights resource +```powershell +PS C:\> Remove-AzApplicationInsightsApiKey -ResourceGroupName "testGroup" -Name "test" -ApiKeyId dd173f38-4fd1-4c75-8af5-99c29aa0f867 -PassThru +``` + +Remove an application insights api key for an application insights resource + +## PARAMETERS + +### -ApiKeyId +The API Key ID. +This is unique within a Application Insights component. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: ApplicationInsightsComponentNameAlias, ComponentNameAlias + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentApiKey + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. + - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. + - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. + - `[SubscriptionId ]`: The ID of the target subscription. + - `[WebTestName ]`: The name of the Application Insights WebTest resource. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsContinuousExport.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsContinuousExport.md new file mode 100644 index 000000000000..0717e9c2d0d6 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsContinuousExport.md @@ -0,0 +1,200 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/remove-azapplicationinsightscontinuousexport +schema: 2.0.0 +--- + +# Remove-AzApplicationInsightsContinuousExport + +## SYNOPSIS +Delete a Continuous Export configuration of an Application Insights component. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzApplicationInsightsContinuousExport -ExportId -ResourceGroupName + -ResourceName [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzApplicationInsightsContinuousExport -InputObject + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a Continuous Export configuration of an Application Insights component. + +## EXAMPLES + +### Example 1: Remove a continuous export configuration in an application insights resource +```powershell +PS C:\> Remove-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" -ExportId "uGOoki0jQsyEs3IdQ83Q4QsNr4=" -PassThru +``` + +Remove a continuous export configuration in an application insights resource + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExportId +The Continuous Export configuration ID. +This is unique within a Application Insights component. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentExportConfiguration + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. + - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. + - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. + - `[SubscriptionId ]`: The ID of the target subscription. + - `[WebTestName ]`: The name of the Application Insights WebTest resource. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsLinkedStorageAccount.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsLinkedStorageAccount.md new file mode 100644 index 000000000000..6ddccb5e685e --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsLinkedStorageAccount.md @@ -0,0 +1,198 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/remove-azapplicationinsightslinkedstorageaccount +schema: 2.0.0 +--- + +# Remove-AzApplicationInsightsLinkedStorageAccount + +## SYNOPSIS +Delete linked storage accounts for an Application Insights component. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzApplicationInsightsLinkedStorageAccount -ComponentName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzApplicationInsightsLinkedStorageAccount -InputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete linked storage accounts for an Application Insights component. + +## EXAMPLES + +### Example 1: Delete linked storage account associated with application insights component "componentName" +```powershell +PS C:\> Get-AzApplicationInsights -ResourceGroupName "rgName" -Name "componentName" | Remove-AzApplicationInsightsLinkedStorageAccount +``` + +Delete linked storage account associated with application insights component "componentName" + +## PARAMETERS + +### -ComponentName +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. + - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. + - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. + - `[SubscriptionId ]`: The ID of the target subscription. + - `[WebTestName ]`: The name of the Application Insights WebTest resource. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsWebTest.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsWebTest.md index 6842f325d13b..b8e3b1a5ff9a 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsWebTest.md +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Remove-AzApplicationInsightsWebTest.md @@ -189,9 +189,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. - `[SubscriptionId ]`: The ID of the target subscription. - `[WebTestName ]`: The name of the Application Insights WebTest resource. diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsContinuousExport.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsContinuousExport.md new file mode 100644 index 000000000000..ccb4db9a532c --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsContinuousExport.md @@ -0,0 +1,270 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsightscontinuousexport +schema: 2.0.0 +--- + +# Set-AzApplicationInsightsContinuousExport + +## SYNOPSIS +Create a Continuous Export configuration of an Application Insights component. + +## SYNTAX + +``` +Set-AzApplicationInsightsContinuousExport -Name -ResourceGroupName + [-SubscriptionId ] [-DestinationType ] [-DisableConfiguration] [-DocumentType ] + [-NotificationQueueEnabled ] [-NotificationQueueUri ] [-StorageAccountId ] + [-StorageLocation ] [-StorageSASUri ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a Continuous Export configuration of an Application Insights component. + +## EXAMPLES + +### Example 1: Update continuous export configuration +```powershell +PS C:\> $sastoken = New-AzStorageContainerSASToken -Name testcontainer -Context $context -ExpiryTime (Get-Date).AddYears(50) -Permission w +PS C:\> $sasuri = "https://teststorageaccount.blob.core.windows.net/testcontainer" + $sastoken +PS C:\> Set-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" +-DocumentType "Request","Trace" -ExportId "jlTFEiBg1rkDXOCIeJQ2mB2TxZg=" -StorageAccountId "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba96/resourceGroups/testgroup/providers/Microsoft.Storage/storageAccounts/teststorageaccount" -StorageLocation sourcecentralus +-StorageSASUri $sasuri +``` + +Update continuous export configuration "jlTFEiBg1rkDXOCIeJQ2mB2TxZg=" of resource "test" in resource group "testgroup" to export "Request" and "Trace" documents to storage container "testcontainer" in "teststorageaccount".The SAS token have to be valid and have write permission to the container, otherwise continuous export feature won't work. +If SAS token expired, the continuous export feature will stop working. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationType +The Continuous Export destination type. +This has to be 'Blob'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisableConfiguration + + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DocumentType + + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NotificationQueueEnabled +Deprecated + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NotificationQueueUri +Deprecated + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountId +The name of destination storage account. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageLocation +The location ID of the destination storage container. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageSASUri +The SAS URL for the destination storage container. +It must grant write permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentExportConfiguration + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsDailyCap.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsDailyCap.md new file mode 100644 index 000000000000..287498e2d4da --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsDailyCap.md @@ -0,0 +1,171 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/set-azapplicationinsightsdailycap +schema: 2.0.0 +--- + +# Set-AzApplicationInsightsDailyCap + +## SYNOPSIS +Update current billing features for an Application Insights component. + +## SYNTAX + +``` +Set-AzApplicationInsightsDailyCap -Name -ResourceGroupName [-SubscriptionId ] + [-DailyCapGB ] [-DisableNotificationWhenHitCap] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Update current billing features for an Application Insights component. + +## EXAMPLES + +### Example 1: Set daily data volume cap for an application insights resource +```powershell +PS C:\> Set-AzApplicationInsightsDailyCap -ResourceGroupName "testgroup" -Name "test" -DailyCapGB 400 -DisableNotificationWhenHitCap +``` + +Set the daily data volume cap to 400GB per day and stop send notification when hit cap for resource "test" in resource group "testgroup" + +## PARAMETERS + +### -DailyCapGB +Daily data volume cap in GB. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisableNotificationWhenHitCap +Stop send notification when hit cap. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentBillingFeatures + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsPricingPlan.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsPricingPlan.md new file mode 100644 index 000000000000..1c78b324a884 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsPricingPlan.md @@ -0,0 +1,187 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/set-azapplicationinsightspricingplan +schema: 2.0.0 +--- + +# Set-AzApplicationInsightsPricingPlan + +## SYNOPSIS +Update current billing features for an Application Insights component. + +## SYNTAX + +``` +Set-AzApplicationInsightsPricingPlan -Name -ResourceGroupName [-SubscriptionId ] + [-DailyCapGB ] [-DisableNotificationWhenHitCap] [-PricingPlan ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update current billing features for an Application Insights component. + +## EXAMPLES + +### Example 1: Set pricing plan and daily data volume information for an application insights resource +```powershell +PS C:\> Set-AzApplicationInsightsPricingPlan -ResourceGroupName "testgroup" -Name "test" -PricingPlan "Basic" -DailyCapGB 400 +``` + +Set the pricing plan to "Basic", set the daily data volume cap to 400GB per day and stop send notification when hit cap for resource "test" in resource group "testgroup" + +## PARAMETERS + +### -DailyCapGB +Daily data volume cap in GB. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisableNotificationWhenHitCap +Stop send notification when hit cap. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PricingPlan +Current enabled pricing plan. +When the component is in the Enterprise plan, this will list both 'Basic' and 'Application Insights Enterprise'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20150501.IApplicationInsightsComponentBillingFeatures + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsWebTest.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsWebTest.md new file mode 100644 index 000000000000..c86d86eb37bf --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Set-AzApplicationInsightsWebTest.md @@ -0,0 +1,570 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/set-azapplicationinsightswebtest +schema: 2.0.0 +--- + +# Set-AzApplicationInsightsWebTest + +## SYNOPSIS +Creates or updates an Application Insights web test definition. + +## SYNTAX + +``` +Set-AzApplicationInsightsWebTest -Name -ResourceGroupName -Location + [-SubscriptionId ] [-ConfigurationWebTest ] [-ContentValidationContentMatch ] + [-ContentValidationIgnoreCase] [-ContentValidationPassIfTextFound] [-Description ] [-Enabled] + [-Frequency ] [-Kind ] [-PropertiesLocations ] + [-PropertiesWebTestName ] [-RequestBody ] [-RequestFollowRedirect] + [-RequestHeader ] [-RequestHttpVerb ] [-RequestParseDependentRequest] + [-RequestUrl ] [-RetryEnabled] [-SyntheticMonitorId ] [-Tag ] [-Timeout ] + [-ValidationRuleExpectedHttpStatusCode ] [-ValidationRuleIgnoreHttpsStatusCode] + [-ValidationRuleSslCertRemainingLifetimeCheck ] [-ValidationRuleSslCheck] + [-WebTestKind ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates an Application Insights web test definition. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +PS C:\> {{ Add code here }} + +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +PS C:\> {{ Add code here }} + +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -ConfigurationWebTest +The XML specification of a WebTest to run against an application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContentValidationContentMatch +Content to look for in the return of the WebTest. +Must not be null or empty. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContentValidationIgnoreCase +When set, this value makes the ContentMatch validation case insensitive. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContentValidationPassIfTextFound +When true, validation will pass if there is a match for the ContentMatch string. +If false, validation will fail if there is a match + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +User defined description for this WebTest. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Enabled +Is the test actively being monitored. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Frequency +Interval in seconds between test runs for this WebTest. +Default value is 300. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Kind +The kind of WebTest that this web test watches. +Choices are ping and multistep. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.WebTestKind +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights WebTest resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: WebTestName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PropertiesLocations +A list of where to physically run the tests from to give global coverage for accessibility of your application. +To construct, see NOTES section for PROPERTIESLOCATIONS properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IWebTestGeolocation[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PropertiesWebTestName +User defined name if this WebTest. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequestBody +Base64 encoded string body to send with this web test. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequestFollowRedirect +Follow redirects for this web test. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequestHeader +List of headers and their values to add to the WebTest call. +To construct, see NOTES section for REQUESTHEADER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IHeaderField[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequestHttpVerb +Http verb to use for this web test. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequestParseDependentRequest +Parse Dependent request for this WebTest. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequestUrl +Url location to test. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RetryEnabled +Allow for retries should this WebTest fail. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SyntheticMonitorId +Unique ID of this WebTest. +This is typically the same value as the Name field. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Timeout +Seconds until this WebTest will timeout and fail. +Default value is 30. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ValidationRuleExpectedHttpStatusCode +Validate that the WebTest returns the http status code provided. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ValidationRuleIgnoreHttpsStatusCode +When set, validation will ignore the status code. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ValidationRuleSslCertRemainingLifetimeCheck +A number of days to check still remain before the the existing SSL cert expires. +Value must be positive and the SSLCheck must be set to true. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ValidationRuleSslCheck +Checks to see if the SSL cert is still valid. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WebTestKind +The kind of web test this is, valid choices are ping, multistep, and standard. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.WebTestKindEnum +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20180501Preview.IWebTest + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +PROPERTIESLOCATIONS : A list of where to physically run the tests from to give global coverage for accessibility of your application. + - `[Location ]`: Location ID for the WebTest to run from. + +REQUESTHEADER : List of headers and their values to add to the WebTest call. + - `[Name ]`: The name of the header. + - `[Value ]`: The value of the header. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsights.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsights.md new file mode 100644 index 000000000000..9d95c5fb0343 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsights.md @@ -0,0 +1,392 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/new-azapplicationinsights +schema: 2.0.0 +--- + +# Update-AzApplicationInsights + +## SYNOPSIS +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + +## SYNTAX + +``` +Update-AzApplicationInsights -Name -ResourceGroupName [-SubscriptionId ] + [-ApplicationType ] [-DisableIPMasking] [-DisableLocalAuth] [-Etag ] + [-FlowType ] [-ForceCustomerStorageForProfiler] [-HockeyAppId ] + [-ImmediatePurgeDataOn30Day] [-IngestionMode ] + [-PublicNetworkAccessForIngestion ] + [-PublicNetworkAccessForQuery ] [-RequestSource ] + [-RetentionInDays ] [-SamplingPercentage ] [-Tag ] [-WorkspaceResourceId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates (or updates) an Application Insights component. +Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + +## EXAMPLES + +### Example 1: Update application insights component +```powershell +PS C:\> Update-AzApplicationInsights -ResourceGroupName "rgName" -Name "aiName" -PublicNetworkAccessForIngestion "Disabled" -PublicNetworkAccessForQuery "Disabled" +``` + +update application insights component "aiName" PublicNetworkAccessForIngestion/PublicNetworkAccessForQuery both to "Disabled" + +## PARAMETERS + +### -ApplicationType +Type of application being monitored. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.ApplicationType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisableIPMasking +Disable IP masking. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisableLocalAuth +Disable Non-AAD based Auth. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Etag +Resource etag + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FlowType +Used by the Application Insights system to determine what kind of flow this component was created by. +This is to be set to 'Bluefield' when creating/updating a component via the REST API. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.FlowType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ForceCustomerStorageForProfiler +Force users to create their own storage account for profiler and debugger. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HockeyAppId +The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmediatePurgeDataOn30Day +Purge data immediately after 30 days. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionMode +Indicates the flow of the ingestion. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.IngestionMode +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicNetworkAccessForIngestion +The network access type for accessing Application Insights ingestion. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicNetworkAccessForQuery +The network access type for accessing Application Insights query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.PublicNetworkAccessType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequestSource +Describes what tool created this Application Insights component. +Customers using this API should set this to the default 'rest'. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Support.RequestSource +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RetentionInDays +Retention period in days. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SamplingPercentage +Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceResourceId +Resource Id of the log analytics workspace which the data will be ingested to. +This property is required to create an application with this API version. +Applications from older versions will not have this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api202002.IApplicationInsightsComponent + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsightsLinkedStorageAccount.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsightsLinkedStorageAccount.md new file mode 100644 index 000000000000..89e6f192aef0 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsightsLinkedStorageAccount.md @@ -0,0 +1,201 @@ +--- +external help file: +Module Name: Az.ApplicationInsights +online version: https://docs.microsoft.com/powershell/module/az.applicationinsights/update-azapplicationinsightslinkedstorageaccount +schema: 2.0.0 +--- + +# Update-AzApplicationInsightsLinkedStorageAccount + +## SYNOPSIS +Update linked storage accounts for an Application Insights component. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzApplicationInsightsLinkedStorageAccount -ComponentName -ResourceGroupName + [-SubscriptionId ] [-LinkedStorageAccountResourceId ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzApplicationInsightsLinkedStorageAccount -InputObject + [-LinkedStorageAccountResourceId ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Update linked storage accounts for an Application Insights component. + +## EXAMPLES + +### Example 1: Update linked storage account +```powershell +PS C:\> $account = Get-AzStorageAccount -ResourceGroupName "rgName" -Name "accountName" +PS C:\> Get-AzApplicationInsights -ResourceGroupName "rgName" -Name "componentName" | Update-AzApplicationInsightsLinkedStorageAccount -LinkedStorageAccountResourceId $account.Id +``` + +Update linked storage account under component "componentName" to associate with $account + +## PARAMETERS + +### -ComponentName +The name of the Application Insights component resource. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -LinkedStorageAccountResourceId +Linked storage account resource ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.IApplicationInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Models.Api20200301Preview.IComponentLinkedStorageAccounts + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. + - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. + - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. + - `[SubscriptionId ]`: The ID of the target subscription. + - `[WebTestName ]`: The name of the Application Insights WebTest resource. + +## RELATED LINKS + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsightsWebTestTag.md b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsightsWebTestTag.md index b312feb3685f..a0eb467557d9 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsightsWebTestTag.md +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/docs/Update-AzApplicationInsightsWebTestTag.md @@ -33,6 +33,7 @@ Creates or updates an Application Insights web test definition. ```powershell Update-AzApplicationInsightsWebTestTag -ResourceGroupName azpwsh-rg-test -Name webtest01-lucasappinsights -Tag @{"hidden-link:/subscriptions/xxxxxxxxxx-xxxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azpwsh-rg-test/providers/microsoft.insights/components/lucasappinsights" = "Resource"} ``` + ```output Location Name WebTestKind ResourceGroupName Enabled -------- ---- ----------- ----------------- ------- @@ -45,6 +46,7 @@ This command updates Application Insights link of the Web test. ```powershell Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -WebTestName webtest01-lucasappinsights | Update-AzApplicationInsightsWebTestTag -Tag @{"hidden-link:/subscriptions/xxxxxxxxxx-xxxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azpwsh-rg-test/providers/microsoft.insights/components/appinsightsportal01" = "Resource"} ``` + ```output Location Name WebTestKind ResourceGroupName Enabled -------- ---- ----------- ----------------- ------- @@ -199,9 +201,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter + - `[AnnotationId ]`: The unique annotation ID. This is unique within a Application Insights component. - `[ComponentName ]`: The name of the Application Insights component resource. + - `[ExportId ]`: The Continuous Export configuration ID. This is unique within a Application Insights component. - `[Id ]`: Resource identity path + - `[KeyId ]`: The API Key ID. This is unique within a Application Insights component. + - `[PurgeId ]`: In a purge status request, this is the Id of the operation the status of which is returned. - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[ResourceName ]`: The name of the Application Insights component resource. + - `[StorageType ]`: The type of the Application Insights component data source for the linked storage account. - `[SubscriptionId ]`: The ID of the target subscription. - `[WebTestName ]`: The name of the Application Insights WebTest resource. diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsights.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsights.md new file mode 100644 index 000000000000..645f2b634348 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsights.md @@ -0,0 +1,14 @@ +### Example 1: Get application insights resource +```powershell +PS C:\> Get-AzApplicationInsights -ResourceGroupName "testgroup" -Name "test" +``` + +Get application insights resource + +### Example 2: Get application insights resource with pricing plan information +```powershell +PS C:\> Get-AzApplicationInsights -ResourceGroupName "testgroup" -Name "test" -IncludePricingPlan +``` + +Get application insights resource with pricing plan information + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsightsApiKey.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsightsApiKey.md new file mode 100644 index 000000000000..4878c84e6bf2 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsightsApiKey.md @@ -0,0 +1,14 @@ +### Example 1: Get Api Keys for an application insights resource +```powershell +PS C:\> Get-AzApplicationInsightsApiKey -ResourceGroupName "testGroup" -Name "test" +``` + +Get Api Keys for an application insights resource + +### Example 2: Get specific API key for an application insights resource +```powershell +PS C:\> Get-AzApplicationInsightsApiKey -ResourceGroupName "testGroup" -Name "test" -ApiKeyId 7c4c61dc-b392-4aa4-992f-ee92b84e5dee +``` + +Get specific API key for an application insights resource + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsightsContinuousExport.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsightsContinuousExport.md new file mode 100644 index 000000000000..2101ba989a75 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsightsContinuousExport.md @@ -0,0 +1,14 @@ +### Example 1: Get continuous export for an application insights resource +```powershell +PS C:\> Get-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" +``` + +Get continuous export for an application insights resource + +### Example 2: Get continuous export for an application insights resource +```powershell +PS C:\> Get-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" -ExportId "ZJrfffySPdtG3ESn3iRxVIEFuNY=" +``` + +Get continuous export for an application insights resource + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsightsLinkedStorageAccount.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsightsLinkedStorageAccount.md new file mode 100644 index 000000000000..164d9fd30638 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Get-AzApplicationInsightsLinkedStorageAccount.md @@ -0,0 +1,7 @@ +### Example 1: Get linked storage account associated with component "componentName" +```powershell +PS C:\> Get-AzApplicationInsightsLinkedStorageAccount -ResourceGroupName "rgName" -ComponentName "componentName" +``` + +Get linked storage account associated with component "componentName" + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsights.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsights.md new file mode 100644 index 000000000000..a505e203984c --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsights.md @@ -0,0 +1,6 @@ +### Example 1: Create a new application insights resource +```powershell +PS C:\> New-AzApplicationInsights -Kind java -ResourceGroupName testgroup -Name test1027 -location eastus +``` + +Add a new application insights resource named as "test" in resource group "testgroup" with kind "java" \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsightsApiKey.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsightsApiKey.md new file mode 100644 index 000000000000..9c7cceab6ced --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsightsApiKey.md @@ -0,0 +1,10 @@ +### Example 1: Create a new Api Key for an application insights resource +```powershell +PS C:\> $apiKeyDescription = "testapiKey" +PS C:\> $permissions = @("ReadTelemetry", "WriteAnnotations") +PS C:\> New-AzApplicationInsightsApiKey -ResourceGroupName "testGroup" -Name "test" -Description $apiKeyDescription -Permissions $permissions + +``` + +Create a new Api Key for an application insights resource + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsightsContinuousExport.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsightsContinuousExport.md new file mode 100644 index 000000000000..590d24149cdc --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsightsContinuousExport.md @@ -0,0 +1,10 @@ +### Example 1: Create a new continuous export configuration for an application insights resource +```powershell +PS C:\> $sastoken = New-AzStorageContainerSASToken -Name testcontainer -Context $context -ExpiryTime (Get-Date).AddYears(50) -Permission w +PS C:\> $sasuri = "https://teststorageaccount.blob.core.windows.net/testcontainer" + $sastoken +PS C:\> New-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" ` +-DocumentType "Request","Trace", "Custom Event" -StorageAccountId "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba96/resourceGroups/testgroup/providers/Microsoft.Storage/storageAccounts/teststorageaccount" -StorageLocation sourcecentralus ` +-StorageSASUri $sasuri +``` + +Create a new application insights continuous export configuration to export "Request" and "Trace" document types to storage contain "testcontainer" in storage account "teststorageaccount" in resource group "testgroup". The SAS token have to be valid and have write permission to the container, otherwise continuous export feature won't work.If SAS token expired, the continuous export feature will stop working. \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsightsLinkedStorageAccount.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsightsLinkedStorageAccount.md new file mode 100644 index 000000000000..eaf73ae2dc04 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/New-AzApplicationInsightsLinkedStorageAccount.md @@ -0,0 +1,8 @@ +### Example 1: Create an application insights linked storage account +```powershell +PS C:\> $account = Get-AzStorageAccount -ResourceGroupName "rgName" -Name "accountName" +PS C:\> Get-AzApplicationInsights -ResourceGroupName "rgName" -Name "componentName" | New-AzApplicationInsightsLinkedStorageAccount -LinkedStorageAccountResourceId $account.Id +``` + +Create linked storage account $account under component "componentName" + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsights.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsights.md new file mode 100644 index 000000000000..bd80729d6870 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsights.md @@ -0,0 +1,6 @@ +### Example 1: Remove an application insights resource +```powershell +PS C:\> Remove-AzApplicationInsights -ResourceGroupName "testgroup" -Name "test" -PassThru +``` + +Remove an application insights resource named "test" in resource group "testgroup" \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsightsApiKey.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsightsApiKey.md new file mode 100644 index 000000000000..ed9fd620dd3d --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsightsApiKey.md @@ -0,0 +1,6 @@ +### Example 1: Remove an application insights api key for an application insights resource +```powershell +PS C:\> Remove-AzApplicationInsightsApiKey -ResourceGroupName "testGroup" -Name "test" -ApiKeyId dd173f38-4fd1-4c75-8af5-99c29aa0f867 -PassThru +``` + +Remove an application insights api key for an application insights resource \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsightsContinuousExport.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsightsContinuousExport.md new file mode 100644 index 000000000000..f5ad5d5a28af --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsightsContinuousExport.md @@ -0,0 +1,7 @@ +### Example 1: Remove a continuous export configuration in an application insights resource +```powershell +PS C:\> Remove-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" -ExportId "uGOoki0jQsyEs3IdQ83Q4QsNr4=" -PassThru +``` + +Remove a continuous export configuration in an application insights resource + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsightsLinkedStorageAccount.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsightsLinkedStorageAccount.md new file mode 100644 index 000000000000..6e5f89b55e26 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Remove-AzApplicationInsightsLinkedStorageAccount.md @@ -0,0 +1,6 @@ +### Example 1: Delete linked storage account associated with application insights component "componentName" +```powershell +PS C:\> Get-AzApplicationInsights -ResourceGroupName "rgName" -Name "componentName" | Remove-AzApplicationInsightsLinkedStorageAccount +``` + +Delete linked storage account associated with application insights component "componentName" \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsContinuousExport.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsContinuousExport.md new file mode 100644 index 000000000000..dcf4af0148de --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsContinuousExport.md @@ -0,0 +1,10 @@ +### Example 1: Update continuous export configuration +```powershell +PS C:\> $sastoken = New-AzStorageContainerSASToken -Name testcontainer -Context $context -ExpiryTime (Get-Date).AddYears(50) -Permission w +PS C:\> $sasuri = "https://teststorageaccount.blob.core.windows.net/testcontainer" + $sastoken +PS C:\> Set-AzApplicationInsightsContinuousExport -ResourceGroupName "testgroup" -Name "test" +-DocumentType "Request","Trace" -ExportId "jlTFEiBg1rkDXOCIeJQ2mB2TxZg=" -StorageAccountId "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba96/resourceGroups/testgroup/providers/Microsoft.Storage/storageAccounts/teststorageaccount" -StorageLocation sourcecentralus +-StorageSASUri $sasuri +``` + +Update continuous export configuration "jlTFEiBg1rkDXOCIeJQ2mB2TxZg=" of resource "test" in resource group "testgroup" to export "Request" and "Trace" documents to storage container "testcontainer" in "teststorageaccount".The SAS token have to be valid and have write permission to the container, otherwise continuous export feature won't work. If SAS token expired, the continuous export feature will stop working. diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsDailyCap.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsDailyCap.md new file mode 100644 index 000000000000..0d94786f62cc --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsDailyCap.md @@ -0,0 +1,7 @@ +### Example 1: Set daily data volume cap for an application insights resource +```powershell +PS C:\> Set-AzApplicationInsightsDailyCap -ResourceGroupName "testgroup" -Name "test" -DailyCapGB 400 -DisableNotificationWhenHitCap +``` + +Set the daily data volume cap to 400GB per day and stop send notification when hit cap for resource "test" in resource group "testgroup" + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsPricingPlan.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsPricingPlan.md new file mode 100644 index 000000000000..7bb01d51b0c6 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsPricingPlan.md @@ -0,0 +1,6 @@ +### Example 1: Set pricing plan and daily data volume information for an application insights resource +```powershell +PS C:\> Set-AzApplicationInsightsPricingPlan -ResourceGroupName "testgroup" -Name "test" -PricingPlan "Basic" -DailyCapGB 400 +``` + +Set the pricing plan to "Basic", set the daily data volume cap to 400GB per day and stop send notification when hit cap for resource "test" in resource group "testgroup" \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsWebTest.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsWebTest.md new file mode 100644 index 000000000000..093355d11d50 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Set-AzApplicationInsightsWebTest.md @@ -0,0 +1,18 @@ +### Example 1: {{ Add title here }} +```powershell +PS C:\> {{ Add code here }} + +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +PS C:\> {{ Add code here }} + +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Update-AzApplicationInsights.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Update-AzApplicationInsights.md new file mode 100644 index 000000000000..8d391407b78b --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Update-AzApplicationInsights.md @@ -0,0 +1,7 @@ +### Example 1: Update application insights component +```powershell +PS C:\> Update-AzApplicationInsights -ResourceGroupName "rgName" -Name "aiName" -PublicNetworkAccessForIngestion "Disabled" -PublicNetworkAccessForQuery "Disabled" +``` + +update application insights component "aiName" PublicNetworkAccessForIngestion/PublicNetworkAccessForQuery both to "Disabled" + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Update-AzApplicationInsightsLinkedStorageAccount.md b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Update-AzApplicationInsightsLinkedStorageAccount.md new file mode 100644 index 000000000000..c444438b6a93 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/examples/Update-AzApplicationInsightsLinkedStorageAccount.md @@ -0,0 +1,8 @@ +### Example 1: Update linked storage account +```powershell +PS C:\> $account = Get-AzStorageAccount -ResourceGroupName "rgName" -Name "accountName" +PS C:\> Get-AzApplicationInsights -ResourceGroupName "rgName" -Name "componentName" | Update-AzApplicationInsightsLinkedStorageAccount -LinkedStorageAccountResourceId $account.Id +``` + +Update linked storage account under component "componentName" to associate with $account + diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/ApplicationInsightsComponent.Recording.json b/src/ApplicationInsights/ApplicationInsights.Autorest/test/ApplicationInsightsComponent.Recording.json new file mode 100644 index 000000000000..7ce8a074e437 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/ApplicationInsightsComponent.Recording.json @@ -0,0 +1,167 @@ +{ + "ApplicationInsightsComponent+[NoContext]+Component+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq?api-version=2020-02-02+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq?api-version=2020-02-02", + "Content": "{\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"Application_Type\": \"web\"\r\n },\r\n \"kind\": \"web\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "103" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "e58c425e-26ba-4b7f-b246-86a9b6dcdf07" ], + "X-Content-Type-Options": [ "nosniff" ], + "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], + "Access-Control-Expose-Headers": [ "Request-Context" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-correlation-request-id": [ "1eafce60-cc49-46e1-b0a3-a681ca528dd8" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163226Z:1eafce60-cc49-46e1-b0a3-a681ca528dd8" ], + "Date": [ "Sun, 10 Apr 2022 16:32:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1018" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq\",\"name\":\"componentch2rdq\",\"type\":\"microsoft.insights/components\",\"location\":\"westus2\",\"tags\":{},\"kind\":\"web\",\"etag\":\"\\\"00002cd6-0000-0600-0000-625306980000\\\"\",\"properties\":{\"Ver\":\"v2\",\"ApplicationId\":\"componentch2rdq\",\"AppId\":\"e1fb8925-bfc5-46e1-922e-dafbe149867d\",\"Application_Type\":\"web\",\"Flow_Type\":null,\"Request_Source\":null,\"InstrumentationKey\":\"886ec39a-432e-4c84-96f1-1db7b5cab397\",\"ConnectionString\":\"InstrumentationKey=886ec39a-432e-4c84-96f1-1db7b5cab397;IngestionEndpoint=https://westus2-1.in.applicationinsights.azure.com/\",\"Name\":\"componentch2rdq\",\"CreationDate\":\"2022-04-10T16:32:24.5543649+00:00\",\"TenantId\":\"9e223dbe-3399-4e19-88eb-0975f02ac87f\",\"provisioningState\":\"Succeeded\",\"SamplingPercentage\":null,\"RetentionInDays\":90,\"IngestionMode\":\"ApplicationInsights\",\"publicNetworkAccessForIngestion\":\"Enabled\",\"publicNetworkAccessForQuery\":\"Enabled\"}}", + "isContentBase64": false + } + }, + "ApplicationInsightsComponent+[NoContext]+Component+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq?api-version=2020-02-02+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq?api-version=2020-02-02", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "e2277b3a-e745-41ba-8e31-1226b9d2c4c7" ], + "CommandName": [ "." ], + "FullCommandName": [ "Get-AzApplicationInsights_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "e2277b3a-e745-41ba-8e31-1226b9d2c4c7" ], + "X-Content-Type-Options": [ "nosniff" ], + "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], + "Access-Control-Expose-Headers": [ "Request-Context" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "bcbdd2ba-70a7-4f52-b121-bb32cdf2d72c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163227Z:bcbdd2ba-70a7-4f52-b121-bb32cdf2d72c" ], + "Date": [ "Sun, 10 Apr 2022 16:32:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1018" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq\",\"name\":\"componentch2rdq\",\"type\":\"microsoft.insights/components\",\"location\":\"westus2\",\"tags\":{},\"kind\":\"web\",\"etag\":\"\\\"00002cd6-0000-0600-0000-625306980000\\\"\",\"properties\":{\"Ver\":\"v2\",\"ApplicationId\":\"componentch2rdq\",\"AppId\":\"e1fb8925-bfc5-46e1-922e-dafbe149867d\",\"Application_Type\":\"web\",\"Flow_Type\":null,\"Request_Source\":null,\"InstrumentationKey\":\"886ec39a-432e-4c84-96f1-1db7b5cab397\",\"ConnectionString\":\"InstrumentationKey=886ec39a-432e-4c84-96f1-1db7b5cab397;IngestionEndpoint=https://westus2-1.in.applicationinsights.azure.com/\",\"Name\":\"componentch2rdq\",\"CreationDate\":\"2022-04-10T16:32:24.5543649+00:00\",\"TenantId\":\"9e223dbe-3399-4e19-88eb-0975f02ac87f\",\"provisioningState\":\"Succeeded\",\"SamplingPercentage\":null,\"RetentionInDays\":90,\"IngestionMode\":\"ApplicationInsights\",\"publicNetworkAccessForIngestion\":\"Enabled\",\"publicNetworkAccessForQuery\":\"Enabled\"}}", + "isContentBase64": false + } + }, + "ApplicationInsightsComponent+[NoContext]+Component+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq?api-version=2020-02-02+3": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq?api-version=2020-02-02", + "Content": "{\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"key\": \"val\"\r\n },\r\n \"properties\": {\r\n \"Application_Type\": \"web\",\r\n \"RetentionInDays\": 90,\r\n \"publicNetworkAccessForIngestion\": \"Disabled\",\r\n \"publicNetworkAccessForQuery\": \"Disabled\",\r\n \"IngestionMode\": \"ApplicationInsights\"\r\n },\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"00002cd6-0000-0600-0000-625306980000\\\"\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "368" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "e653d1a8-3dbc-4bec-983d-9670efcdafce" ], + "X-Content-Type-Options": [ "nosniff" ], + "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], + "Access-Control-Expose-Headers": [ "Request-Context" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "x-ms-correlation-request-id": [ "a274718c-3f1b-421e-bf44-0b631016eb48" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163233Z:a274718c-3f1b-421e-bf44-0b631016eb48" ], + "Date": [ "Sun, 10 Apr 2022 16:32:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1050" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq\",\"name\":\"componentch2rdq\",\"type\":\"microsoft.insights/components\",\"location\":\"westus2\",\"tags\":{\"key\":\"val\"},\"kind\":\"web\",\"etag\":\"\\\"00002ed6-0000-0600-0000-6253069e0000\\\"\",\"properties\":{\"Ver\":\"v2\",\"ApplicationId\":\"componentch2rdq\",\"AppId\":\"e1fb8925-bfc5-46e1-922e-dafbe149867d\",\"Application_Type\":\"web\",\"Flow_Type\":null,\"Request_Source\":null,\"InstrumentationKey\":\"886ec39a-432e-4c84-96f1-1db7b5cab397\",\"ConnectionString\":\"InstrumentationKey=886ec39a-432e-4c84-96f1-1db7b5cab397;IngestionEndpoint=https://westus2-1.in.applicationinsights.azure.com/\",\"Name\":\"componentch2rdq\",\"CreationDate\":\"2022-04-10T16:32:24.5543649+00:00\",\"TenantId\":\"9e223dbe-3399-4e19-88eb-0975f02ac87f\",\"provisioningState\":\"Succeeded\",\"SamplingPercentage\":null,\"RetentionInDays\":90,\"Retention\":\"P90D\",\"IngestionMode\":\"ApplicationInsights\",\"publicNetworkAccessForIngestion\":\"Disabled\",\"publicNetworkAccessForQuery\":\"Disabled\"}}", + "isContentBase64": false + } + }, + "ApplicationInsightsComponent+[NoContext]+Component+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq?api-version=2020-02-02+4": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/componentch2rdq?api-version=2020-02-02", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "15b27916-24a6-420e-88cd-c36dcfb7f104" ], + "CommandName": [ "Remove-AzApplicationInsights" ], + "FullCommandName": [ "Remove-AzApplicationInsights_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "15b27916-24a6-420e-88cd-c36dcfb7f104" ], + "X-Content-Type-Options": [ "nosniff" ], + "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], + "Access-Control-Expose-Headers": [ "Request-Context" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "869d3b84-351d-437b-8f71-f457e844a7b5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163241Z:869d3b84-351d-437b-8f71-f457e844a7b5" ], + "Date": [ "Sun, 10 Apr 2022 16:32:40 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/ApplicationInsightsComponent.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/ApplicationInsightsComponent.Tests.ps1 new file mode 100644 index 000000000000..52f8281577a4 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/ApplicationInsightsComponent.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'ApplicationInsightsComponent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'ApplicationInsightsComponent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'ApplicationInsightsComponent' { + It 'Component' { + $kind = "web"; + $key = "key" + $val = "val" + $tag = @{$key=$val} + + New-AzApplicationInsights -ResourceGroupName $env.resourceGroup -Name $env.component1 -Location $env.location -Kind $kind + $component = Get-AzApplicationInsights -ResourceGroupName $env.resourceGroup -Name $env.component1 + + $component.Name | Should -Be $env.component1 + $component.Kind | Should -Be $kind + $component.InstrumentationKey | Should -Not -BeNullOrEmpty + "Enabled" | Should -Be $component.PublicNetworkAccessForIngestion + "Enabled" | Should -Be $component.PublicNetworkAccessForQuery + + $component = Update-AzApplicationInsights -ResourceGroupName $env.resourceGroup -Name $env.component1 -Tag $tag -PublicNetworkAccessForIngestion "Disabled" -PublicNetworkAccessForQuery "Disabled" + + "Disabled" | Should -Be $component.PublicNetworkAccessForIngestion + "Disabled" | Should -Be $component.PublicNetworkAccessForQuery + $val | Should -Be $component.Tag[$key] + + Remove-AzApplicationInsights -ResourceGroupName $env.resourceGroup -Name $env.component1 + } +} \ No newline at end of file diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsights.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsights.Tests.ps1 new file mode 100644 index 000000000000..369513a5821e --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsights.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzApplicationInsights')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzApplicationInsights.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzApplicationInsights' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ListByResourceGroupName' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ListBySubscription' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetByResourceId' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetByInputObject' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsApiKey.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsApiKey.Tests.ps1 new file mode 100644 index 000000000000..ecefd8da3542 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsApiKey.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzApplicationInsightsApiKey')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzApplicationInsightsApiKey.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzApplicationInsightsApiKey' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsContinuousExport.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsContinuousExport.Tests.ps1 new file mode 100644 index 000000000000..f159be3d3efd --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsContinuousExport.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzApplicationInsightsContinuousExport')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzApplicationInsightsContinuousExport.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzApplicationInsightsContinuousExport' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 new file mode 100644 index 000000000000..01e65699ad4c --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzApplicationInsightsLinkedStorageAccount')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzApplicationInsightsLinkedStorageAccount.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzApplicationInsightsLinkedStorageAccount' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsWebTest.Recording.json b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsWebTest.Recording.json index 189a78f02dc4..8c9d9e756fab 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsWebTest.Recording.json +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Get-AzApplicationInsightsWebTest.Recording.json @@ -6,12 +6,12 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "97351404-ffa8-4c2b-8505-98909da787ad" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "a2f6a59f-1f56-4003-a2ca-bf66037655e2" ], "CommandName": [ "Get-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Get-AzApplicationInsightsWebTest_List1" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-original-request-ids": [ "97351404-ffa8-4c2b-8505-98909da787ad", "97351404-ffa8-4c2b-8505-98909da787ad" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], - "x-ms-request-id": [ "4f4d49ef-8109-4875-aefb-67453b783baa" ], - "x-ms-correlation-request-id": [ "4f4d49ef-8109-4875-aefb-67453b783baa" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084316Z:4f4d49ef-8109-4875-aefb-67453b783baa" ], + "x-ms-original-request-ids": [ "a2f6a59f-1f56-4003-a2ca-bf66037655e2", "a2f6a59f-1f56-4003-a2ca-bf66037655e2" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "c7f519a5-f833-4cd4-9fe4-274e60e7a5a2" ], + "x-ms-correlation-request-id": [ "c7f519a5-f833-4cd4-9fe4-274e60e7a5a2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163245Z:c7f519a5-f833-4cd4-9fe4-274e60e7a5a2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 10 Nov 2021 08:43:16 GMT" ] + "Date": [ "Sun, 10 Apr 2022 16:32:44 GMT" ] }, "ContentHeaders": { "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ], - "Content-Length": [ "17322" ] + "Content-Length": [ "1157" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/webtests/pingwebtest-01-appinsights-portal01\",\"name\":\"pingwebtest-01-appinsights-portal01\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/components/appinsights-portal01\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00008e31-0000-0600-0000-6188c4a50000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"pingwebtest-01-appinsights-portal01\",\"Name\":\"pingwebtest-01\",\"Description\":\"\",\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"ping\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"us-ca-sjc-azr\"},{\"Id\":\"apac-sg-sin-azr\"},{\"Id\":\"us-il-ch1-azr\"},{\"Id\":\"emea-ch-zrh-edge\"},{\"Id\":\"latam-br-gru-edge\"}],\"Configuration\":{\"WebTest\":\"\u003cWebTest Name=\\\"pingwebtest-01\\\" Id=\\\"b7df66e3-931f-4651-9040-58f2329a74bd\\\" Enabled=\\\"True\\\" CssProjectStructure=\\\"\\\" CssIteration=\\\"\\\" Timeout=\\\"120\\\" WorkItemIds=\\\"\\\" xmlns=\\\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\\\" Description=\\\"\\\" CredentialUserName=\\\"\\\" CredentialPassword=\\\"\\\" PreAuthenticate=\\\"True\\\" Proxy=\\\"default\\\" StopOnError=\\\"False\\\" RecordedResultFile=\\\"\\\" ResultsLocale=\\\"\\\"\u003e \u003cItems\u003e \u003cRequest Method=\\\"GET\\\" Guid=\\\"adce4cc5-9d88-a536-1dec-d98cfde8f16a\\\" Version=\\\"1.1\\\" Url=\\\"https://google.com\\\" ThinkTime=\\\"0\\\" Timeout=\\\"120\\\" ParseDependentRequests=\\\"False\\\" FollowRedirects=\\\"True\\\" RecordResult=\\\"True\\\" Cache=\\\"False\\\" ResponseTimeGoal=\\\"0\\\" Encoding=\\\"utf-8\\\" ExpectedHttpStatusCode=\\\"200\\\" ExpectedResponseUrl=\\\"\\\" ReportingName=\\\"\\\" IgnoreHttpStatusCode=\\\"False\\\" /\u003e \u003c/Items\u003e \u003c/WebTest\u003e\"},\"Request\":null,\"ValidationRules\":null,\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/webtests/pingwebtest-02-appinsights-portal01\",\"name\":\"pingwebtest-02-appinsights-portal01\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/components/appinsights-portal01\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00009631-0000-0600-0000-6188c5150000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"pingwebtest-02-appinsights-portal01\",\"Name\":\"pingwebtest-02\",\"Description\":\"\",\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"ping\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"us-tx-sn1-azr\"},{\"Id\":\"emea-ch-zrh-edge\"},{\"Id\":\"apac-hk-hkn-azr\"},{\"Id\":\"us-fl-mia-edge\"},{\"Id\":\"latam-br-gru-edge\"}],\"Configuration\":{\"WebTest\":\"\u003cWebTest Name=\\\"pingwebtest-02\\\" Id=\\\"97e6fc4f-05f2-4ada-bb78-0a440c5f26e3\\\" Enabled=\\\"True\\\" CssProjectStructure=\\\"\\\" CssIteration=\\\"\\\" Timeout=\\\"120\\\" WorkItemIds=\\\"\\\" xmlns=\\\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\\\" Description=\\\"\\\" CredentialUserName=\\\"\\\" CredentialPassword=\\\"\\\" PreAuthenticate=\\\"True\\\" Proxy=\\\"default\\\" StopOnError=\\\"False\\\" RecordedResultFile=\\\"\\\" ResultsLocale=\\\"\\\"\u003e \u003cItems\u003e \u003cRequest Method=\\\"GET\\\" Guid=\\\"a32bd645-4e33-7278-cee8-bc467c941777\\\" Version=\\\"1.1\\\" Url=\\\"https://google.com\\\" ThinkTime=\\\"0\\\" Timeout=\\\"120\\\" ParseDependentRequests=\\\"False\\\" FollowRedirects=\\\"True\\\" RecordResult=\\\"True\\\" Cache=\\\"False\\\" ResponseTimeGoal=\\\"0\\\" Encoding=\\\"utf-8\\\" ExpectedHttpStatusCode=\\\"200\\\" ExpectedResponseUrl=\\\"\\\" ReportingName=\\\"\\\" IgnoreHttpStatusCode=\\\"False\\\" /\u003e \u003c/Items\u003e \u003c/WebTest\u003e\"},\"Request\":null,\"ValidationRules\":null,\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/webtests/pingwentest-03-appinsights-portal01\",\"name\":\"pingwentest-03-appinsights-portal01\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/components/appinsights-portal01\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00006866-0000-0600-0000-618a168e0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"pingwentest-03-appinsights-portal01\",\"Name\":\"pingwentest-03\",\"Description\":\"\",\"Enabled\":true,\"Frequency\":600,\"Timeout\":120,\"Kind\":\"ping\",\"RetryEnabled\":false,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"},{\"Id\":\"apac-sg-sin-azr\"},{\"Id\":\"us-tx-sn1-azr\"},{\"Id\":\"latam-br-gru-edge\"}],\"Configuration\":{\"WebTest\":\"\u003cWebTest Name=\\\"pingwentest-03\\\" Id=\\\"6fd919c8-cc65-4fe1-9b86-6bbc344db0cf\\\" Enabled=\\\"True\\\" CssProjectStructure=\\\"\\\" CssIteration=\\\"\\\" Timeout=\\\"120\\\" WorkItemIds=\\\"\\\" xmlns=\\\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\\\" Description=\\\"\\\" CredentialUserName=\\\"\\\" CredentialPassword=\\\"\\\" PreAuthenticate=\\\"True\\\" Proxy=\\\"default\\\" StopOnError=\\\"False\\\" RecordedResultFile=\\\"\\\" ResultsLocale=\\\"\\\"\u003e \u003cItems\u003e \u003cRequest Method=\\\"GET\\\" Guid=\\\"a23e79cb-a52d-2d1f-1cd2-427ea47148ab\\\" Version=\\\"1.1\\\" Url=\\\"https://www.bing.com\\\" ThinkTime=\\\"0\\\" Timeout=\\\"120\\\" ParseDependentRequests=\\\"True\\\" FollowRedirects=\\\"True\\\" RecordResult=\\\"True\\\" Cache=\\\"False\\\" ResponseTimeGoal=\\\"0\\\" Encoding=\\\"utf-8\\\" ExpectedHttpStatusCode=\\\"200\\\" ExpectedResponseUrl=\\\"\\\" ReportingName=\\\"\\\" IgnoreHttpStatusCode=\\\"False\\\" /\u003e \u003c/Items\u003e \u003c/WebTest\u003e\"},\"Request\":null,\"ValidationRules\":null,\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/webtests/pingwebtest-04-appinsights-portal01\",\"name\":\"pingwebtest-04-appinsights-portal01\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/components/appinsights-portal01\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000bc66-0000-0600-0000-618a19b70000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"pingwebtest-04-appinsights-portal01\",\"Name\":\"pingwebtest-04\",\"Description\":\"\",\"Enabled\":true,\"Frequency\":300,\"Timeout\":90,\"Kind\":\"ping\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"us-tx-sn1-azr\"},{\"Id\":\"us-il-ch1-azr\"},{\"Id\":\"emea-gb-db3-azr\"},{\"Id\":\"apac-jp-kaw-edge\"},{\"Id\":\"latam-br-gru-edge\"}],\"Configuration\":{\"WebTest\":\"\u003cWebTest Name=\\\"pingwebtest-04\\\" Id=\\\"b12f0219-1c00-4c96-b830-9543fcdb187f\\\" Enabled=\\\"True\\\" CssProjectStructure=\\\"\\\" CssIteration=\\\"\\\" Timeout=\\\"90\\\" WorkItemIds=\\\"\\\" xmlns=\\\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\\\" Description=\\\"\\\" CredentialUserName=\\\"\\\" CredentialPassword=\\\"\\\" PreAuthenticate=\\\"True\\\" Proxy=\\\"default\\\" StopOnError=\\\"False\\\" RecordedResultFile=\\\"\\\" ResultsLocale=\\\"\\\"\u003e \u003cItems\u003e \u003cRequest Method=\\\"GET\\\" Guid=\\\"a2a5d61b-bac0-f48d-a650-bad59e505d74\\\" Version=\\\"1.1\\\" Url=\\\"https://google.com\\\" ThinkTime=\\\"0\\\" Timeout=\\\"90\\\" ParseDependentRequests=\\\"True\\\" FollowRedirects=\\\"True\\\" RecordResult=\\\"True\\\" Cache=\\\"False\\\" ResponseTimeGoal=\\\"0\\\" Encoding=\\\"utf-8\\\" ExpectedHttpStatusCode=\\\"300\\\" ExpectedResponseUrl=\\\"\\\" ReportingName=\\\"\\\" IgnoreHttpStatusCode=\\\"False\\\" /\u003e \u003c/Items\u003e \u003cValidationRules\u003e \u003cValidationRule Classname=\\\"Microsoft.VisualStudio.TestTools.WebTesting.Rules.ValidationRuleFindText, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\\\" DisplayName=\\\"Find Text\\\" Description=\\\"Verifies the existence of the specified text in the response.\\\" Level=\\\"High\\\" ExectuionOrder=\\\"BeforeDependents\\\"\u003e \u003cRuleParameters\u003e \u003cRuleParameter Name=\\\"FindText\\\" Value=\\\"\\\" /\u003e \u003cRuleParameter Name=\\\"IgnoreCase\\\" Value=\\\"False\\\" /\u003e \u003cRuleParameter Name=\\\"UseRegularExpression\\\" Value=\\\"False\\\" /\u003e \u003cRuleParameter Name=\\\"PassIfTextFound\\\" Value=\\\"True\\\" /\u003e \u003c/RuleParameters\u003e \u003c/ValidationRule\u003e \u003c/ValidationRules\u003e \u003c/WebTest\u003e\"},\"Request\":null,\"ValidationRules\":null,\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/webtests/pingwebtest-pwsh01\",\"name\":\"pingwebtest-pwsh01\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/components/appinsights-portal01\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002169-0000-0600-0000-618a29d50000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"pingwebtest-pwsh01\",\"Name\":\"pingwentest-pwsh01testname\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":90,\"Kind\":\"ping\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"},{\"Id\":\"emea-ru-msa-edge\"},{\"Id\":\"emea-se-sto-edge\"}],\"Configuration\":{\"WebTest\":\"\u003cWebTest Name=\\\"basic-portal03\\\" Id=\\\"9407db10-5d84-487f-98a3-a1ee67bb98f0\\\" Enabled=\\\"True\\\" CssProjectStructure=\\\"\\\" CssIteration=\\\"\\\" Timeout=\\\"90\\\" WorkItemIds=\\\"\\\" xmlns=\\\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\\\" Description=\\\"\\\" CredentialUserName=\\\"\\\" CredentialPassword=\\\"\\\" PreAuthenticate=\\\"True\\\" Proxy=\\\"default\\\" StopOnError=\\\"False\\\" RecordedResultFile=\\\"\\\" ResultsLocale=\\\"\\\"\u003e \\n \u003cItems\u003e \\n \u003cRequest Method=\\\"GET\\\" Guid=\\\"a2025e53-0702-d03e-f311-5774ec16893d\\\" Version=\\\"1.1\\\" Url=\\\"https://www.bing.com\\\" ThinkTime=\\\"0\\\" Timeout=\\\"90\\\" ParseDependentRequests=\\\"True\\\" FollowRedirects=\\\"True\\\" RecordResult=\\\"True\\\" Cache=\\\"False\\\" ResponseTimeGoal=\\\"0\\\" Encoding=\\\"utf-8\\\" ExpectedHttpStatusCode=\\\"200\\\" ExpectedResponseUrl=\\\"\\\" ReportingName=\\\"\\\" IgnoreHttpStatusCode=\\\"False\\\" /\u003e \\n \u003c/Items\u003e \\n \u003cValidationRules\u003e \\n \u003cValidationRule Classname=\\\"Microsoft.VisualStudio.TestTools.WebTesting.Rules.ValidationRuleFindText, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\\\" DisplayName=\\\"Find Text\\\" Description=\\\"Verifies the existence of the specified text in the response.\\\" Level=\\\"High\\\" ExectuionOrder=\\\"BeforeDependents\\\"\u003e\\n \u003cRuleParameters\u003e \\n \u003cRuleParameter Name=\\\"FindText\\\" Value=\\\"test\u0026#x20;content\u0026#x20;match\\\" /\u003e \\n \u003cRuleParameter Name=\\\"IgnoreCase\\\" Value=\\\"False\\\" /\u003e \\n \u003cRuleParameter Name=\\\"UseRegularExpression\\\" Value=\\\"False\\\" /\u003e \\n \u003cRuleParameter Name=\\\"PassIfTextFound\\\" Value=\\\"True\\\" /\u003e \\n \u003c/RuleParameters\u003e \\n \u003c/ValidationRule\u003e \\n \u003c/ValidationRules\u003e \\n\u003c/WebTest\u003e\"},\"Request\":null,\"ValidationRules\":null,\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/webtests/standard-pwsh01\",\"name\":\"standard-pwsh01\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-rg-test/providers/microsoft.insights/components/appinsights-portal01\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000c198-0000-0600-0000-618b6b350000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standard-pwsh01\",\"Name\":\"standard-pwsh01\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"},{\"Id\":\"emea-ru-msa-edge\"},{\"Id\":\"emea-se-sto-edge\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://www.bing.com\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-ukn3r4-test/providers/microsoft.insights/webtests/standardwebtest-urfzk4-pwsh\",\"name\":\"standardwebtest-urfzk4-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-ukn3r4-test/providers/microsoft.insights/components/appInsights-egnha6-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00006a9b-0000-0600-0000-618b79160000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-urfzk4-pwsh\",\"Name\":\"standardwebtest-urfzk4-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-9tk4sr-test/providers/microsoft.insights/webtests/standardwebtest-hxa0fj-pwsh\",\"name\":\"standardwebtest-hxa0fj-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-9tk4sr-test/providers/microsoft.insights/components/appInsights-j9u3bt-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000cb9c-0000-0600-0000-618b7f500000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-hxa0fj-pwsh\",\"Name\":\"standardwebtest-hxa0fj-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-6y08w1-test/providers/microsoft.insights/webtests/standardwebtest-81qzh7-pwsh\",\"name\":\"standardwebtest-81qzh7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-6y08w1-test/providers/microsoft.insights/components/appInsights-41bxrq-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000619d-0000-0600-0000-618b81de0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-81qzh7-pwsh\",\"Name\":\"standardwebtest-81qzh7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000bf9d-0000-0600-0000-618b844d0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002bd6-0000-0600-0000-625306920000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}]}", "isContentBase64": false } }, - "Get-AzApplicationInsightsWebTest+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview+1": { + "Get-AzApplicationInsightsWebTest+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "5b990b0d-4eb0-4454-b332-d6748c3450fd" ], + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "a315b162-1d78-4c39-b307-a55edc8f29be" ], "CommandName": [ "Get-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Get-AzApplicationInsightsWebTest_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -63,40 +63,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5b990b0d-4eb0-4454-b332-d6748c3450fd" ], + "x-ms-request-id": [ "a315b162-1d78-4c39-b307-a55edc8f29be" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], - "x-ms-correlation-request-id": [ "38f84c4a-0157-463f-ab66-99c2887150a5" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084318Z:38f84c4a-0157-463f-ab66-99c2887150a5" ], - "Date": [ "Wed, 10 Nov 2021 08:43:18 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "b10c26ae-e5b6-49e8-a419-0400b19eaa31" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163246Z:b10c26ae-e5b6-49e8-a419-0400b19eaa31" ], + "Date": [ "Sun, 10 Apr 2022 16:32:45 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1145" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000bf9d-0000-0600-0000-618b844d0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002bd6-0000-0600-0000-625306920000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "Get-AzApplicationInsightsWebTest+[NoContext]+List2+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview+1": { + "Get-AzApplicationInsightsWebTest+[NoContext]+List2+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "dc064a8a-54ba-4ccd-8f70-6b747f9a5e60" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "6b171ddf-0b74-44ce-bbb0-eb9ea484666c" ], "CommandName": [ "Get-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Get-AzApplicationInsightsWebTest_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -107,37 +107,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-original-request-ids": [ "dc064a8a-54ba-4ccd-8f70-6b747f9a5e60", "dc064a8a-54ba-4ccd-8f70-6b747f9a5e60" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], - "x-ms-request-id": [ "270b9588-f156-42b3-aa1f-8ca1ad1d76d3" ], - "x-ms-correlation-request-id": [ "270b9588-f156-42b3-aa1f-8ca1ad1d76d3" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084319Z:270b9588-f156-42b3-aa1f-8ca1ad1d76d3" ], + "x-ms-original-request-ids": [ "6b171ddf-0b74-44ce-bbb0-eb9ea484666c", "6b171ddf-0b74-44ce-bbb0-eb9ea484666c" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "0d7ad0b6-fc03-4d44-8dc3-a416fa00580e" ], + "x-ms-correlation-request-id": [ "0d7ad0b6-fc03-4d44-8dc3-a416fa00580e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163247Z:0d7ad0b6-fc03-4d44-8dc3-a416fa00580e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 10 Nov 2021 08:43:19 GMT" ] + "Date": [ "Sun, 10 Apr 2022 16:32:46 GMT" ] }, "ContentHeaders": { "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ], "Content-Length": [ "1157" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000bf9d-0000-0600-0000-618b844d0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002bd6-0000-0600-0000-625306920000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}]}", "isContentBase64": false } }, - "Get-AzApplicationInsightsWebTest+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh/webtests?api-version=2018-05-01-preview+1": { + "Get-AzApplicationInsightsWebTest+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh/webtests?api-version=2018-05-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh/webtests?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh/webtests?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "7315df82-9d78-4b6b-b733-8eedd2b398fb" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "82498c87-9b7b-4b63-a6ef-288e319ba0c2" ], "CommandName": [ "Get-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Get-AzApplicationInsightsWebTest_List2" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -148,40 +148,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7315df82-9d78-4b6b-b733-8eedd2b398fb" ], + "x-ms-request-id": [ "82498c87-9b7b-4b63-a6ef-288e319ba0c2" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], - "x-ms-correlation-request-id": [ "5bac9876-6b0d-43bd-98f2-4dd0cc078a90" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084321Z:5bac9876-6b0d-43bd-98f2-4dd0cc078a90" ], - "Date": [ "Wed, 10 Nov 2021 08:43:20 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "c73cd497-4fce-42c0-8975-553ddce65caf" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163248Z:c73cd497-4fce-42c0-8975-553ddce65caf" ], + "Date": [ "Sun, 10 Apr 2022 16:32:48 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1173" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000bf9d-0000-0600-0000-618b844d0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}],\"nextLink\":null}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002bd6-0000-0600-0000-625306920000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}],\"nextLink\":null}", "isContentBase64": false } }, - "Get-AzApplicationInsightsWebTest+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview+1": { + "Get-AzApplicationInsightsWebTest+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "88e927fd-7d49-4494-b6ff-a44d1cebec3e" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "2a88d1d4-f01b-4ed4-a428-627117d41a97" ], "CommandName": [ "Get-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Get-AzApplicationInsightsWebTest_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -192,40 +192,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "88e927fd-7d49-4494-b6ff-a44d1cebec3e" ], + "x-ms-request-id": [ "2a88d1d4-f01b-4ed4-a428-627117d41a97" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], - "x-ms-correlation-request-id": [ "8f91e824-d593-4254-98e7-be199140bc9a" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084322Z:8f91e824-d593-4254-98e7-be199140bc9a" ], - "Date": [ "Wed, 10 Nov 2021 08:43:21 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "b2d6891d-6b75-4131-adbb-1cd2d8ae41ff" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163250Z:b2d6891d-6b75-4131-adbb-1cd2d8ae41ff" ], + "Date": [ "Sun, 10 Apr 2022 16:32:49 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1145" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000bf9d-0000-0600-0000-618b844d0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002bd6-0000-0600-0000-625306920000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "Get-AzApplicationInsightsWebTest+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview+2": { + "Get-AzApplicationInsightsWebTest+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "5af401d1-e1c7-420c-8791-2a392194ad7c" ], + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "548321ff-09e9-4eca-be3d-3a9c4f82516b" ], "CommandName": [ "Get-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Get-AzApplicationInsightsWebTest_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -236,24 +236,24 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5af401d1-e1c7-420c-8791-2a392194ad7c" ], + "x-ms-request-id": [ "548321ff-09e9-4eca-be3d-3a9c4f82516b" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], - "x-ms-correlation-request-id": [ "6209b248-833d-48c2-9f37-8ac87ce43130" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084323Z:6209b248-833d-48c2-9f37-8ac87ce43130" ], - "Date": [ "Wed, 10 Nov 2021 08:43:22 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-correlation-request-id": [ "2fb162dc-8c49-48a1-a8c7-7b8c340adfcd" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163251Z:2fb162dc-8c49-48a1-a8c7-7b8c340adfcd" ], + "Date": [ "Sun, 10 Apr 2022 16:32:50 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1145" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000bf9d-0000-0600-0000-618b844d0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002bd6-0000-0600-0000-625306920000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } } diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsights.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsights.Tests.ps1 new file mode 100644 index 000000000000..440f274de3c4 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsights.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzApplicationInsights')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzApplicationInsights.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzApplicationInsights' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsApiKey.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsApiKey.Tests.ps1 new file mode 100644 index 000000000000..e98046198fde --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsApiKey.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzApplicationInsightsApiKey')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzApplicationInsightsApiKey.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzApplicationInsightsApiKey' { + It 'ComponentNameParameterSet' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsContinuousExport.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsContinuousExport.Tests.ps1 new file mode 100644 index 000000000000..2ff465aac479 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsContinuousExport.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzApplicationInsightsContinuousExport')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzApplicationInsightsContinuousExport.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzApplicationInsightsContinuousExport' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 new file mode 100644 index 000000000000..5df20e5b97d6 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzApplicationInsightsLinkedStorageAccount')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzApplicationInsightsLinkedStorageAccount.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzApplicationInsightsLinkedStorageAccount' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsWebTest.Recording.json b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsWebTest.Recording.json index 483e06b52f4a..d69e78f5244d 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsWebTest.Recording.json +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/New-AzApplicationInsightsWebTest.Recording.json @@ -1,9 +1,9 @@ { - "New-AzApplicationInsightsWebTest+[NoContext]+CreateStandard+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-xyhebs-pwsh?api-version=2018-05-01-preview+1": { + "New-AzApplicationInsightsWebTest+[NoContext]+CreateStandard+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o758j9-pwsh?api-version=2018-05-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-xyhebs-pwsh?api-version=2018-05-01-preview", - "Content": "{\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\": \"Resource\"\r\n },\r\n \"properties\": {\r\n \"Request\": {\r\n \"RequestUrl\": \"https://docs.microsoft.com/\",\r\n \"HttpVerb\": \"GET\"\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200\r\n },\r\n \"Name\": \"standardwebtest-xyhebs-pwsh\",\r\n \"Enabled\": true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 120,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": true,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"emea-nl-ams-azr\"\r\n },\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ]\r\n }\r\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o758j9-pwsh?api-version=2018-05-01-preview", + "Content": "{\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\": \"Resource\"\r\n },\r\n \"properties\": {\r\n \"Request\": {\r\n \"RequestUrl\": \"https://docs.microsoft.com/\",\r\n \"HttpVerb\": \"GET\"\r\n },\r\n \"ValidationRules\": {\r\n \"ExpectedHttpStatusCode\": 200\r\n },\r\n \"Name\": \"standardwebtest-o758j9-pwsh\",\r\n \"Enabled\": true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 120,\r\n \"Kind\": \"standard\",\r\n \"RetryEnabled\": true,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"emea-nl-ams-azr\"\r\n },\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -17,40 +17,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "394e5004-dd70-4082-9cc2-3d5163782b5b" ], + "x-ms-request-id": [ "2f2aefe0-6512-479d-a114-be94abe561f5" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], - "x-ms-correlation-request-id": [ "a352aed4-1e1e-4358-9522-95d106cd8e68" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084344Z:a352aed4-1e1e-4358-9522-95d106cd8e68" ], - "Date": [ "Wed, 10 Nov 2021 08:43:44 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "x-ms-correlation-request-id": [ "9e50e457-7657-401a-bbd2-8086ac8b19c1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163258Z:9e50e457-7657-401a-bbd2-8086ac8b19c1" ], + "Date": [ "Sun, 10 Apr 2022 16:32:57 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1145" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-xyhebs-pwsh\",\"name\":\"standardwebtest-xyhebs-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00003c9e-0000-0600-0000-618b863e0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-xyhebs-pwsh\",\"Name\":\"standardwebtest-xyhebs-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o758j9-pwsh\",\"name\":\"standardwebtest-o758j9-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002fd6-0000-0600-0000-625306b80000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o758j9-pwsh\",\"Name\":\"standardwebtest-o758j9-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "New-AzApplicationInsightsWebTest+[NoContext]+CreateStandard+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-xyhebs-pwsh?api-version=2018-05-01-preview+2": { + "New-AzApplicationInsightsWebTest+[NoContext]+CreateStandard+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o758j9-pwsh?api-version=2018-05-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-xyhebs-pwsh?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o758j9-pwsh?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "b554073d-5937-495d-87cc-79bf3e3ff265" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "ff5dbab4-cdc4-40cb-a708-1cafbffe30dc" ], "CommandName": [ "Remove-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Remove-AzApplicationInsightsWebTest_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -61,17 +61,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b554073d-5937-495d-87cc-79bf3e3ff265" ], + "x-ms-request-id": [ "ff5dbab4-cdc4-40cb-a708-1cafbffe30dc" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], - "x-ms-correlation-request-id": [ "e4894fcd-7368-48a3-8c1e-edc097389807" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084349Z:e4894fcd-7368-48a3-8c1e-edc097389807" ], - "Date": [ "Wed, 10 Nov 2021 08:43:48 GMT" ] + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-correlation-request-id": [ "03e77bdc-7953-4a74-a2d4-077123ab1803" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163302Z:03e77bdc-7953-4a74-a2d4-077123ab1803" ], + "Date": [ "Sun, 10 Apr 2022 16:33:01 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -81,19 +81,19 @@ "isContentBase64": false } }, - "New-AzApplicationInsightsWebTest+[NoContext]+CreateStandard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview+3": { + "New-AzApplicationInsightsWebTest+[NoContext]+CreateStandard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "f2d2ace3-e3e5-4e7f-bb72-6d0b72036863" ], + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "81f843d5-6434-4456-ba91-472c763396ae" ], "CommandName": [ "Get-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Get-AzApplicationInsightsWebTest_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -104,29 +104,29 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-original-request-ids": [ "f2d2ace3-e3e5-4e7f-bb72-6d0b72036863", "f2d2ace3-e3e5-4e7f-bb72-6d0b72036863" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], - "x-ms-request-id": [ "32788ea6-5c0a-412d-9a65-1195d4b45237" ], - "x-ms-correlation-request-id": [ "32788ea6-5c0a-412d-9a65-1195d4b45237" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084351Z:32788ea6-5c0a-412d-9a65-1195d4b45237" ], + "x-ms-original-request-ids": [ "81f843d5-6434-4456-ba91-472c763396ae", "81f843d5-6434-4456-ba91-472c763396ae" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-request-id": [ "37bf59a1-7b35-4ec9-b052-1d6f99ed9c6a" ], + "x-ms-correlation-request-id": [ "37bf59a1-7b35-4ec9-b052-1d6f99ed9c6a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163303Z:37bf59a1-7b35-4ec9-b052-1d6f99ed9c6a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 10 Nov 2021 08:43:51 GMT" ] + "Date": [ "Sun, 10 Apr 2022 16:33:02 GMT" ] }, "ContentHeaders": { "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ], "Content-Length": [ "1157" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000bf9d-0000-0600-0000-618b844d0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002bd6-0000-0600-0000-625306920000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}]}", "isContentBase64": false } }, - "New-AzApplicationInsightsWebTest+[NoContext]+CreatePing+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/basicwebtest-sytr2v-pwsh?api-version=2018-05-01-preview+1": { + "New-AzApplicationInsightsWebTest+[NoContext]+CreatePing+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/basicwebtest-rsxd0n-pwsh?api-version=2018-05-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/basicwebtest-sytr2v-pwsh?api-version=2018-05-01-preview", - "Content": "{\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\": \"Resource\"\r\n },\r\n \"properties\": {\r\n \"Configuration\": {\r\n \"WebTest\": \"\\u003cWebTest Name=\\\"basicwebtest-sytr2v-pwsh\\\" Id=\\\"5bcf922d-392c-4882-99e5-71ee6e85648c\\\" Enabled=\\\"True\\\" CssProjectStructure=\\\"\\\" CssIteration=\\\"\\\" Timeout=\\\"120\\\" WorkItemIds=\\\"\\\" xmlns=\\\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\\\" Description=\\\"\\\" CredentialUserName=\\\"\\\" CredentialPassword=\\\"\\\" PreAuthenticate=\\\"True\\\" Proxy=\\\"default\\\" StopOnError=\\\"False\\\" RecordedResultFile=\\\"\\\" ResultsLocale=\\\"\\\"\\u003e \\r\\n \\u003cItems\\u003e \\r\\n \\u003cRequest Method=\\\"Get\\\" Guid=\\\"0e2a2b9d-787d-49b5-9a34-d65a8f067a4f\\\" Version=\\\"1.1\\\" Url=\\\"https://docs.microsoft.com/\\\" ThinkTime=\\\"0\\\" Timeout=\\\"120\\\" ParseDependentRequests=\\\"\\\" FollowRedirects=\\\"True\\\" RecordResult=\\\"True\\\" Cache=\\\"False\\\" ResponseTimeGoal=\\\"0\\\" Encoding=\\\"utf-8\\\" ExpectedHttpStatusCode=\\\"200\\\" ExpectedResponseUrl=\\\"\\\" ReportingName=\\\"\\\" IgnoreHttpStatusCode=\\\"False\\\" /\\u003e \\r\\n \\u003c/Items\\u003e\\r\\n \\r\\n \\u003c/WebTest\\u003e\"\r\n },\r\n \"Name\": \"basicwebtest-sytr2v-pwsh\",\r\n \"Enabled\": true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 120,\r\n \"Kind\": \"ping\",\r\n \"RetryEnabled\": true,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"emea-nl-ams-azr\"\r\n },\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ]\r\n }\r\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/basicwebtest-rsxd0n-pwsh?api-version=2018-05-01-preview", + "Content": "{\r\n \"location\": \"westus2\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\": \"Resource\"\r\n },\r\n \"properties\": {\r\n \"Configuration\": {\r\n \"WebTest\": \"\\u003cWebTest Name=\\\"basicwebtest-rsxd0n-pwsh\\\" Id=\\\"9be984b6-15bf-4e4a-8e37-d6daf48fb5b1\\\" Enabled=\\\"True\\\" CssProjectStructure=\\\"\\\" CssIteration=\\\"\\\" Timeout=\\\"120\\\" WorkItemIds=\\\"\\\" xmlns=\\\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\\\" Description=\\\"\\\" CredentialUserName=\\\"\\\" CredentialPassword=\\\"\\\" PreAuthenticate=\\\"True\\\" Proxy=\\\"default\\\" StopOnError=\\\"False\\\" RecordedResultFile=\\\"\\\" ResultsLocale=\\\"\\\"\\u003e \\r\\n \\u003cItems\\u003e \\r\\n \\u003cRequest Method=\\\"Get\\\" Guid=\\\"61c6eeeb-4035-42d4-9344-f8788817c472\\\" Version=\\\"1.1\\\" Url=\\\"https://docs.microsoft.com/\\\" ThinkTime=\\\"0\\\" Timeout=\\\"120\\\" ParseDependentRequests=\\\"\\\" FollowRedirects=\\\"True\\\" RecordResult=\\\"True\\\" Cache=\\\"False\\\" ResponseTimeGoal=\\\"0\\\" Encoding=\\\"utf-8\\\" ExpectedHttpStatusCode=\\\"200\\\" ExpectedResponseUrl=\\\"\\\" ReportingName=\\\"\\\" IgnoreHttpStatusCode=\\\"False\\\" /\\u003e \\r\\n \\u003c/Items\\u003e\\r\\n \\r\\n \\u003c/WebTest\\u003e\"\r\n },\r\n \"Name\": \"basicwebtest-rsxd0n-pwsh\",\r\n \"Enabled\": true,\r\n \"Frequency\": 300,\r\n \"Timeout\": 120,\r\n \"Kind\": \"ping\",\r\n \"RetryEnabled\": true,\r\n \"Locations\": [\r\n {\r\n \"Id\": \"emea-nl-ams-azr\"\r\n },\r\n {\r\n \"Id\": \"us-ca-sjc-azr\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -140,40 +140,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7f69cd39-46b4-4003-b235-2d8207a14f27" ], + "x-ms-request-id": [ "459de05b-21b2-4023-9c4b-65c2e86b7abb" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], - "x-ms-correlation-request-id": [ "e082e9d0-5861-4868-9d50-e9c41b26d260" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084358Z:e082e9d0-5861-4868-9d50-e9c41b26d260" ], - "Date": [ "Wed, 10 Nov 2021 08:43:57 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "x-ms-correlation-request-id": [ "93259cff-626a-47d1-9c26-7bef6c99cc68" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163308Z:93259cff-626a-47d1-9c26-7bef6c99cc68" ], + "Date": [ "Sun, 10 Apr 2022 16:33:07 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2016" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/basicwebtest-sytr2v-pwsh\",\"name\":\"basicwebtest-sytr2v-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00003d9e-0000-0600-0000-618b864c0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"basicwebtest-sytr2v-pwsh\",\"Name\":\"basicwebtest-sytr2v-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"ping\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":{\"WebTest\":\"\u003cWebTest Name=\\\"basicwebtest-sytr2v-pwsh\\\" Id=\\\"5bcf922d-392c-4882-99e5-71ee6e85648c\\\" Enabled=\\\"True\\\" CssProjectStructure=\\\"\\\" CssIteration=\\\"\\\" Timeout=\\\"120\\\" WorkItemIds=\\\"\\\" xmlns=\\\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\\\" Description=\\\"\\\" CredentialUserName=\\\"\\\" CredentialPassword=\\\"\\\" PreAuthenticate=\\\"True\\\" Proxy=\\\"default\\\" StopOnError=\\\"False\\\" RecordedResultFile=\\\"\\\" ResultsLocale=\\\"\\\"\u003e \\r\\n \u003cItems\u003e \\r\\n \u003cRequest Method=\\\"Get\\\" Guid=\\\"0e2a2b9d-787d-49b5-9a34-d65a8f067a4f\\\" Version=\\\"1.1\\\" Url=\\\"https://docs.microsoft.com/\\\" ThinkTime=\\\"0\\\" Timeout=\\\"120\\\" ParseDependentRequests=\\\"\\\" FollowRedirects=\\\"True\\\" RecordResult=\\\"True\\\" Cache=\\\"False\\\" ResponseTimeGoal=\\\"0\\\" Encoding=\\\"utf-8\\\" ExpectedHttpStatusCode=\\\"200\\\" ExpectedResponseUrl=\\\"\\\" ReportingName=\\\"\\\" IgnoreHttpStatusCode=\\\"False\\\" /\u003e \\r\\n \u003c/Items\u003e\\r\\n \\r\\n \u003c/WebTest\u003e\"},\"Request\":null,\"ValidationRules\":null,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/basicwebtest-rsxd0n-pwsh\",\"name\":\"basicwebtest-rsxd0n-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"000030d6-0000-0600-0000-625306c20000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"basicwebtest-rsxd0n-pwsh\",\"Name\":\"basicwebtest-rsxd0n-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"ping\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":{\"WebTest\":\"\u003cWebTest Name=\\\"basicwebtest-rsxd0n-pwsh\\\" Id=\\\"9be984b6-15bf-4e4a-8e37-d6daf48fb5b1\\\" Enabled=\\\"True\\\" CssProjectStructure=\\\"\\\" CssIteration=\\\"\\\" Timeout=\\\"120\\\" WorkItemIds=\\\"\\\" xmlns=\\\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\\\" Description=\\\"\\\" CredentialUserName=\\\"\\\" CredentialPassword=\\\"\\\" PreAuthenticate=\\\"True\\\" Proxy=\\\"default\\\" StopOnError=\\\"False\\\" RecordedResultFile=\\\"\\\" ResultsLocale=\\\"\\\"\u003e \\r\\n \u003cItems\u003e \\r\\n \u003cRequest Method=\\\"Get\\\" Guid=\\\"61c6eeeb-4035-42d4-9344-f8788817c472\\\" Version=\\\"1.1\\\" Url=\\\"https://docs.microsoft.com/\\\" ThinkTime=\\\"0\\\" Timeout=\\\"120\\\" ParseDependentRequests=\\\"\\\" FollowRedirects=\\\"True\\\" RecordResult=\\\"True\\\" Cache=\\\"False\\\" ResponseTimeGoal=\\\"0\\\" Encoding=\\\"utf-8\\\" ExpectedHttpStatusCode=\\\"200\\\" ExpectedResponseUrl=\\\"\\\" ReportingName=\\\"\\\" IgnoreHttpStatusCode=\\\"False\\\" /\u003e \\r\\n \u003c/Items\u003e\\r\\n \\r\\n \u003c/WebTest\u003e\"},\"Request\":null,\"ValidationRules\":null,\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "New-AzApplicationInsightsWebTest+[NoContext]+CreatePing+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/basicwebtest-sytr2v-pwsh?api-version=2018-05-01-preview+2": { + "New-AzApplicationInsightsWebTest+[NoContext]+CreatePing+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/basicwebtest-rsxd0n-pwsh?api-version=2018-05-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/basicwebtest-sytr2v-pwsh?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/basicwebtest-rsxd0n-pwsh?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "be153380-d611-4072-ac7f-59957d30071c" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "37d3378b-9160-4486-b974-16180c15e1e7" ], "CommandName": [ "Remove-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Remove-AzApplicationInsightsWebTest_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -184,17 +184,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "be153380-d611-4072-ac7f-59957d30071c" ], + "x-ms-request-id": [ "37d3378b-9160-4486-b974-16180c15e1e7" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14996" ], - "x-ms-correlation-request-id": [ "05de4490-6495-44ed-9bd4-31952288332a" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084401Z:05de4490-6495-44ed-9bd4-31952288332a" ], - "Date": [ "Wed, 10 Nov 2021 08:44:00 GMT" ] + "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], + "x-ms-correlation-request-id": [ "ab080e6d-cdd6-4539-aa08-fab2a6eb52a1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163312Z:ab080e6d-cdd6-4539-aa08-fab2a6eb52a1" ], + "Date": [ "Sun, 10 Apr 2022 16:33:11 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -204,19 +204,19 @@ "isContentBase64": false } }, - "New-AzApplicationInsightsWebTest+[NoContext]+CreatePing+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview+3": { + "New-AzApplicationInsightsWebTest+[NoContext]+CreatePing+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "ff31e8ee-7e83-4d7f-ba19-10072b578204" ], + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "35161ef9-8b80-4b57-ab42-ad58901b92e4" ], "CommandName": [ "Get-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Get-AzApplicationInsightsWebTest_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -227,21 +227,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-original-request-ids": [ "ff31e8ee-7e83-4d7f-ba19-10072b578204", "ff31e8ee-7e83-4d7f-ba19-10072b578204" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], - "x-ms-request-id": [ "0ed90dea-4420-486b-941f-f286d512c26e" ], - "x-ms-correlation-request-id": [ "0ed90dea-4420-486b-941f-f286d512c26e" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084402Z:0ed90dea-4420-486b-941f-f286d512c26e" ], + "x-ms-original-request-ids": [ "35161ef9-8b80-4b57-ab42-ad58901b92e4", "35161ef9-8b80-4b57-ab42-ad58901b92e4" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-request-id": [ "70eecb8e-4336-4332-9651-e2fd28431fda" ], + "x-ms-correlation-request-id": [ "70eecb8e-4336-4332-9651-e2fd28431fda" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163313Z:70eecb8e-4336-4332-9651-e2fd28431fda" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 10 Nov 2021 08:44:01 GMT" ] + "Date": [ "Sun, 10 Apr 2022 16:33:12 GMT" ] }, "ContentHeaders": { "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ], "Content-Length": [ "1157" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"0000bf9d-0000-0600-0000-618b844d0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00002bd6-0000-0600-0000-625306920000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}]}", "isContentBase64": false } } diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsights.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsights.Tests.ps1 new file mode 100644 index 000000000000..81c53571b525 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsights.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzApplicationInsights')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzApplicationInsights.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzApplicationInsights' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsightsApiKey.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsightsApiKey.Tests.ps1 new file mode 100644 index 000000000000..e7874f19312d --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsightsApiKey.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzApplicationInsightsApiKey')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzApplicationInsightsApiKey.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzApplicationInsightsApiKey' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsightsContinuousExport.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsightsContinuousExport.Tests.ps1 new file mode 100644 index 000000000000..bb02cb1d6e4e --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsightsContinuousExport.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzApplicationInsightsContinuousExport')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzApplicationInsightsContinuousExport.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzApplicationInsightsContinuousExport' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 new file mode 100644 index 000000000000..6e808dcfd5b9 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Remove-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzApplicationInsightsLinkedStorageAccount')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzApplicationInsightsLinkedStorageAccount.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzApplicationInsightsLinkedStorageAccount' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsights.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsights.Tests.ps1 new file mode 100644 index 000000000000..d607bc58a71d --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsights.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzApplicationInsights')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzApplicationInsights.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzApplicationInsights' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsContinuousExport.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsContinuousExport.Tests.ps1 new file mode 100644 index 000000000000..3f9aa2118c30 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsContinuousExport.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzApplicationInsightsContinuousExport')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzApplicationInsightsContinuousExport.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzApplicationInsightsContinuousExport' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsDailyCap.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsDailyCap.Tests.ps1 new file mode 100644 index 000000000000..efb149ef8043 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsDailyCap.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzApplicationInsightsDailyCap')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzApplicationInsightsDailyCap.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzApplicationInsightsDailyCap' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsPricingPlan.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsPricingPlan.Tests.ps1 new file mode 100644 index 000000000000..d9329463e447 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsPricingPlan.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzApplicationInsightsPricingPlan')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzApplicationInsightsPricingPlan.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzApplicationInsightsPricingPlan' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsWebTest.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsWebTest.Tests.ps1 new file mode 100644 index 000000000000..110fa8750898 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Set-AzApplicationInsightsWebTest.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzApplicationInsightsWebTest')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzApplicationInsightsWebTest.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzApplicationInsightsWebTest' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsights.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsights.Tests.ps1 new file mode 100644 index 000000000000..01ce0f3c88c0 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsights.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzApplicationInsights')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzApplicationInsights.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzApplicationInsights' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 new file mode 100644 index 000000000000..4c1613dcc049 --- /dev/null +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsightsLinkedStorageAccount.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzApplicationInsightsLinkedStorageAccount')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzApplicationInsightsLinkedStorageAccount.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzApplicationInsightsLinkedStorageAccount' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsightsWebTestTag.Recording.json b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsightsWebTestTag.Recording.json index 59f86efe4e01..8c04ba26cd1f 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsightsWebTestTag.Recording.json +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/Update-AzApplicationInsightsWebTestTag.Recording.json @@ -1,9 +1,9 @@ { - "Update-AzApplicationInsightsWebTestTag+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview+1": { + "Update-AzApplicationInsightsWebTestTag+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview+1": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview", - "Content": "{\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-zid72t-pwsh\": \"Resource\"\r\n }\r\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview", + "Content": "{\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-muxba7-pwsh\": \"Resource\"\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -17,40 +17,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "dc0d5ed7-7794-4c62-b41e-41b35cb35369" ], + "x-ms-request-id": [ "7c518a11-4096-4c48-8fea-52112c0b7d57" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "daacda5a-cb1a-478f-8947-fba073c797ef" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084537Z:daacda5a-cb1a-478f-8947-fba073c797ef" ], - "Date": [ "Wed, 10 Nov 2021 08:45:36 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], + "x-ms-correlation-request-id": [ "c31a025a-171b-4cb2-867f-d1bb20721c64" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163320Z:c31a025a-171b-4cb2-867f-d1bb20721c64" ], + "Date": [ "Sun, 10 Apr 2022 16:33:19 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1145" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-zid72t-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00004d9e-0000-0600-0000-618b86ad0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-muxba7-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"000031d6-0000-0600-0000-625306cf0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "Update-AzApplicationInsightsWebTestTag+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview+1": { + "Update-AzApplicationInsightsWebTestTag+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "ca8ecdc5-6a05-48a8-b196-7e42c4369396" ], + "x-ms-unique-id": [ "23" ], + "x-ms-client-request-id": [ "b925f186-6c04-40a5-83ec-bb350826267c" ], "CommandName": [ "Get-AzApplicationInsightsWebTest" ], "FullCommandName": [ "Get-AzApplicationInsightsWebTest_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "Az.ApplicationInsights/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -61,32 +61,32 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ca8ecdc5-6a05-48a8-b196-7e42c4369396" ], + "x-ms-request-id": [ "b925f186-6c04-40a5-83ec-bb350826267c" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "36c03e64-e538-47af-a146-8c85fc38eb63" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084539Z:36c03e64-e538-47af-a146-8c85fc38eb63" ], - "Date": [ "Wed, 10 Nov 2021 08:45:38 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "x-ms-correlation-request-id": [ "9e16410d-544d-4aec-a4d3-37b5755cb4a5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163321Z:9e16410d-544d-4aec-a4d3-37b5755cb4a5" ], + "Date": [ "Sun, 10 Apr 2022 16:33:20 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1145" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-zid72t-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00004d9e-0000-0600-0000-618b86ad0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-muxba7-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"000031d6-0000-0600-0000-625306cf0000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "Update-AzApplicationInsightsWebTestTag+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview+2": { + "Update-AzApplicationInsightsWebTestTag+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh?api-version=2018-05-01-preview", - "Content": "{\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\": \"Resource\"\r\n }\r\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh?api-version=2018-05-01-preview", + "Content": "{\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\": \"Resource\"\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -100,24 +100,24 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "88703081-1667-4af3-8b2c-798f57dc88bb" ], + "x-ms-request-id": [ "3c8854a8-9360-43c8-9209-29cdf7f3287a" ], "X-Content-Type-Options": [ "nosniff" ], "Request-Context": [ "appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525" ], "Access-Control-Expose-Headers": [ "Request-Context" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "5e9a56d8-3a70-43d1-b47d-6979832dfe11" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211110T084544Z:5e9a56d8-3a70-43d1-b47d-6979832dfe11" ], - "Date": [ "Wed, 10 Nov 2021 08:45:44 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], + "x-ms-correlation-request-id": [ "83446534-031e-4c29-ba30-720afcb57233" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220410T163325Z:83446534-031e-4c29-ba30-720afcb57233" ], + "Date": [ "Sun, 10 Apr 2022 16:33:25 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1145" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/webtests/standardwebtest-f62wc7-pwsh\",\"name\":\"standardwebtest-f62wc7-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"00004f9e-0000-0600-0000-618b86b60000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-f62wc7-pwsh\",\"Name\":\"standardwebtest-f62wc7-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/webtests/standardwebtest-o9jkli-pwsh\",\"name\":\"standardwebtest-o9jkli-pwsh\",\"type\":\"microsoft.insights/webtests\",\"location\":\"westus2\",\"tags\":{\"hidden-link:/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh\":\"Resource\"},\"kind\":null,\"etag\":\"\\\"000032d6-0000-0600-0000-625306d40000\\\"\",\"properties\":{\"SyntheticMonitorId\":\"standardwebtest-o9jkli-pwsh\",\"Name\":\"standardwebtest-o9jkli-pwsh\",\"Description\":null,\"Enabled\":true,\"Frequency\":300,\"Timeout\":120,\"Kind\":\"standard\",\"RetryEnabled\":true,\"Locations\":[{\"Id\":\"emea-nl-ams-azr\"},{\"Id\":\"us-ca-sjc-azr\"}],\"Configuration\":null,\"Request\":{\"RequestUrl\":\"https://docs.microsoft.com/\",\"Headers\":null,\"HttpVerb\":\"GET\",\"RequestBody\":null,\"ParseDependentRequests\":null,\"FollowRedirects\":null},\"ValidationRules\":{\"ExpectedHttpStatusCode\":200,\"IgnoreHttpStatusCode\":null,\"ContentValidation\":null,\"SSLCheck\":null,\"SSLCertRemainingLifetimeCheck\":null},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } } diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/env.json b/src/ApplicationInsights/ApplicationInsights.Autorest/test/env.json index b011c30175d6..45a9620499b5 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/test/env.json +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/env.json @@ -1,18 +1,19 @@ { - "geoLocation04": "emea-se-sto-edge", - "standardWebTest01": "standardwebtest-f62wc7-pwsh", - "basicWebTest03": "basicwebtest-sytr2v-pwsh", - "standardWebTest02": "standardwebtest-xyhebs-pwsh", - "geoLocation03": "emea-ru-msa-edge", - "basicWebTest04": "basicwebtest-ufxtcy-pwsh", - "appInsights02Id": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-zid72t-pwsh", - "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", - "location": "westus2", - "appInsights01Id": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-wo60fd-test/providers/microsoft.insights/components/appInsights-e39y2j-pwsh", - "resourceGroup": "appInsights-wo60fd-test", - "appInsights02": "appInsights-zid72t-pwsh", "geoLocation01": "emea-nl-ams-azr", - "geoLocation02": "us-ca-sjc-azr", + "basicWebTest03": "basicwebtest-rsxd0n-pwsh", + "component1": "componentch2rdq", + "appInsights01Id": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-hp740r-pwsh", "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "appInsights01": "appInsights-e39y2j-pwsh" + "basicWebTest04": "basicwebtest-pv52zc-pwsh", + "location": "westus2", + "standardWebTest01": "standardwebtest-o9jkli-pwsh", + "appInsights02Id": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/appInsights-qx65vu-test/providers/microsoft.insights/components/appInsights-muxba7-pwsh", + "standardWebTest02": "standardwebtest-o758j9-pwsh", + "resourceGroup": "appInsights-qx65vu-test", + "geoLocation04": "emea-se-sto-edge", + "appInsights02": "appInsights-muxba7-pwsh", + "geoLocation02": "us-ca-sjc-azr", + "appInsights01": "appInsights-hp740r-pwsh", + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", + "geoLocation03": "emea-ru-msa-edge" } diff --git a/src/ApplicationInsights/ApplicationInsights.Autorest/test/utils.ps1 b/src/ApplicationInsights/ApplicationInsights.Autorest/test/utils.ps1 index 81b4f609606c..dd385db6e602 100644 --- a/src/ApplicationInsights/ApplicationInsights.Autorest/test/utils.ps1 +++ b/src/ApplicationInsights/ApplicationInsights.Autorest/test/utils.ps1 @@ -61,6 +61,9 @@ function setupEnv() { -RuleExpectedHttpStatusCode 200 -Frequency 300 -Enabled -Timeout 120 -Kind 'standard' -RetryEnabled -GeoLocation $geoLocation Write-Host -ForegroundColor Green 'standard web test created successfully.' + #Variables for application insights test + $env.component1 = "component" + (RandomString -allChars $false -len 6) + # For any resources you created for test, you should add it to $env here. $envFile = 'env.json' if ($TestMode -eq 'live') { @@ -71,5 +74,4 @@ function setupEnv() { function cleanupEnv() { # Clean resources you create for testing Remove-AzResourceGroup -Name $env.resourceGroup -} - +} \ No newline at end of file