From 3b4ee6e27f158535a797f533cfb777ca67c65b83 Mon Sep 17 00:00:00 2001 From: Yeming Liu Date: Mon, 18 May 2020 11:17:34 +0800 Subject: [PATCH 01/13] initial generation for resource: solution --- src/MonitoringSolutions/.gitattributes | 1 + src/MonitoringSolutions/.gitignore | 15 + src/MonitoringSolutions/custom/readme.md | 41 +++ .../docs/Az.MonitoringSolutions.md | 26 ++ .../docs/Get-AzMonitorLogAnalyticsSolution.md | 177 +++++++++ .../docs/New-AzMonitorLogAnalyticsSolution.md | 345 ++++++++++++++++++ .../Remove-AzMonitorLogAnalyticsSolution.md | 246 +++++++++++++ .../Update-AzMonitorLogAnalyticsSolution.md | 248 +++++++++++++ src/MonitoringSolutions/docs/readme.md | 11 + .../Get-AzMonitorLogAnalyticsSolution.md | 18 + .../New-AzMonitorLogAnalyticsSolution.md | 18 + .../Remove-AzMonitorLogAnalyticsSolution.md | 18 + .../Update-AzMonitorLogAnalyticsSolution.md | 18 + src/MonitoringSolutions/how-to.md | 58 +++ src/MonitoringSolutions/license.txt | 227 ++++++++++++ src/MonitoringSolutions/readme.md | 73 ++++ src/MonitoringSolutions/resources/readme.md | 11 + ...et-AzMonitorLogAnalyticsSolution.Tests.ps1 | 25 ++ ...ew-AzMonitorLogAnalyticsSolution.Tests.ps1 | 13 + ...ve-AzMonitorLogAnalyticsSolution.Tests.ps1 | 17 + ...te-AzMonitorLogAnalyticsSolution.Tests.ps1 | 17 + src/MonitoringSolutions/test/readme.md | 17 + 22 files changed, 1640 insertions(+) create mode 100644 src/MonitoringSolutions/.gitattributes create mode 100644 src/MonitoringSolutions/.gitignore create mode 100644 src/MonitoringSolutions/custom/readme.md create mode 100644 src/MonitoringSolutions/docs/Az.MonitoringSolutions.md create mode 100644 src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md create mode 100644 src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md create mode 100644 src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md create mode 100644 src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md create mode 100644 src/MonitoringSolutions/docs/readme.md create mode 100644 src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md create mode 100644 src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md create mode 100644 src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md create mode 100644 src/MonitoringSolutions/examples/Update-AzMonitorLogAnalyticsSolution.md create mode 100644 src/MonitoringSolutions/how-to.md create mode 100644 src/MonitoringSolutions/license.txt create mode 100644 src/MonitoringSolutions/readme.md create mode 100644 src/MonitoringSolutions/resources/readme.md create mode 100644 src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Tests.ps1 create mode 100644 src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 create mode 100644 src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Tests.ps1 create mode 100644 src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Tests.ps1 create mode 100644 src/MonitoringSolutions/test/readme.md diff --git a/src/MonitoringSolutions/.gitattributes b/src/MonitoringSolutions/.gitattributes new file mode 100644 index 000000000000..2125666142eb --- /dev/null +++ b/src/MonitoringSolutions/.gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/src/MonitoringSolutions/.gitignore b/src/MonitoringSolutions/.gitignore new file mode 100644 index 000000000000..1e3822deea3c --- /dev/null +++ b/src/MonitoringSolutions/.gitignore @@ -0,0 +1,15 @@ +bin +obj +.vs +generated +internal +exports +custom/*.psm1 +test/*-TestResults.xml +/*.ps1 +/*.ps1xml +/*.psm1 +/*.snk +/*.csproj +/*.nuspec +/*.psd1 \ No newline at end of file diff --git a/src/MonitoringSolutions/custom/readme.md b/src/MonitoringSolutions/custom/readme.md new file mode 100644 index 000000000000..3db42fe33afb --- /dev/null +++ b/src/MonitoringSolutions/custom/readme.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.MonitoringSolutions` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.MonitoringSolutions.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.MonitoringSolutions` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.MonitoringSolutions.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.MonitoringSolutions.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.MonitoringSolutions`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.MonitoringSolutions`. +- `Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.MonitoringSolutions`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md new file mode 100644 index 000000000000..7c4d47a66d2a --- /dev/null +++ b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md @@ -0,0 +1,26 @@ +--- +Module Name: Az.MonitoringSolutions +Module Guid: efb4c08f-32a3-465c-bcbf-b56669ab80b9 +Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.MonitoringSolutions Module +## Description +Microsoft Azure PowerShell: MonitoringSolutions cmdlets + +## Az.MonitoringSolutions Cmdlets +### [Get-AzMonitorLogAnalyticsSolution](Get-AzMonitorLogAnalyticsSolution.md) +Retrieves the user solution. + +### [New-AzMonitorLogAnalyticsSolution](New-AzMonitorLogAnalyticsSolution.md) +Creates or updates the Solution. + +### [Remove-AzMonitorLogAnalyticsSolution](Remove-AzMonitorLogAnalyticsSolution.md) +Deletes the solution in the subscription. + +### [Update-AzMonitorLogAnalyticsSolution](Update-AzMonitorLogAnalyticsSolution.md) +Patch a Solution. +Only updating tags supported. + diff --git a/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md new file mode 100644 index 000000000000..faa1778a2e25 --- /dev/null +++ b/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md @@ -0,0 +1,177 @@ +--- +external help file: +Module Name: Az.MonitoringSolutions +online version: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions/get-azmonitorloganalyticssolution +schema: 2.0.0 +--- + +# Get-AzMonitorLogAnalyticsSolution + +## SYNOPSIS +Retrieves the user solution. + +## SYNTAX + +### List1 (Default) +``` +Get-AzMonitorLogAnalyticsSolution [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzMonitorLogAnalyticsSolution -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzMonitorLogAnalyticsSolution -InputObject [-DefaultProfile ] + [] +``` + +### List +``` +Get-AzMonitorLogAnalyticsSolution -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Retrieves the user solution. + +## 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 + +### -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 +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.IMonitoringSolutionsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +User Solution Name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SolutionName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +The name of the resource group to get. +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 +Dynamic: False +``` + +### -SubscriptionId +Gets subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: 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.MonitoringSolutions.Models.IMonitoringSolutionsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolution + +## ALIASES + +## 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 + - `[Id ]`: Resource identity path + - `[ManagementAssociationName ]`: User ManagementAssociation Name. + - `[ManagementConfigurationName ]`: User Management Configuration Name. + - `[ProviderName ]`: Provider name for the parent resource. + - `[ResourceGroupName ]`: The name of the resource group to get. The name is case insensitive. + - `[ResourceName ]`: Parent resource name. + - `[ResourceType ]`: Resource type for the parent resource + - `[SolutionName ]`: User Solution Name. + - `[SubscriptionId ]`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +## RELATED LINKS + diff --git a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md new file mode 100644 index 000000000000..3568c7fe8b4f --- /dev/null +++ b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md @@ -0,0 +1,345 @@ +--- +external help file: +Module Name: Az.MonitoringSolutions +online version: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions/new-azmonitorloganalyticssolution +schema: 2.0.0 +--- + +# New-AzMonitorLogAnalyticsSolution + +## SYNOPSIS +Creates or updates the Solution. + +## SYNTAX + +``` +New-AzMonitorLogAnalyticsSolution -Name -ResourceGroupName [-SubscriptionId ] + [-ContainedResource ] [-Location ] [-PlanName ] [-PlanProduct ] + [-PlanPromotionCode ] [-PlanPublisher ] [-ReferencedResource ] [-Tag ] + [-WorkspaceResourceId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Creates or updates the Solution. + +## 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 + +### -AsJob +Run the command as a job + +```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 +Dynamic: False +``` + +### -ContainedResource +The azure resources that will be contained within the solutions. +They will be locked and gets deleted automatically when the solution is deleted. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: 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 +Dynamic: False +``` + +### -Location +Resource location + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +User Solution Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: SolutionName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -NoWait +Run the command asynchronously + +```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 +Dynamic: False +``` + +### -PlanName +name of the solution to be created. +For Microsoft published solution it should be in the format of solutionType(workspaceName). +SolutionType part is case sensitive. +For third party solution, it can be anything. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PlanProduct +name of the solution to enabled/add. +For Microsoft published gallery solution it should be in the format of OMSGallery/\. +This is case sensitive + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PlanPromotionCode +promotionCode, Not really used now, can you left as empty + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PlanPublisher +Publisher name. +For gallery solution, it is Microsoft. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ReferencedResource +The resources that will be referenced from this solution. +Deleting any of those solution out of band will break the solution. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +The name of the resource group to get. +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 +Dynamic: False +``` + +### -SubscriptionId +Gets subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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 +Dynamic: 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 +Dynamic: False +``` + +### -WorkspaceResourceId +The azure resourceId for the workspace where the solution will be deployed/enabled. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: 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 +Dynamic: 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 +Dynamic: 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 + +### System.Boolean + +## ALIASES + +## NOTES + +## RELATED LINKS + diff --git a/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md new file mode 100644 index 000000000000..1996b1ae1d85 --- /dev/null +++ b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md @@ -0,0 +1,246 @@ +--- +external help file: +Module Name: Az.MonitoringSolutions +online version: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions/remove-azmonitorloganalyticssolution +schema: 2.0.0 +--- + +# Remove-AzMonitorLogAnalyticsSolution + +## SYNOPSIS +Deletes the solution in the subscription. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzMonitorLogAnalyticsSolution -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzMonitorLogAnalyticsSolution -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the solution in the subscription. + +## 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 + +### -AsJob +Run the command as a job + +```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 +Dynamic: 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 +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.IMonitoringSolutionsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +User Solution Name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: SolutionName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -NoWait +Run the command asynchronously + +```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 +Dynamic: 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 +Dynamic: False +``` + +### -ResourceGroupName +The name of the resource group to get. +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 +Dynamic: False +``` + +### -SubscriptionId +Gets subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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 +Dynamic: 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 +Dynamic: 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 +Dynamic: 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.MonitoringSolutions.Models.IMonitoringSolutionsIdentity + +## OUTPUTS + +### System.Boolean + +## ALIASES + +## 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 + - `[Id ]`: Resource identity path + - `[ManagementAssociationName ]`: User ManagementAssociation Name. + - `[ManagementConfigurationName ]`: User Management Configuration Name. + - `[ProviderName ]`: Provider name for the parent resource. + - `[ResourceGroupName ]`: The name of the resource group to get. The name is case insensitive. + - `[ResourceName ]`: Parent resource name. + - `[ResourceType ]`: Resource type for the parent resource + - `[SolutionName ]`: User Solution Name. + - `[SubscriptionId ]`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +## RELATED LINKS + diff --git a/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md new file mode 100644 index 000000000000..0bf578c6dcf0 --- /dev/null +++ b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md @@ -0,0 +1,248 @@ +--- +external help file: +Module Name: Az.MonitoringSolutions +online version: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions/update-azmonitorloganalyticssolution +schema: 2.0.0 +--- + +# Update-AzMonitorLogAnalyticsSolution + +## SYNOPSIS +Patch a Solution. +Only updating tags supported. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzMonitorLogAnalyticsSolution -Name -ResourceGroupName [-SubscriptionId ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzMonitorLogAnalyticsSolution -InputObject [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Patch a Solution. +Only updating tags supported. + +## 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 + +### -AsJob +Run the command as a job + +```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 +Dynamic: 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 +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.IMonitoringSolutionsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +User Solution Name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: SolutionName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -NoWait +Run the command asynchronously + +```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 +Dynamic: False +``` + +### -ResourceGroupName +The name of the resource group to get. +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 +Dynamic: False +``` + +### -SubscriptionId +Gets subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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 +Dynamic: 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 +Dynamic: 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 +Dynamic: 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 +Dynamic: 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.MonitoringSolutions.Models.IMonitoringSolutionsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolution + +## ALIASES + +## 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 + - `[Id ]`: Resource identity path + - `[ManagementAssociationName ]`: User ManagementAssociation Name. + - `[ManagementConfigurationName ]`: User Management Configuration Name. + - `[ProviderName ]`: Provider name for the parent resource. + - `[ResourceGroupName ]`: The name of the resource group to get. The name is case insensitive. + - `[ResourceName ]`: Parent resource name. + - `[ResourceType ]`: Resource type for the parent resource + - `[SolutionName ]`: User Solution Name. + - `[SubscriptionId ]`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +## RELATED LINKS + diff --git a/src/MonitoringSolutions/docs/readme.md b/src/MonitoringSolutions/docs/readme.md new file mode 100644 index 000000000000..b4757ec431ee --- /dev/null +++ b/src/MonitoringSolutions/docs/readme.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.MonitoringSolutions` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overriden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.MonitoringSolutions` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md new file mode 100644 index 000000000000..093355d11d50 --- /dev/null +++ b/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.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/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md new file mode 100644 index 000000000000..093355d11d50 --- /dev/null +++ b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.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/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md new file mode 100644 index 000000000000..093355d11d50 --- /dev/null +++ b/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.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/MonitoringSolutions/examples/Update-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/Update-AzMonitorLogAnalyticsSolution.md new file mode 100644 index 000000000000..093355d11d50 --- /dev/null +++ b/src/MonitoringSolutions/examples/Update-AzMonitorLogAnalyticsSolution.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/MonitoringSolutions/how-to.md b/src/MonitoringSolutions/how-to.md new file mode 100644 index 000000000000..f0a23dd30160 --- /dev/null +++ b/src/MonitoringSolutions/how-to.md @@ -0,0 +1,58 @@ +# How-To +This document describes how to develop for `Az.MonitoringSolutions`. + +## Building `Az.MonitoringSolutions` +To build, run the `build-module.ps1` at the root of the module directory. This will generate the proxy script cmdlets that are the cmdlets being exported by this module. After the build completes, the proxy script cmdlets will be output to the `exports` folder. To read more about the proxy script cmdlets, look at the [readme.md](exports/readme.md) in the `exports` folder. + +## Creating custom cmdlets +To add cmdlets that were not generated by the REST specification, use the `custom` folder. This folder allows you to add handwritten `.ps1` and `.cs` files. Currently, we support using `.ps1` scripts as new cmdlets or as additional low-level variants (via `ParameterSet`), and `.cs` files as low-level (variants) cmdlets that the exported script cmdlets call. We do not support exporting any `.cs` (dll) cmdlets directly. To read more about custom cmdlets, look at the [readme.md](custom/readme.md) in the `custom` folder. + +## Generating documentation +To generate documentation, the process is now integrated into the `build-module.ps1` script. If you don't want to run this process as part of `build-module.ps1`, you can provide the `-NoDocs` switch. If you want to run documentation generation after the build process, you may still run the `generate-help.ps1` script. Overall, the process will look at the documentation comments in the generated and custom cmdlets and types, and create `.md` files into the `docs` folder. Additionally, this pulls in any examples from the `examples` folder and adds them to the generated help markdown documents. To read more about examples, look at the [readme.md](examples/readme.md) in the `examples` folder. To read more about documentation, look at the [readme.md](docs/readme.md) in the `docs` folder. + +## Testing `Az.MonitoringSolutions` +To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [readme.md](examples/readme.md) in the `examples` folder. + +## Packing `Az.MonitoringSolutions` +To pack `Az.MonitoringSolutions` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://docs.microsoft.com/en-us/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. + +## Module Script Details +There are multiple scripts created for performing different actions for developing `Az.MonitoringSolutions`. +- `build-module.ps1` + - Builds the module DLL (`./bin/Az.MonitoringSolutions.private.dll`), creates the exported cmdlets and documentation, generates custom cmdlet test stubs and exported cmdlet example stubs, and updates `./Az.MonitoringSolutions.psd1` with Azure profile information. + - **Parameters**: [`Switch` parameters] + - `-Run`: After building, creates an isolated PowerShell session and loads `Az.MonitoringSolutions`. + - `-Test`: After building, runs the `Pester` tests defined in the `test` folder. + - `-Docs`: After building, generates the Markdown documents for the modules into the `docs` folder. + - `-Pack`: After building, packages the module into a `.nupkg`. + - `-Code`: After building, opens a VSCode window with the module's directory and runs (see `-Run`) the module. + - `-Release`: Builds the module in `Release` configuration (as opposed to `Debug` configuration). + - `-NoDocs`: Supresses writing the documentation markdown files as part of the cmdlet exporting process. + - `-Debugger`: Used when attaching the debugger in Visual Studio to the PowerShell session, and running the build process without recompiling the DLL. This suppresses running the script as an isolated process. +- `run-module.ps1` + - Creates an isolated PowerShell session and loads `Az.MonitoringSolutions` into the session. + - Same as `-Run` in `build-module.ps1`. + - **Parameters**: [`Switch` parameters] + - `-Code`: Opens a VSCode window with the module's directory. + - Same as `-Code` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. +- `test-module.ps1` + - Runs the `Pester` tests defined in the `test` folder. + - Same as `-Test` in `build-module.ps1`. +- `pack-module.ps1` + - Packages the module into a `.nupkg` for distribution. + - Same as `-Pack` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. + - This process is now integrated into `build-module.ps1` automatically. To disable, use `-NoDocs` when running `build-module.ps1`. +- `export-surface.ps1` + - Generates Markdown documents for both the cmdlet surface and the model (class) surface of the module. + - These files are placed into the `resources` folder. + - Used for investigating the surface of your module. These are *not* documentation for distribution. +- `check-dependencies.ps1` + - Used in `run-module.ps1` and `test-module.ps1` to verify dependent modules are available to run those tasks. + - It will download local (within the module's directory structure) versions of those modules as needed. + - This script *does not* need to be ran by-hand. \ No newline at end of file diff --git a/src/MonitoringSolutions/license.txt b/src/MonitoringSolutions/license.txt new file mode 100644 index 000000000000..b9f3180fb9af --- /dev/null +++ b/src/MonitoringSolutions/license.txt @@ -0,0 +1,227 @@ +MICROSOFT SOFTWARE LICENSE TERMS + +MICROSOFT AZURE POWERSHELL + +These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. + +BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE. + + +-----------------START OF LICENSE-------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +-------------------END OF LICENSE------------------------------------------ + + +----------------START OF THIRD PARTY NOTICE-------------------------------- + + +The software includes the AutoMapper library ("AutoMapper"). The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software. + +Provided for Informational Purposes Only + +AutoMapper + +The MIT License (MIT) +Copyright (c) 2010 Jimmy Bogard + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + + + + +*************** + +The software includes Newtonsoft.Json. The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software. + +Newtonsoft.Json + +The MIT License (MIT) +Copyright (c) 2007 James Newton-King +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------END OF THIRD PARTY NOTICE---------------------------------------- + diff --git a/src/MonitoringSolutions/readme.md b/src/MonitoringSolutions/readme.md new file mode 100644 index 000000000000..fc7f56587129 --- /dev/null +++ b/src/MonitoringSolutions/readme.md @@ -0,0 +1,73 @@ + +# Az.MonitoringSolutions +This directory contains the PowerShell module for the MonitoringSolutions service. + +--- +## Status +[![Az.MonitoringSolutions](https://img.shields.io/powershellgallery/v/Az.MonitoringSolutions.svg?style=flat-square&label=Az.MonitoringSolutions "Az.MonitoringSolutions")](https://www.powershellgallery.com/packages/Az.MonitoringSolutions/) + +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 1.6.0 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.MonitoringSolutions`, see [how-to.md](how-to.md). + + +## Generation Requirements +Use of the beta version of `autorest.powershell` generator requires the following: +- [NodeJS LTS](https://nodejs.org) (10.15.x LTS preferred) + - **Note**: It *will not work* with Node < 10.x. Using 11.x builds may cause issues as they may introduce instability or breaking changes. +> If you want an easy way to install and update Node, [NVS - Node Version Switcher](../nodejs/installing-via-nvs.md) or [NVM - Node Version Manager](../nodejs/installing-via-nvm.md) is recommended. +- [AutoRest](https://aka.ms/autorest) v3 beta
`npm install -g autorest@autorest`
  +- PowerShell 6.0 or greater + - If you don't have it installed, you can use the cross-platform npm package
`npm install -g pwsh`
  +- .NET Core SDK 2.0 or greater + - If you don't have it installed, you can use the cross-platform npm package
`npm install -g dotnet-sdk-2.2`
  + +## Run Generation +In this directory, run AutoRest: +> `autorest-beta` + +--- +### AutoRest Configuration +> see https://aka.ms/autorest + +``` yaml +require: + - $(this-folder)/../readme.azure.noprofile.md +input-file: + - $(repo)/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json + +module-version: 0.1.0 +title: MonitoringSolutions +subject-prefix: MonitorLogAnalytics + +inlining-threshold: 40 + +directive: + # Remove the unexpanded parameter set + - where: + variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ + remove: true + # Remove the set-* cmdlet + - where: + verb: Set + remove: true + # Hide the cmdlets we don't need for now + - where: + subject: Association$|Configuration$ + hide: true +``` diff --git a/src/MonitoringSolutions/resources/readme.md b/src/MonitoringSolutions/resources/readme.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/src/MonitoringSolutions/resources/readme.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Tests.ps1 b/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Tests.ps1 new file mode 100644 index 000000000000..496d4e060dad --- /dev/null +++ b/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Tests.ps1 @@ -0,0 +1,25 @@ +$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMonitorLogAnalyticsSolution.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-AzMonitorLogAnalyticsSolution' { + It 'List1' { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List' { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 new file mode 100644 index 000000000000..53d0145245ae --- /dev/null +++ b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 @@ -0,0 +1,13 @@ +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzMonitorLogAnalyticsSolution.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-AzMonitorLogAnalyticsSolution' { + It 'CreateExpanded' { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Tests.ps1 b/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Tests.ps1 new file mode 100644 index 000000000000..3810ae71f342 --- /dev/null +++ b/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Tests.ps1 @@ -0,0 +1,17 @@ +$TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzMonitorLogAnalyticsSolution.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-AzMonitorLogAnalyticsSolution' { + It 'Delete' { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Tests.ps1 b/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Tests.ps1 new file mode 100644 index 000000000000..89e1cb5b013c --- /dev/null +++ b/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Tests.ps1 @@ -0,0 +1,17 @@ +$TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzMonitorLogAnalyticsSolution.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-AzMonitorLogAnalyticsSolution' { + It 'UpdateExpanded' { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/MonitoringSolutions/test/readme.md b/src/MonitoringSolutions/test/readme.md new file mode 100644 index 000000000000..7c752b4c8c43 --- /dev/null +++ b/src/MonitoringSolutions/test/readme.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file From bd74e807db97f969f5eaa7332f79e26aea29ee00 Mon Sep 17 00:00:00 2001 From: Yeming Liu Date: Thu, 4 Jun 2020 16:03:59 +0800 Subject: [PATCH 02/13] wip --- src/MonitoringSolutions/.gitignore | 3 +- .../docs/Az.MonitoringSolutions.md | 2 +- .../docs/Get-AzMonitorLogAnalyticsSolution.md | 15 ++++------ .../docs/New-AzMonitorLogAnalyticsSolution.md | 21 ++------------ .../Remove-AzMonitorLogAnalyticsSolution.md | 20 ++++--------- .../Update-AzMonitorLogAnalyticsSolution.md | 20 ++++--------- src/MonitoringSolutions/readme.md | 2 +- src/MonitoringSolutions/test/loadEnv.ps1 | 28 +++++++++++++++++++ src/MonitoringSolutions/test/utils.ps1 | 24 ++++++++++++++++ 9 files changed, 76 insertions(+), 59 deletions(-) create mode 100644 src/MonitoringSolutions/test/loadEnv.ps1 create mode 100644 src/MonitoringSolutions/test/utils.ps1 diff --git a/src/MonitoringSolutions/.gitignore b/src/MonitoringSolutions/.gitignore index 1e3822deea3c..7ee9baa63225 100644 --- a/src/MonitoringSolutions/.gitignore +++ b/src/MonitoringSolutions/.gitignore @@ -12,4 +12,5 @@ test/*-TestResults.xml /*.snk /*.csproj /*.nuspec -/*.psd1 \ No newline at end of file +/*.psd1 +tools \ No newline at end of file diff --git a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md index 7c4d47a66d2a..50e3a63bba96 100644 --- a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md +++ b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md @@ -1,6 +1,6 @@ --- Module Name: Az.MonitoringSolutions -Module Guid: efb4c08f-32a3-465c-bcbf-b56669ab80b9 +Module Guid: 49270280-97f2-409c-a85a-2a9e88891878 Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions Help Version: 1.0.0.0 Locale: en-US diff --git a/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md index faa1778a2e25..1e5fb7ef7373 100644 --- a/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md @@ -74,7 +74,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -InputObject @@ -91,7 +90,6 @@ Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False -Dynamic: False ``` ### -Name @@ -107,7 +105,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -ResourceGroupName @@ -124,7 +121,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -SubscriptionId @@ -141,7 +137,6 @@ Position: Named Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### CommonParameters @@ -155,14 +150,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolution -## ALIASES - ## NOTES -### COMPLEX PARAMETER PROPERTIES +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 + +INPUTOBJECT : Identity Parameter - `[Id ]`: Resource identity path - `[ManagementAssociationName ]`: User ManagementAssociation Name. - `[ManagementConfigurationName ]`: User Management Configuration Name. diff --git a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md index 3568c7fe8b4f..7757ce9f0846 100644 --- a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md @@ -58,7 +58,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -ContainedResource @@ -75,7 +74,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -DefaultProfile @@ -91,7 +89,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -Location @@ -107,7 +104,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -Name @@ -123,7 +119,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -NoWait @@ -139,7 +134,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -PlanName @@ -158,7 +152,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -PlanProduct @@ -176,7 +169,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -PlanPromotionCode @@ -192,7 +184,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -PlanPublisher @@ -209,7 +200,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -ReferencedResource @@ -226,7 +216,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -ResourceGroupName @@ -243,7 +232,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -SubscriptionId @@ -260,7 +248,6 @@ Position: Named Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -Tag @@ -276,7 +263,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -WorkspaceResourceId @@ -292,7 +278,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -Confirm @@ -308,7 +293,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -WhatIf @@ -325,7 +309,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### CommonParameters @@ -337,9 +320,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.Boolean -## ALIASES - ## NOTES +ALIASES + ## RELATED LINKS diff --git a/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md index 1996b1ae1d85..4f55d96c42ba 100644 --- a/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md @@ -62,7 +62,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -DefaultProfile @@ -78,7 +77,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -InputObject @@ -95,7 +93,6 @@ Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False -Dynamic: False ``` ### -Name @@ -111,7 +108,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -NoWait @@ -127,7 +123,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -PassThru @@ -143,7 +138,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -ResourceGroupName @@ -160,7 +154,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -SubscriptionId @@ -177,7 +170,6 @@ Position: Named Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -Confirm @@ -193,7 +185,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -WhatIf @@ -210,7 +201,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### CommonParameters @@ -224,14 +214,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.Boolean -## ALIASES - ## NOTES -### COMPLEX PARAMETER PROPERTIES +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 + +INPUTOBJECT : Identity Parameter - `[Id ]`: Resource identity path - `[ManagementAssociationName ]`: User ManagementAssociation Name. - `[ManagementConfigurationName ]`: User Management Configuration Name. diff --git a/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md index 0bf578c6dcf0..e3a92fa3c833 100644 --- a/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md @@ -64,7 +64,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -DefaultProfile @@ -80,7 +79,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -InputObject @@ -97,7 +95,6 @@ Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False -Dynamic: False ``` ### -Name @@ -113,7 +110,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -NoWait @@ -129,7 +125,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -ResourceGroupName @@ -146,7 +141,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -SubscriptionId @@ -163,7 +157,6 @@ Position: Named Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -Tag @@ -179,7 +172,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -Confirm @@ -195,7 +187,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### -WhatIf @@ -212,7 +203,6 @@ Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False -Dynamic: False ``` ### CommonParameters @@ -226,14 +216,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolution -## ALIASES - ## NOTES -### COMPLEX PARAMETER PROPERTIES +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 + +INPUTOBJECT : Identity Parameter - `[Id ]`: Resource identity path - `[ManagementAssociationName ]`: User ManagementAssociation Name. - `[ManagementConfigurationName ]`: User Management Configuration Name. diff --git a/src/MonitoringSolutions/readme.md b/src/MonitoringSolutions/readme.md index fc7f56587129..8f3ca83a2202 100644 --- a/src/MonitoringSolutions/readme.md +++ b/src/MonitoringSolutions/readme.md @@ -17,7 +17,7 @@ This directory contains the PowerShell module for the MonitoringSolutions servic This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. ## Module Requirements -- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 1.6.0 or greater +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 1.7.4 or greater ## Authentication AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. diff --git a/src/MonitoringSolutions/test/loadEnv.ps1 b/src/MonitoringSolutions/test/loadEnv.ps1 new file mode 100644 index 000000000000..c4ebf2e8310c --- /dev/null +++ b/src/MonitoringSolutions/test/loadEnv.ps1 @@ -0,0 +1,28 @@ +# ---------------------------------------------------------------------------------- +# +# 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. +# ---------------------------------------------------------------------------------- +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json + $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} +} \ No newline at end of file diff --git a/src/MonitoringSolutions/test/utils.ps1 b/src/MonitoringSolutions/test/utils.ps1 new file mode 100644 index 000000000000..8876c288462c --- /dev/null +++ b/src/MonitoringSolutions/test/utils.ps1 @@ -0,0 +1,24 @@ +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +$env = @{} +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} + From 70e5d9063516e3209d51f57217598dd8d6a31992 Mon Sep 17 00:00:00 2001 From: Yeming Liu Date: Fri, 5 Jun 2020 14:32:10 +0800 Subject: [PATCH 03/13] test --- src/MonitoringSolutions/test/test-new.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/MonitoringSolutions/test/test-new.ps1 diff --git a/src/MonitoringSolutions/test/test-new.ps1 b/src/MonitoringSolutions/test/test-new.ps1 new file mode 100644 index 000000000000..9d53e3da03e7 --- /dev/null +++ b/src/MonitoringSolutions/test/test-new.ps1 @@ -0,0 +1,15 @@ +$Name = 'Containers(yeminglog)' +$PlanName = 'Containers(yeminglog)' +$Location = 'westus2' +$ResourceGroupName = 'yemingwestus2' +$PlanProduct = "OMSGallery/Containers" +$PlanPublisher = 'Microsoft' +$WorkspaceResourceId = '/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingwestus2/providers/microsoft.operationalinsights/workspaces/yeminglog' +New-AzMonitorLogAnalyticsSolution -Name $Name -Location $Location -ResourceGroupName $ResourceGroupName -PlanName $PlanName -PlanProduct $PlanProduct -PlanPublisher $PlanPublisher -PlanPromotionCode "" -WorkspaceResourceId $WorkspaceResourceId + +#     [-PlanName ""] + +#     [-Publisher ""] + +#     [-PromotionCode ""] + From bdcb2a302f1c7c828d2b03c3a3ae371d67e61acf Mon Sep 17 00:00:00 2001 From: Yeming Liu Date: Tue, 9 Jun 2020 14:30:45 +0800 Subject: [PATCH 04/13] wip --- .../New-AzMonitorLogAnalyticsSolution.ps1 | 160 ++++++++++++++++++ .../docs/Az.MonitoringSolutions.md | 2 +- .../docs/New-AzMonitorLogAnalyticsSolution.md | 134 +++------------ src/MonitoringSolutions/readme.md | 8 +- src/MonitoringSolutions/test/test-new.ps1 | 7 +- 5 files changed, 194 insertions(+), 117 deletions(-) create mode 100644 src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 diff --git a/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 b/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 new file mode 100644 index 000000000000..2b557f27c89b --- /dev/null +++ b/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 @@ -0,0 +1,160 @@ + +# ---------------------------------------------------------------------------------- +# +# 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. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates or updates the Solution. +.Description +Creates or updates the Solution. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +System.Boolean +.Link +https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions/new-azmonitorloganalyticssolution +#> +function New-AzMonitorLogAnalyticsSolution { + [OutputType([System.Boolean])] + [CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] + param( + # fake + [Parameter(Mandatory)] + [System.String] + # User Solution Name. + ${WorkspaceName}, + + [Parameter(Mandatory)] + [Alias('SolutionType')] + [System.String] + # User Solution Name. + ${Type}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Path')] + [System.String] + # The name of the resource group to get. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] + [System.String] + # Gets subscription credentials which uniquely identify Microsoft Azure subscription. + # The subscription ID forms part of the URI for every service call. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Body')] + [System.String] + # Resource location + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Runtime.Info(PossibleTypes = ([Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolutionTags]))] + [System.Collections.Hashtable] + # Resource tags + ${Tag}, + + [Parameter(Mandatory)] + [Alias('WorkspaceResourceId')] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Body')] + [System.String] + # The azure resourceId for the workspace where the solution will be deployed/enabled. + ${WorkspaceId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + $solutionName = "$Type($WorkspaceName)" + $PSBoundParameters.Add('Name', $solutionName) | Out-Null + $PSBoundParameters.Add('PlanName', $solutionName) | Out-Null + $PSBoundParameters.Add('PlanProduct', "OMSGallery/$Type") | Out-Null + $PSBoundParameters.Add('PlanPublisher', "Microsoft") | Out-Null + $PSBoundParameters.Add('PlanPromotionCode', "") | Out-Null + $PSBoundParameters.Remove('WorkspaceName') | Out-Null + $PSBoundParameters.Remove('Type') | Out-Null + $PSBoundParameters.Remove('WorkspaceId') | Out-Null + $PSBoundParameters.Add('WorkspaceResourceId', $WorkspaceId) | Out-Null + Az.MonitoringSolutions.internal\New-AzMonitorLogAnalyticsSolution @PSBoundParameters + } + +} diff --git a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md index 50e3a63bba96..4378224d7db9 100644 --- a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md +++ b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md @@ -1,6 +1,6 @@ --- Module Name: Az.MonitoringSolutions -Module Guid: 49270280-97f2-409c-a85a-2a9e88891878 +Module Guid: 3bc23fa5-0b63-4297-9f3e-9207ac25416c Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions Help Version: 1.0.0.0 Locale: en-US diff --git a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md index 7757ce9f0846..ef535f8dff3b 100644 --- a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md @@ -13,11 +13,9 @@ Creates or updates the Solution. ## SYNTAX ``` -New-AzMonitorLogAnalyticsSolution -Name -ResourceGroupName [-SubscriptionId ] - [-ContainedResource ] [-Location ] [-PlanName ] [-PlanProduct ] - [-PlanPromotionCode ] [-PlanPublisher ] [-ReferencedResource ] [-Tag ] - [-WorkspaceResourceId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] +New-AzMonitorLogAnalyticsSolution -ResourceGroupName -Location -Type + -WorkspaceId -WorkspaceName [-SubscriptionId ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -60,22 +58,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ContainedResource -The azure resources that will be contained within the solutions. -They will be locked and gets deleted automatically when the solution is deleted. - -```yaml -Type: System.String[] -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. @@ -99,21 +81,6 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -User Solution Name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: SolutionName - Required: True Position: Named Default value: None @@ -136,59 +103,25 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -PlanName -name of the solution to be created. -For Microsoft published solution it should be in the format of solutionType(workspaceName). -SolutionType part is case sensitive. -For third party solution, it can be anything. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PlanProduct -name of the solution to enabled/add. -For Microsoft published gallery solution it should be in the format of OMSGallery/\. -This is case sensitive - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PlanPromotionCode -promotionCode, Not really used now, can you left as empty +### -ResourceGroupName +The name of the resource group to get. +The name is case insensitive. ```yaml Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -PlanPublisher -Publisher name. -For gallery solution, it is Microsoft. +### -SubscriptionId +Gets subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. ```yaml Type: System.String @@ -197,17 +130,16 @@ Aliases: Required: False Position: Named -Default value: None +Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False ``` -### -ReferencedResource -The resources that will be referenced from this solution. -Deleting any of those solution out of band will break the solution. +### -Tag +Resource tags ```yaml -Type: System.String[] +Type: System.Collections.Hashtable Parameter Sets: (All) Aliases: @@ -218,14 +150,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ResourceGroupName -The name of the resource group to get. -The name is case insensitive. +### -Type +User Solution Name. ```yaml Type: System.String Parameter Sets: (All) -Aliases: +Aliases: SolutionType Required: True Position: Named @@ -234,46 +165,31 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -SubscriptionId -Gets subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. +### -WorkspaceId +The azure resourceId for the workspace where the solution will be deployed/enabled. ```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 +Aliases: WorkspaceResourceId -```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) -Aliases: - -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WorkspaceResourceId -The azure resourceId for the workspace where the solution will be deployed/enabled. +### -WorkspaceName +fake +User Solution Name. ```yaml Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False diff --git a/src/MonitoringSolutions/readme.md b/src/MonitoringSolutions/readme.md index 8f3ca83a2202..83a5ec3428ea 100644 --- a/src/MonitoringSolutions/readme.md +++ b/src/MonitoringSolutions/readme.md @@ -49,7 +49,8 @@ In this directory, run AutoRest: require: - $(this-folder)/../readme.azure.noprofile.md input-file: - - $(repo)/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json + - C:\Users\yeliu\isra-fel\azure-powershell\src\MonitoringSolutions\OperationsManagement.json + # - $(repo)/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json module-version: 0.1.0 title: MonitoringSolutions @@ -70,4 +71,9 @@ directive: - where: subject: Association$|Configuration$ hide: true + # Hide New-*Solution for customization + - where: + verb: New + subject: Solution$ + hide: true ``` diff --git a/src/MonitoringSolutions/test/test-new.ps1 b/src/MonitoringSolutions/test/test-new.ps1 index 9d53e3da03e7..48ae8069202a 100644 --- a/src/MonitoringSolutions/test/test-new.ps1 +++ b/src/MonitoringSolutions/test/test-new.ps1 @@ -7,9 +7,4 @@ $PlanPublisher = 'Microsoft' $WorkspaceResourceId = '/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingwestus2/providers/microsoft.operationalinsights/workspaces/yeminglog' New-AzMonitorLogAnalyticsSolution -Name $Name -Location $Location -ResourceGroupName $ResourceGroupName -PlanName $PlanName -PlanProduct $PlanProduct -PlanPublisher $PlanPublisher -PlanPromotionCode "" -WorkspaceResourceId $WorkspaceResourceId -#     [-PlanName ""] - -#     [-Publisher ""] - -#     [-PromotionCode ""] - +New-AzMonitorLogAnalyticsSolution -WorkspaceName yemingmonitor -Type Containers -ResourceGroupName yemingmonitor -Location westus2 -WorkspaceId /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonitor \ No newline at end of file From 219dd350785efaaa64018abde1f7f70840f7475b Mon Sep 17 00:00:00 2001 From: Yeming Liu Date: Wed, 17 Jun 2020 16:20:09 +0800 Subject: [PATCH 05/13] design review --- .../New-AzMonitorLogAnalyticsSolution.ps1 | 43 +- .../custom/OperationsManagement.json | 1086 +++++++++++++++++ .../docs/Az.MonitoringSolutions.md | 4 +- .../docs/New-AzMonitorLogAnalyticsSolution.md | 66 +- .../Remove-AzMonitorLogAnalyticsSolution.md | 34 +- .../Update-AzMonitorLogAnalyticsSolution.md | 34 +- src/MonitoringSolutions/readme.md | 15 +- src/MonitoringSolutions/test/test-new.ps1 | 25 +- 8 files changed, 1141 insertions(+), 166 deletions(-) create mode 100644 src/MonitoringSolutions/custom/OperationsManagement.json diff --git a/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 b/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 index 2b557f27c89b..b3a930cf5fb7 100644 --- a/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 +++ b/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 @@ -15,9 +15,9 @@ <# .Synopsis -Creates or updates the Solution. +Creates a log analytics solution. .Description -Creates or updates the Solution. +Creates a log analytics solution. .Example PS C:\> {{ Add code here }} @@ -28,24 +28,18 @@ PS C:\> {{ Add code here }} {{ Add output here }} .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolution .Link https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions/new-azmonitorloganalyticssolution #> function New-AzMonitorLogAnalyticsSolution { - [OutputType([System.Boolean])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolution])] [CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( - # fake - [Parameter(Mandatory)] - [System.String] - # User Solution Name. - ${WorkspaceName}, - [Parameter(Mandatory)] [Alias('SolutionType')] [System.String] - # User Solution Name. + # Type of the solution to be created. For example "Container". ${Type}, [Parameter(Mandatory)] @@ -66,7 +60,7 @@ function New-AzMonitorLogAnalyticsSolution { [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Body')] [System.String] - # Resource location + # Resource location. Must be the same as the log analytic workspace. ${Location}, [Parameter()] @@ -77,11 +71,10 @@ function New-AzMonitorLogAnalyticsSolution { ${Tag}, [Parameter(Mandatory)] - [Alias('WorkspaceResourceId')] [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Body')] [System.String] - # The azure resourceId for the workspace where the solution will be deployed/enabled. - ${WorkspaceId}, + # The Azure resource ID for the workspace where the solution will be deployed/enabled. + ${WorkspaceResourceId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -91,12 +84,6 @@ function New-AzMonitorLogAnalyticsSolution { # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -117,12 +104,6 @@ function New-AzMonitorLogAnalyticsSolution { # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Category('Runtime')] [System.Uri] @@ -144,17 +125,15 @@ function New-AzMonitorLogAnalyticsSolution { ) process { - $solutionName = "$Type($WorkspaceName)" + $resourceIdentifier = [Microsoft.Azure.Management.Internal.Resources.Utilities.Models.ResourceIdentifier]::new($WorkspaceResourceId) + $workspaceName = $resourceIdentifier.ResourceName + $solutionName = "$Type($workspaceName)" $PSBoundParameters.Add('Name', $solutionName) | Out-Null $PSBoundParameters.Add('PlanName', $solutionName) | Out-Null $PSBoundParameters.Add('PlanProduct', "OMSGallery/$Type") | Out-Null $PSBoundParameters.Add('PlanPublisher', "Microsoft") | Out-Null $PSBoundParameters.Add('PlanPromotionCode', "") | Out-Null - $PSBoundParameters.Remove('WorkspaceName') | Out-Null $PSBoundParameters.Remove('Type') | Out-Null - $PSBoundParameters.Remove('WorkspaceId') | Out-Null - $PSBoundParameters.Add('WorkspaceResourceId', $WorkspaceId) | Out-Null Az.MonitoringSolutions.internal\New-AzMonitorLogAnalyticsSolution @PSBoundParameters } - } diff --git a/src/MonitoringSolutions/custom/OperationsManagement.json b/src/MonitoringSolutions/custom/OperationsManagement.json new file mode 100644 index 000000000000..bb4cc978dbc1 --- /dev/null +++ b/src/MonitoringSolutions/custom/OperationsManagement.json @@ -0,0 +1,1086 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Log Analytics - Operations Management", + "description": "Azure Log Analytics API reference for Solution.", + "version": "2015-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}": { + "put": { + "tags": [ + "Solution" + ], + "x-ms-examples": { + "SolutionCreate": { + "$ref": "./examples/SolutionCreate.json" + } + }, + "operationId": "Solutions_CreateOrUpdate", + "summary": "Create/Update Solution.", + "description": "Creates or updates the Solution.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SolutionNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Solution" + }, + "description": "The parameters required to create OMS Solution." + } + ], + "responses": { + "201": { + "description": "Created response definition.", + "schema": { + "$ref": "#/definitions/Solution" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + }, + "patch": { + "tags": [ + "Solution" + ], + "x-ms-examples": { + "SolutionUpdate": { + "$ref": "./examples/SolutionUpdate.json" + } + }, + "operationId": "Solutions_Update", + "summary": "Patch a Solution.", + "description": "Patch a Solution. Only updating tags supported.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SolutionNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SolutionPatch" + }, + "description": "The parameters required to patch a Solution." + } + ], + "responses": { + "200": { + "description": "Patch succeeded.", + "schema": { + "$ref": "#/definitions/Solution" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + }, + "delete": { + "tags": [ + "Solution" + ], + "x-ms-examples": { + "SolutionDelete": { + "$ref": "./examples/SolutionDelete.json" + } + }, + "operationId": "Solutions_Delete", + "summary": "Deletes the solution", + "description": "Deletes the solution in the subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SolutionNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition." + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + }, + "get": { + "tags": [ + "Solution" + ], + "operationId": "Solutions_Get", + "x-ms-examples": { + "SolutionGet": { + "$ref": "./examples/SolutionGet.json" + } + }, + "summary": "Retrieve solution.", + "description": "Retrieves the user solution.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SolutionNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Solution" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions": { + "get": { + "tags": [ + "Solution" + ], + "operationId": "Solutions_ListByResourceGroup", + "x-ms-examples": { + "SolutionList": { + "$ref": "./examples/SolutionList.json" + } + }, + "summary": "Retrieves the solution list for the subscription", + "description": "Retrieves the solution list. It will retrieve both first party and third party solutions", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/SolutionPropertiesList" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/solutions": { + "get": { + "tags": [ + "Solution" + ], + "operationId": "Solutions_ListBySubscription", + "x-ms-examples": { + "SolutionList": { + "$ref": "./examples/SolutionListForSubscription.json" + } + }, + "summary": "Retrieves the solution list for the subscription", + "description": "Retrieves the solution list. It will retrieve both first party and third party solutions", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/SolutionPropertiesList" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementAssociations": { + "get": { + "tags": [ + "ManagementAssociation" + ], + "operationId": "ManagementAssociations_ListBySubscription", + "x-ms-examples": { + "SolutionList": { + "$ref": "./examples/ManagementAssociationListForSubscription.json" + } + }, + "summary": "Retrieves the ManagementAssociations list for the subscription", + "description": "Retrieves the ManagementAssociations list.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/ManagementAssociationPropertiesList" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}": { + "put": { + "tags": [ + "ManagementAssociation" + ], + "x-ms-examples": { + "SolutionCreate": { + "$ref": "./examples/ManagementAssociationCreate.json" + } + }, + "operationId": "ManagementAssociations_CreateOrUpdate", + "summary": "Create/Update ManagementAssociation.", + "description": "Creates or updates the ManagementAssociation.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ProviderNameParameter" + }, + { + "$ref": "#/parameters/ResourceTypeParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/ManagementAssociationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ManagementAssociation" + }, + "description": "The parameters required to create ManagementAssociation extension." + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/ManagementAssociation" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + }, + "delete": { + "tags": [ + "ManagementAssociation" + ], + "x-ms-examples": { + "SolutionDelete": { + "$ref": "./examples/ManagementAssociationDelete.json" + } + }, + "operationId": "ManagementAssociations_Delete", + "summary": "Deletes the ManagementAssociation", + "description": "Deletes the ManagementAssociation in the subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ProviderNameParameter" + }, + { + "$ref": "#/parameters/ResourceTypeParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/ManagementAssociationNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition." + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + }, + "get": { + "tags": [ + "ManagementAssociation" + ], + "operationId": "ManagementAssociations_Get", + "x-ms-examples": { + "SolutionGet": { + "$ref": "./examples/ManagementAssociationGet.json" + } + }, + "summary": "Retrieve ManagementAssociation.", + "description": "Retrieves the user ManagementAssociation.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ProviderNameParameter" + }, + { + "$ref": "#/parameters/ResourceTypeParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/ManagementAssociationNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/ManagementAssociation" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementConfigurations": { + "get": { + "tags": [ + "ManagementConfiguration" + ], + "operationId": "ManagementConfigurations_ListBySubscription", + "x-ms-examples": { + "SolutionList": { + "$ref": "./examples/ManagementConfigurationListForSubscription.json" + } + }, + "summary": "Retrieves the ManagementConfigurations list for the subscription", + "description": "Retrieves the ManagementConfigurations list.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/ManagementConfigurationPropertiesList" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}": { + "put": { + "tags": [ + "ManagementConfiguration" + ], + "x-ms-examples": { + "ManagementConfigurationCreate": { + "$ref": "./examples/ManagementConfigurationCreate.json" + } + }, + "operationId": "ManagementConfigurations_CreateOrUpdate", + "summary": "Create/Update ManagementConfiguration.", + "description": "Creates or updates the ManagementConfiguration.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ManagementConfigurationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ManagementConfiguration" + }, + "description": "The parameters required to create OMS Solution." + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/ManagementConfiguration" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + }, + "delete": { + "tags": [ + "ManagementConfiguration" + ], + "x-ms-examples": { + "ManagementConfigurationDelete": { + "$ref": "./examples/ManagementConfigurationDelete.json" + } + }, + "operationId": "ManagementConfigurations_Delete", + "summary": "Deletes the ManagementConfiguration", + "description": "Deletes the ManagementConfiguration in the subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ManagementConfigurationNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition." + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + }, + "get": { + "tags": [ + "ManagementConfiguration" + ], + "operationId": "ManagementConfigurations_Get", + "x-ms-examples": { + "SolutionGet": { + "$ref": "./examples/ManagementConfigurationGet.json" + } + }, + "summary": "Retrieve ManagementConfiguration.", + "description": "Retrieves the user ManagementConfiguration.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ManagementConfigurationNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/ManagementConfiguration" + } + }, + "default": { + "schema": { + "$ref": "#/definitions/CodeMessageError" + }, + "description": "Error response definition." + } + } + } + }, + "/providers/Microsoft.OperationsManagement/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available OperationsManagement Rest API operations.", + "operationId": "Operations_List", + "x-ms-examples": { + "OperationsList": { + "$ref": "./examples/OperationsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + }, + "definitions": { + "OperationListResult": { + "description": "Result of the request to list solution operations.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of solution operations supported by the OperationsManagement resource provider." + } + } + }, + "Operation": { + "description": "Supported operation of OperationsManagement resource provider.", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft OperationsManagement.", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed etc.", + "type": "string" + }, + "operation": { + "description": "Type of operation: get, read, delete, etc.", + "type": "string" + } + } + } + } + }, + "SolutionProperties": { + "description": "Solution properties supported by the OperationsManagement resource provider.", + "properties": { + "workspaceResourceId": { + "type": "string", + "description": "The azure resourceId for the workspace where the solution will be deployed/enabled." + }, + "provisioningState": { + "type": "string", + "description": "The provisioning state for the solution.", + "readOnly": true + }, + "containedResources": { + "type": "array", + "items": { + "type": "string", + "description": "the azure resourceId of the resource." + }, + "description": "The azure resources that will be contained within the solutions. They will be locked and gets deleted automatically when the solution is deleted." + }, + "referencedResources": { + "type": "array", + "items": { + "type": "string", + "description": "the azure resourceId of the resource." + }, + "description": "The resources that will be referenced from this solution. Deleting any of those solution out of band will break the solution." + } + }, + "required": [ + "workspaceResourceId" + ], + "x-ms-azure-resource": true + }, + "ManagementAssociationProperties": { + "description": "ManagementAssociation properties supported by the OperationsManagement resource provider.", + "properties": { + "applicationId": { + "type": "string", + "description": "The applicationId of the appliance for this association." + } + }, + "required": [ + "applicationId" + ], + "x-ms-azure-resource": true + }, + "ManagementConfigurationProperties": { + "description": "ManagementConfiguration properties supported by the OperationsManagement resource provider.", + "properties": { + "applicationId": { + "type": "string", + "description": "The applicationId of the appliance for this Management." + }, + "parentResourceType": { + "type": "string", + "description": "The type of the parent resource." + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/definitions/ArmTemplateParameter" + }, + "description": "Parameters to run the ARM template" + }, + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "The provisioning state for the ManagementConfiguration." + }, + "template": { + "type": "object", + "description": "The Json object containing the ARM template to deploy" + } + }, + "required": [ + "parameters", + "parentResourceType", + "template" + ], + "x-ms-azure-resource": true + }, + "SolutionPropertiesList": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Solution" + }, + "description": "List of solution properties within the subscription." + } + }, + "description": "the list of solution response" + }, + "ManagementAssociationPropertiesList": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ManagementAssociation" + }, + "description": "List of Management Association properties within the subscription." + } + }, + "description": "the list of ManagementAssociation response" + }, + "ManagementConfigurationPropertiesList": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ManagementConfiguration" + }, + "description": "List of Management Configuration properties within the subscription." + } + }, + "description": "the list of ManagementConfiguration response" + }, + "SolutionPlan": { + "description": "Plan for solution object supported by the OperationsManagement resource provider.", + "properties": { + "name": { + "type": "string", + "description": "name of the solution to be created. For Microsoft published solution it should be in the format of solutionType(workspaceName). SolutionType part is case sensitive. For third party solution, it can be anything." + }, + "publisher": { + "type": "string", + "description": "Publisher name. For gallery solution, it is Microsoft." + }, + "promotionCode": { + "type": "string", + "description": "promotionCode, Not really used now, can you left as empty" + }, + "product": { + "type": "string", + "description": "name of the solution to enabled/add. For Microsoft published gallery solution it should be in the format of OMSGallery/. This is case sensitive" + } + } + }, + "Solution": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource ID." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "plan": { + "description": "Plan for solution object supported by the OperationsManagement resource provider.", + "$ref": "#/definitions/SolutionPlan" + }, + "properties": { + "description": "Properties for solution object supported by the OperationsManagement resource provider.", + "$ref": "#/definitions/SolutionProperties" + } + }, + "description": "The container for solution.", + "x-ms-azure-resource": true + }, + "SolutionPatch": { + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "description": "The properties of a Solution that can be patched.", + "x-ms-azure-resource": true + }, + "ManagementAssociation": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource ID." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "properties": { + "description": "Properties for ManagementAssociation object supported by the OperationsManagement resource provider.", + "$ref": "#/definitions/ManagementAssociationProperties" + } + }, + "description": "The container for solution.", + "x-ms-azure-resource": true + }, + "ManagementConfiguration": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource ID." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "properties": { + "description": "Properties for ManagementConfiguration object supported by the OperationsManagement resource provider.", + "$ref": "#/definitions/ManagementConfigurationProperties" + } + }, + "description": "The container for solution.", + "x-ms-azure-resource": true + }, + "ArmTemplateParameter": { + "description": "Parameter to pass to ARM template", + "properties": { + "name": { + "type": "string", + "description": "name of the parameter." + }, + "value": { + "type": "string", + "description": "value for the parameter. In Jtoken " + } + } + }, + "CodeMessageError": { + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error type." + }, + "message": { + "type": "string", + "description": "The error message." + } + }, + "description": "The error details for a failed request." + } + }, + "description": "The error body contract." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The name of the resource group to get. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + }, + "SolutionNameParameter": { + "x-ms-parameter-location": "method", + "name": "solutionName", + "in": "path", + "required": true, + "type": "string", + "description": "User Solution Name." + }, + "ManagementAssociationNameParameter": { + "x-ms-parameter-location": "method", + "name": "managementAssociationName", + "in": "path", + "required": true, + "type": "string", + "description": "User ManagementAssociation Name." + }, + "ManagementConfigurationNameParameter": { + "x-ms-parameter-location": "method", + "name": "managementConfigurationName", + "in": "path", + "required": true, + "type": "string", + "description": "User Management Configuration Name." + }, + "ProviderNameParameter": { + "name": "providerName", + "in": "path", + "required": true, + "type": "string", + "description": "Provider name for the parent resource.", + "x-ms-parameter-location": "client" + }, + "ResourceTypeParameter": { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "Resource type for the parent resource", + "x-ms-parameter-location": "client" + }, + "ResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "Parent resource name.", + "x-ms-parameter-location": "client" + } + } +} diff --git a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md index 4378224d7db9..0a92dd4ab8fb 100644 --- a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md +++ b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md @@ -1,6 +1,6 @@ --- Module Name: Az.MonitoringSolutions -Module Guid: 3bc23fa5-0b63-4297-9f3e-9207ac25416c +Module Guid: 41f75f59-5fa3-44d9-827e-d16fd034356f Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions Help Version: 1.0.0.0 Locale: en-US @@ -15,7 +15,7 @@ Microsoft Azure PowerShell: MonitoringSolutions cmdlets Retrieves the user solution. ### [New-AzMonitorLogAnalyticsSolution](New-AzMonitorLogAnalyticsSolution.md) -Creates or updates the Solution. +Creates a log analytics solution. ### [Remove-AzMonitorLogAnalyticsSolution](Remove-AzMonitorLogAnalyticsSolution.md) Deletes the solution in the subscription. diff --git a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md index ef535f8dff3b..24f27dc9d282 100644 --- a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md @@ -8,18 +8,18 @@ schema: 2.0.0 # New-AzMonitorLogAnalyticsSolution ## SYNOPSIS -Creates or updates the Solution. +Creates a log analytics solution. ## SYNTAX ``` New-AzMonitorLogAnalyticsSolution -ResourceGroupName -Location -Type - -WorkspaceId -WorkspaceName [-SubscriptionId ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + -WorkspaceResourceId [-SubscriptionId ] [-Tag ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Creates or updates the Solution. +Creates a log analytics solution. ## EXAMPLES @@ -43,21 +43,6 @@ PS C:\> {{ Add code here }} ## PARAMETERS -### -AsJob -Run the command as a job - -```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. @@ -74,7 +59,8 @@ Accept wildcard characters: False ``` ### -Location -Resource location +Resource location. +Must be the same as the log analytic workspace. ```yaml Type: System.String @@ -88,21 +74,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -NoWait -Run the command asynchronously - -```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 to get. The name is case insensitive. @@ -151,7 +122,8 @@ Accept wildcard characters: False ``` ### -Type -User Solution Name. +Type of the solution to be created. +For example "Container". ```yaml Type: System.String @@ -165,24 +137,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WorkspaceId -The azure resourceId for the workspace where the solution will be deployed/enabled. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: WorkspaceResourceId - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WorkspaceName -fake -User Solution Name. +### -WorkspaceResourceId +The Azure resource ID for the workspace where the solution will be deployed/enabled. ```yaml Type: System.String @@ -234,7 +190,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### System.Boolean +### Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolution ## NOTES diff --git a/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md index 4f55d96c42ba..d77fb872596e 100644 --- a/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md @@ -15,13 +15,13 @@ Deletes the solution in the subscription. ### Delete (Default) ``` Remove-AzMonitorLogAnalyticsSolution -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] ``` ### DeleteViaIdentity ``` Remove-AzMonitorLogAnalyticsSolution -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -49,21 +49,6 @@ PS C:\> {{ Add code here }} ## PARAMETERS -### -AsJob -Run the command as a job - -```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. @@ -110,21 +95,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -NoWait -Run the command asynchronously - -```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 -``` - ### -PassThru Returns true when the command succeeds diff --git a/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md index e3a92fa3c833..4ddf806ea718 100644 --- a/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md @@ -16,13 +16,13 @@ Only updating tags supported. ### UpdateExpanded (Default) ``` Update-AzMonitorLogAnalyticsSolution -Name -ResourceGroupName [-SubscriptionId ] - [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzMonitorLogAnalyticsSolution -InputObject [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -51,21 +51,6 @@ PS C:\> {{ Add code here }} ## PARAMETERS -### -AsJob -Run the command as a job - -```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. @@ -112,21 +97,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -NoWait -Run the command asynchronously - -```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 to get. The name is case insensitive. diff --git a/src/MonitoringSolutions/readme.md b/src/MonitoringSolutions/readme.md index 83a5ec3428ea..51fa43a65c6d 100644 --- a/src/MonitoringSolutions/readme.md +++ b/src/MonitoringSolutions/readme.md @@ -49,8 +49,9 @@ In this directory, run AutoRest: require: - $(this-folder)/../readme.azure.noprofile.md input-file: - - C:\Users\yeliu\isra-fel\azure-powershell\src\MonitoringSolutions\OperationsManagement.json + - C:\Users\yeliu\isra-fel\azure-powershell\src\MonitoringSolutions\custom\OperationsManagement.json # - $(repo)/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json + # - https://github.com/Azure/azure-rest-api-specs/blob/740a40ba31720ad514a308054ba517a8ea956a3c/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json module-version: 0.1.0 title: MonitoringSolutions @@ -67,13 +68,21 @@ directive: - where: verb: Set remove: true - # Hide the cmdlets we don't need for now + # Remove the cmdlets we don't need for now - where: subject: Association$|Configuration$ - hide: true + remove: true # Hide New-*Solution for customization - where: verb: New subject: Solution$ hide: true + - where: + model-name: Solution + set: + format-table: + properties: + - Name + - Type + - Location ``` diff --git a/src/MonitoringSolutions/test/test-new.ps1 b/src/MonitoringSolutions/test/test-new.ps1 index 48ae8069202a..f6fd7bb89661 100644 --- a/src/MonitoringSolutions/test/test-new.ps1 +++ b/src/MonitoringSolutions/test/test-new.ps1 @@ -1,10 +1,15 @@ -$Name = 'Containers(yeminglog)' -$PlanName = 'Containers(yeminglog)' -$Location = 'westus2' -$ResourceGroupName = 'yemingwestus2' -$PlanProduct = "OMSGallery/Containers" -$PlanPublisher = 'Microsoft' -$WorkspaceResourceId = '/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingwestus2/providers/microsoft.operationalinsights/workspaces/yeminglog' -New-AzMonitorLogAnalyticsSolution -Name $Name -Location $Location -ResourceGroupName $ResourceGroupName -PlanName $PlanName -PlanProduct $PlanProduct -PlanPublisher $PlanPublisher -PlanPromotionCode "" -WorkspaceResourceId $WorkspaceResourceId - -New-AzMonitorLogAnalyticsSolution -WorkspaceName yemingmonitor -Type Containers -ResourceGroupName yemingmonitor -Location westus2 -WorkspaceId /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonitor \ No newline at end of file +# 1. create a solution +# Notes: +# The name of the solution is not assigned by user, it is generated. +# `-Type ` is a code of the solution type. We are working with service team to provide a list of available types. +# Only first party (Microsoft) solutions are supported. + +$workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName yemingmonitor -Name yemingmonitor + +New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName yemingmonitor -Location $workspace.location -WorkspaceResourceId $workspace.ResourceId + +# Name Type Location +# ---- ---- -------- +# Containers(yemingmonitor) Microsoft.OperationsManagement/solutions West US 2 + +# 2. \ No newline at end of file From 3d16acce84e4f27db8224548a9386417a1c47dbc Mon Sep 17 00:00:00 2001 From: Yeming Liu Date: Tue, 23 Jun 2020 18:23:13 +0800 Subject: [PATCH 06/13] wip --- .../custom/OperationsManagement.json | 1086 ----------------- .../docs/Az.MonitoringSolutions.md | 2 +- src/MonitoringSolutions/readme.md | 19 +- 3 files changed, 18 insertions(+), 1089 deletions(-) delete mode 100644 src/MonitoringSolutions/custom/OperationsManagement.json diff --git a/src/MonitoringSolutions/custom/OperationsManagement.json b/src/MonitoringSolutions/custom/OperationsManagement.json deleted file mode 100644 index bb4cc978dbc1..000000000000 --- a/src/MonitoringSolutions/custom/OperationsManagement.json +++ /dev/null @@ -1,1086 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Log Analytics - Operations Management", - "description": "Azure Log Analytics API reference for Solution.", - "version": "2015-11-01-preview" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}": { - "put": { - "tags": [ - "Solution" - ], - "x-ms-examples": { - "SolutionCreate": { - "$ref": "./examples/SolutionCreate.json" - } - }, - "operationId": "Solutions_CreateOrUpdate", - "summary": "Create/Update Solution.", - "description": "Creates or updates the Solution.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SolutionNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Solution" - }, - "description": "The parameters required to create OMS Solution." - } - ], - "responses": { - "201": { - "description": "Created response definition.", - "schema": { - "$ref": "#/definitions/Solution" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - }, - "patch": { - "tags": [ - "Solution" - ], - "x-ms-examples": { - "SolutionUpdate": { - "$ref": "./examples/SolutionUpdate.json" - } - }, - "operationId": "Solutions_Update", - "summary": "Patch a Solution.", - "description": "Patch a Solution. Only updating tags supported.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SolutionNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SolutionPatch" - }, - "description": "The parameters required to patch a Solution." - } - ], - "responses": { - "200": { - "description": "Patch succeeded.", - "schema": { - "$ref": "#/definitions/Solution" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - }, - "delete": { - "tags": [ - "Solution" - ], - "x-ms-examples": { - "SolutionDelete": { - "$ref": "./examples/SolutionDelete.json" - } - }, - "operationId": "Solutions_Delete", - "summary": "Deletes the solution", - "description": "Deletes the solution in the subscription.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/SolutionNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition." - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - }, - "get": { - "tags": [ - "Solution" - ], - "operationId": "Solutions_Get", - "x-ms-examples": { - "SolutionGet": { - "$ref": "./examples/SolutionGet.json" - } - }, - "summary": "Retrieve solution.", - "description": "Retrieves the user solution.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/SolutionNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/Solution" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - } - }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions": { - "get": { - "tags": [ - "Solution" - ], - "operationId": "Solutions_ListByResourceGroup", - "x-ms-examples": { - "SolutionList": { - "$ref": "./examples/SolutionList.json" - } - }, - "summary": "Retrieves the solution list for the subscription", - "description": "Retrieves the solution list. It will retrieve both first party and third party solutions", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/SolutionPropertiesList" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/solutions": { - "get": { - "tags": [ - "Solution" - ], - "operationId": "Solutions_ListBySubscription", - "x-ms-examples": { - "SolutionList": { - "$ref": "./examples/SolutionListForSubscription.json" - } - }, - "summary": "Retrieves the solution list for the subscription", - "description": "Retrieves the solution list. It will retrieve both first party and third party solutions", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/SolutionPropertiesList" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementAssociations": { - "get": { - "tags": [ - "ManagementAssociation" - ], - "operationId": "ManagementAssociations_ListBySubscription", - "x-ms-examples": { - "SolutionList": { - "$ref": "./examples/ManagementAssociationListForSubscription.json" - } - }, - "summary": "Retrieves the ManagementAssociations list for the subscription", - "description": "Retrieves the ManagementAssociations list.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/ManagementAssociationPropertiesList" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - } - }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}": { - "put": { - "tags": [ - "ManagementAssociation" - ], - "x-ms-examples": { - "SolutionCreate": { - "$ref": "./examples/ManagementAssociationCreate.json" - } - }, - "operationId": "ManagementAssociations_CreateOrUpdate", - "summary": "Create/Update ManagementAssociation.", - "description": "Creates or updates the ManagementAssociation.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ProviderNameParameter" - }, - { - "$ref": "#/parameters/ResourceTypeParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - }, - { - "$ref": "#/parameters/ManagementAssociationNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ManagementAssociation" - }, - "description": "The parameters required to create ManagementAssociation extension." - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/ManagementAssociation" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - }, - "delete": { - "tags": [ - "ManagementAssociation" - ], - "x-ms-examples": { - "SolutionDelete": { - "$ref": "./examples/ManagementAssociationDelete.json" - } - }, - "operationId": "ManagementAssociations_Delete", - "summary": "Deletes the ManagementAssociation", - "description": "Deletes the ManagementAssociation in the subscription.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ProviderNameParameter" - }, - { - "$ref": "#/parameters/ResourceTypeParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - }, - { - "$ref": "#/parameters/ManagementAssociationNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition." - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - }, - "get": { - "tags": [ - "ManagementAssociation" - ], - "operationId": "ManagementAssociations_Get", - "x-ms-examples": { - "SolutionGet": { - "$ref": "./examples/ManagementAssociationGet.json" - } - }, - "summary": "Retrieve ManagementAssociation.", - "description": "Retrieves the user ManagementAssociation.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ProviderNameParameter" - }, - { - "$ref": "#/parameters/ResourceTypeParameter" - }, - { - "$ref": "#/parameters/ResourceNameParameter" - }, - { - "$ref": "#/parameters/ManagementAssociationNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/ManagementAssociation" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementConfigurations": { - "get": { - "tags": [ - "ManagementConfiguration" - ], - "operationId": "ManagementConfigurations_ListBySubscription", - "x-ms-examples": { - "SolutionList": { - "$ref": "./examples/ManagementConfigurationListForSubscription.json" - } - }, - "summary": "Retrieves the ManagementConfigurations list for the subscription", - "description": "Retrieves the ManagementConfigurations list.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/ManagementConfigurationPropertiesList" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - } - }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}": { - "put": { - "tags": [ - "ManagementConfiguration" - ], - "x-ms-examples": { - "ManagementConfigurationCreate": { - "$ref": "./examples/ManagementConfigurationCreate.json" - } - }, - "operationId": "ManagementConfigurations_CreateOrUpdate", - "summary": "Create/Update ManagementConfiguration.", - "description": "Creates or updates the ManagementConfiguration.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ManagementConfigurationNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ManagementConfiguration" - }, - "description": "The parameters required to create OMS Solution." - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/ManagementConfiguration" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - }, - "delete": { - "tags": [ - "ManagementConfiguration" - ], - "x-ms-examples": { - "ManagementConfigurationDelete": { - "$ref": "./examples/ManagementConfigurationDelete.json" - } - }, - "operationId": "ManagementConfigurations_Delete", - "summary": "Deletes the ManagementConfiguration", - "description": "Deletes the ManagementConfiguration in the subscription.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ManagementConfigurationNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition." - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - }, - "get": { - "tags": [ - "ManagementConfiguration" - ], - "operationId": "ManagementConfigurations_Get", - "x-ms-examples": { - "SolutionGet": { - "$ref": "./examples/ManagementConfigurationGet.json" - } - }, - "summary": "Retrieve ManagementConfiguration.", - "description": "Retrieves the user ManagementConfiguration.", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ManagementConfigurationNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/ManagementConfiguration" - } - }, - "default": { - "schema": { - "$ref": "#/definitions/CodeMessageError" - }, - "description": "Error response definition." - } - } - } - }, - "/providers/Microsoft.OperationsManagement/operations": { - "get": { - "tags": [ - "Operations" - ], - "description": "Lists all of the available OperationsManagement Rest API operations.", - "operationId": "Operations_List", - "x-ms-examples": { - "OperationsList": { - "$ref": "./examples/OperationsList.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - } - }, - "definitions": { - "OperationListResult": { - "description": "Result of the request to list solution operations.", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "description": "List of solution operations supported by the OperationsManagement resource provider." - } - } - }, - "Operation": { - "description": "Supported operation of OperationsManagement resource provider.", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}", - "type": "string" - }, - "display": { - "description": "Display metadata associated with the operation.", - "properties": { - "provider": { - "description": "Service provider: Microsoft OperationsManagement.", - "type": "string" - }, - "resource": { - "description": "Resource on which the operation is performed etc.", - "type": "string" - }, - "operation": { - "description": "Type of operation: get, read, delete, etc.", - "type": "string" - } - } - } - } - }, - "SolutionProperties": { - "description": "Solution properties supported by the OperationsManagement resource provider.", - "properties": { - "workspaceResourceId": { - "type": "string", - "description": "The azure resourceId for the workspace where the solution will be deployed/enabled." - }, - "provisioningState": { - "type": "string", - "description": "The provisioning state for the solution.", - "readOnly": true - }, - "containedResources": { - "type": "array", - "items": { - "type": "string", - "description": "the azure resourceId of the resource." - }, - "description": "The azure resources that will be contained within the solutions. They will be locked and gets deleted automatically when the solution is deleted." - }, - "referencedResources": { - "type": "array", - "items": { - "type": "string", - "description": "the azure resourceId of the resource." - }, - "description": "The resources that will be referenced from this solution. Deleting any of those solution out of band will break the solution." - } - }, - "required": [ - "workspaceResourceId" - ], - "x-ms-azure-resource": true - }, - "ManagementAssociationProperties": { - "description": "ManagementAssociation properties supported by the OperationsManagement resource provider.", - "properties": { - "applicationId": { - "type": "string", - "description": "The applicationId of the appliance for this association." - } - }, - "required": [ - "applicationId" - ], - "x-ms-azure-resource": true - }, - "ManagementConfigurationProperties": { - "description": "ManagementConfiguration properties supported by the OperationsManagement resource provider.", - "properties": { - "applicationId": { - "type": "string", - "description": "The applicationId of the appliance for this Management." - }, - "parentResourceType": { - "type": "string", - "description": "The type of the parent resource." - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/definitions/ArmTemplateParameter" - }, - "description": "Parameters to run the ARM template" - }, - "provisioningState": { - "readOnly": true, - "type": "string", - "description": "The provisioning state for the ManagementConfiguration." - }, - "template": { - "type": "object", - "description": "The Json object containing the ARM template to deploy" - } - }, - "required": [ - "parameters", - "parentResourceType", - "template" - ], - "x-ms-azure-resource": true - }, - "SolutionPropertiesList": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Solution" - }, - "description": "List of solution properties within the subscription." - } - }, - "description": "the list of solution response" - }, - "ManagementAssociationPropertiesList": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/ManagementAssociation" - }, - "description": "List of Management Association properties within the subscription." - } - }, - "description": "the list of ManagementAssociation response" - }, - "ManagementConfigurationPropertiesList": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/ManagementConfiguration" - }, - "description": "List of Management Configuration properties within the subscription." - } - }, - "description": "the list of ManagementConfiguration response" - }, - "SolutionPlan": { - "description": "Plan for solution object supported by the OperationsManagement resource provider.", - "properties": { - "name": { - "type": "string", - "description": "name of the solution to be created. For Microsoft published solution it should be in the format of solutionType(workspaceName). SolutionType part is case sensitive. For third party solution, it can be anything." - }, - "publisher": { - "type": "string", - "description": "Publisher name. For gallery solution, it is Microsoft." - }, - "promotionCode": { - "type": "string", - "description": "promotionCode, Not really used now, can you left as empty" - }, - "product": { - "type": "string", - "description": "name of the solution to enabled/add. For Microsoft published gallery solution it should be in the format of OMSGallery/. This is case sensitive" - } - } - }, - "Solution": { - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Resource ID." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "Resource name." - }, - "type": { - "readOnly": true, - "type": "string", - "description": "Resource type." - }, - "location": { - "type": "string", - "description": "Resource location" - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" - }, - "plan": { - "description": "Plan for solution object supported by the OperationsManagement resource provider.", - "$ref": "#/definitions/SolutionPlan" - }, - "properties": { - "description": "Properties for solution object supported by the OperationsManagement resource provider.", - "$ref": "#/definitions/SolutionProperties" - } - }, - "description": "The container for solution.", - "x-ms-azure-resource": true - }, - "SolutionPatch": { - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" - } - }, - "description": "The properties of a Solution that can be patched.", - "x-ms-azure-resource": true - }, - "ManagementAssociation": { - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Resource ID." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "Resource name." - }, - "type": { - "readOnly": true, - "type": "string", - "description": "Resource type." - }, - "location": { - "type": "string", - "description": "Resource location" - }, - "properties": { - "description": "Properties for ManagementAssociation object supported by the OperationsManagement resource provider.", - "$ref": "#/definitions/ManagementAssociationProperties" - } - }, - "description": "The container for solution.", - "x-ms-azure-resource": true - }, - "ManagementConfiguration": { - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Resource ID." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "Resource name." - }, - "type": { - "readOnly": true, - "type": "string", - "description": "Resource type." - }, - "location": { - "type": "string", - "description": "Resource location" - }, - "properties": { - "description": "Properties for ManagementConfiguration object supported by the OperationsManagement resource provider.", - "$ref": "#/definitions/ManagementConfigurationProperties" - } - }, - "description": "The container for solution.", - "x-ms-azure-resource": true - }, - "ArmTemplateParameter": { - "description": "Parameter to pass to ARM template", - "properties": { - "name": { - "type": "string", - "description": "name of the parameter." - }, - "value": { - "type": "string", - "description": "value for the parameter. In Jtoken " - } - } - }, - "CodeMessageError": { - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "The error type." - }, - "message": { - "type": "string", - "description": "The error message." - } - }, - "description": "The error details for a failed request." - } - }, - "description": "The error body contract." - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "Client Api Version." - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The name of the resource group to get. The name is case insensitive.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 90 - }, - "SolutionNameParameter": { - "x-ms-parameter-location": "method", - "name": "solutionName", - "in": "path", - "required": true, - "type": "string", - "description": "User Solution Name." - }, - "ManagementAssociationNameParameter": { - "x-ms-parameter-location": "method", - "name": "managementAssociationName", - "in": "path", - "required": true, - "type": "string", - "description": "User ManagementAssociation Name." - }, - "ManagementConfigurationNameParameter": { - "x-ms-parameter-location": "method", - "name": "managementConfigurationName", - "in": "path", - "required": true, - "type": "string", - "description": "User Management Configuration Name." - }, - "ProviderNameParameter": { - "name": "providerName", - "in": "path", - "required": true, - "type": "string", - "description": "Provider name for the parent resource.", - "x-ms-parameter-location": "client" - }, - "ResourceTypeParameter": { - "name": "resourceType", - "in": "path", - "required": true, - "type": "string", - "description": "Resource type for the parent resource", - "x-ms-parameter-location": "client" - }, - "ResourceNameParameter": { - "name": "resourceName", - "in": "path", - "required": true, - "type": "string", - "description": "Parent resource name.", - "x-ms-parameter-location": "client" - } - } -} diff --git a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md index 0a92dd4ab8fb..0adc7044f6dc 100644 --- a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md +++ b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md @@ -1,6 +1,6 @@ --- Module Name: Az.MonitoringSolutions -Module Guid: 41f75f59-5fa3-44d9-827e-d16fd034356f +Module Guid: 97af14bb-dd33-4d43-9298-de0e1924c0b3 Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions Help Version: 1.0.0.0 Locale: en-US diff --git a/src/MonitoringSolutions/readme.md b/src/MonitoringSolutions/readme.md index 51fa43a65c6d..1dc8df7eec80 100644 --- a/src/MonitoringSolutions/readme.md +++ b/src/MonitoringSolutions/readme.md @@ -49,9 +49,11 @@ In this directory, run AutoRest: require: - $(this-folder)/../readme.azure.noprofile.md input-file: - - C:\Users\yeliu\isra-fel\azure-powershell\src\MonitoringSolutions\custom\OperationsManagement.json + # Some of the requests are not long running operation but are defined this way. Service team doesn't want to change the swagger, + # they said it's going to deprecate + # - C:\Users\yeliu\isra-fel\azure-powershell\src\MonitoringSolutions\custom\OperationsManagement.json # - $(repo)/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json - # - https://github.com/Azure/azure-rest-api-specs/blob/740a40ba31720ad514a308054ba517a8ea956a3c/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json + - https://github.com/Azure/azure-rest-api-specs/blob/740a40ba31720ad514a308054ba517a8ea956a3c/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json module-version: 0.1.0 title: MonitoringSolutions @@ -60,6 +62,19 @@ subject-prefix: MonitorLogAnalytics inlining-threshold: 40 directive: + # Fix error in swagger: these operations should not be long running + - from: swagger-document + where: $..put + transform: $['x-ms-long-running-operation'] = false + - from: swagger-document + where: $..patch + transform: $['x-ms-long-running-operation'] = false + - from: swagger-document + where: $..delete + transform: $['x-ms-long-running-operation'] = false + - from: swagger-document + where: $ + transform: return $.replace(/\"x-ms-long-running-operation\"\: true/g, ""x-ms-long-running-operation": false") # Remove the unexpanded parameter set - where: variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ From ff5dfb2ee532a3f4bbc9a5d2d03de221b5fe73c7 Mon Sep 17 00:00:00 2001 From: Yeming Liu Date: Wed, 24 Jun 2020 12:10:18 +0800 Subject: [PATCH 07/13] finalize readme.md --- src/MonitoringSolutions/readme.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/MonitoringSolutions/readme.md b/src/MonitoringSolutions/readme.md index 1dc8df7eec80..dbee3192e9a4 100644 --- a/src/MonitoringSolutions/readme.md +++ b/src/MonitoringSolutions/readme.md @@ -49,10 +49,6 @@ In this directory, run AutoRest: require: - $(this-folder)/../readme.azure.noprofile.md input-file: - # Some of the requests are not long running operation but are defined this way. Service team doesn't want to change the swagger, - # they said it's going to deprecate - # - C:\Users\yeliu\isra-fel\azure-powershell\src\MonitoringSolutions\custom\OperationsManagement.json - # - $(repo)/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json - https://github.com/Azure/azure-rest-api-specs/blob/740a40ba31720ad514a308054ba517a8ea956a3c/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json module-version: 0.1.0 @@ -62,19 +58,11 @@ subject-prefix: MonitorLogAnalytics inlining-threshold: 40 directive: - # Fix error in swagger: these operations should not be long running - - from: swagger-document - where: $..put - transform: $['x-ms-long-running-operation'] = false - - from: swagger-document - where: $..patch - transform: $['x-ms-long-running-operation'] = false - - from: swagger-document - where: $..delete - transform: $['x-ms-long-running-operation'] = false + # Fix error in swagger: PUT, PATCH, DELETE of solutions are not long running - from: swagger-document where: $ - transform: return $.replace(/\"x-ms-long-running-operation\"\: true/g, ""x-ms-long-running-operation": false") + # ": " is a special term in yaml, indicating a key-value pair. Needs to use ":\ " to prevent grammar error. + transform: return $.replace(/"x-ms-long-running-operation":\ true/g, "\"x-ms-long-running-operation\":\ false") # Remove the unexpanded parameter set - where: variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ From 4e8b6360cebe5e77cfde8b6000cf558d20ed63e0 Mon Sep 17 00:00:00 2001 From: "Lucas Yao (Wicresoft North America)" Date: Sun, 28 Jun 2020 13:55:13 +0800 Subject: [PATCH 08/13] Add test cases and example of monitor solutions. --- .../docs/Get-AzMonitorLogAnalyticsSolution.md | 43 +- .../docs/New-AzMonitorLogAnalyticsSolution.md | 20 +- .../Remove-AzMonitorLogAnalyticsSolution.md | 15 +- .../Update-AzMonitorLogAnalyticsSolution.md | 21 +- .../Get-AzMonitorLogAnalyticsSolution.md | 44 +- .../New-AzMonitorLogAnalyticsSolution.md | 20 +- .../Remove-AzMonitorLogAnalyticsSolution.md | 15 +- .../Update-AzMonitorLogAnalyticsSolution.md | 21 +- ...MonitorLogAnalyticsSolution.Recording.json | 209 +++++++ ...et-AzMonitorLogAnalyticsSolution.Tests.ps1 | 18 +- ...MonitorLogAnalyticsSolution.Recording.json | 39 ++ ...ew-AzMonitorLogAnalyticsSolution.Tests.ps1 | 8 +- ...MonitorLogAnalyticsSolution.Recording.json | 242 ++++++++ ...ve-AzMonitorLogAnalyticsSolution.Tests.ps1 | 15 +- ...MonitorLogAnalyticsSolution.Recording.json | 118 ++++ ...te-AzMonitorLogAnalyticsSolution.Tests.ps1 | 14 +- .../parameters.json | 9 + .../template.json | 574 ++++++++++++++++++ src/MonitoringSolutions/test/env.json | 9 + src/MonitoringSolutions/test/readme.md | 2 +- src/MonitoringSolutions/test/test-new.ps1 | 3 +- src/MonitoringSolutions/test/utils.ps1 | 37 ++ 22 files changed, 1411 insertions(+), 85 deletions(-) create mode 100644 src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Recording.json create mode 100644 src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Recording.json create mode 100644 src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Recording.json create mode 100644 src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Recording.json create mode 100644 src/MonitoringSolutions/test/deployment-templates/operational-insightsworkspace/parameters.json create mode 100644 src/MonitoringSolutions/test/deployment-templates/operational-insightsworkspace/template.json create mode 100644 src/MonitoringSolutions/test/env.json diff --git a/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md index 1e5fb7ef7373..bd3494a68116 100644 --- a/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md @@ -41,23 +41,50 @@ Retrieves the user solution. ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Get a monitor log analytics solution by name ```powershell -PS C:\> {{ Add code here }} +PS C:\> Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor -Name 'Containers(azureps-monitor)' -{{ Add output here }} +Name Type Location +---- ---- -------- +Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 ``` -{{ Add description here }} +This command gets a monitor log analytics solution by name. -### Example 2: {{ Add title here }} +### Example 2: Get a monitor log analytics solution by object ```powershell -PS C:\> {{ Add code here }} +PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor -Name 'Containers(azureps-monitor)' +PS C:\> Get-AzMonitorLogAnalyticsSolution -InputObject $monitor +Name Type Location +---- ---- -------- +Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 +``` + +This command gets a monitor log analytics solution by object. + +### Example 3: Get all monitor log analytics solutions under a resource group +```powershell +PS C:\> Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor + +Name Type Location +---- ---- -------- +Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 +``` + +This command gets all monitor log analytics solutions under a resource group. + +### Example 4: Get all monitor log analytics solutions under a subscription +```powershell +PS C:\> Get-AzMonitorLogAnalyticsSolution -{{ Add output here }} +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-t01) Microsoft.OperationsManagement/solutions East US +Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 ``` -{{ Add description here }} +This command gets all monitor log analytics solutions under a subscription. ## PARAMETERS diff --git a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md index 24f27dc9d282..650c37df2f8d 100644 --- a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md @@ -23,23 +23,17 @@ Creates a log analytics solution. ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Create a monitor log analytics solution for the log analytics workspace ```powershell -PS C:\> {{ Add code here }} +PS C:\> $workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName azureps-manual-test -Name monitoringworkspace-2vob7n +PS C:\> New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName azureps-manual-test -Location $workspace.Location -WorkspaceResourceId $workspace.ResourceId -{{ Add output here }} +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions East US ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` - -{{ Add description here }} +This command creates a monitor log analytics solution for the log analytics workspace. ## PARAMETERS diff --git a/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md index d77fb872596e..90764c858f41 100644 --- a/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md @@ -29,23 +29,22 @@ Deletes the solution in the subscription. ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Remove a monitor log analytics solution by name ```powershell -PS C:\> {{ Add code here }} +PS C:\> Remove-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-manual-test -Name 'Containers(monitoringworkspace-2vob7n)' -{{ Add output here }} ``` -{{ Add description here }} +This command removes a monitor log analytics solution by name. -### Example 2: {{ Add title here }} +### Example 2: Remove a monitor log analytics solution by object ```powershell -PS C:\> {{ Add code here }} +PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-manual-test -Name 'Containers(monitoringworkspace-pevful)' +PS C:\> Remove-AzMonitorLogAnalyticsSolution -InputObject $monitor -{{ Add output here }} ``` -{{ Add description here }} +This command removes a monitor log analytics solution by object. ## PARAMETERS diff --git a/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md index 4ddf806ea718..2b770e262d3e 100644 --- a/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md @@ -31,23 +31,28 @@ Only updating tags supported. ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Update a monitor log analytics solution by name ```powershell -PS C:\> {{ Add code here }} +PS C:\> Update-AzMonitorLogAnalyticsSolution -ResourceGroupName lucas-manual-test -Name 'Containers(monitoringworkspace-2vob7n)' -Tag @{'Operation'='update';'Param'='Tag'} -{{ Add output here }} +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions East US ``` -{{ Add description here }} +This command updates a monitor log analytics solution by name. -### Example 2: {{ Add title here }} +### Example 2: Update a monitor log analytics solution by object ```powershell -PS C:\> {{ Add code here }} +PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName lucas-manual-test -Name 'Containers(monitoringworkspace-2vob7n)' +PS C:\> Update-AzMonitorLogAnalyticsSolution -InputObject $monitor -Tag @{'Operation'='update';'Param'='Tag'} -{{ Add output here }} +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions East US ``` -{{ Add description here }} +This command updates a monitor log analytics solution by object. ## PARAMETERS diff --git a/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md index 093355d11d50..0c0c0794fd93 100644 --- a/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md @@ -1,18 +1,46 @@ -### Example 1: {{ Add title here }} +### Example 1: Get a monitor log analytics solution by name ```powershell -PS C:\> {{ Add code here }} +PS C:\> Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor -Name 'Containers(azureps-monitor)' -{{ Add output here }} +Name Type Location +---- ---- -------- +Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 ``` -{{ Add description here }} +This command gets a monitor log analytics solution by name. -### Example 2: {{ Add title here }} +### Example 2: Get a monitor log analytics solution by object ```powershell -PS C:\> {{ Add code here }} +PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor -Name 'Containers(azureps-monitor)' +PS C:\> Get-AzMonitorLogAnalyticsSolution -InputObject $monitor +Name Type Location +---- ---- -------- +Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 +``` + +This command gets a monitor log analytics solution by object. + +### Example 3: Get all monitor log analytics solutions under a resource group +```powershell +PS C:\> Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor + +Name Type Location +---- ---- -------- +Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 +``` + +This command gets all monitor log analytics solutions under a resource group. -{{ Add output here }} +### Example 4: Get all monitor log analytics solutions under a subscription +```powershell +PS C:\> Get-AzMonitorLogAnalyticsSolution + +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-t01) Microsoft.OperationsManagement/solutions East US +Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 ``` -{{ Add description here }} +This command gets all monitor log analytics solutions under a subscription. + diff --git a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md index 093355d11d50..cf0a9dbca136 100644 --- a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md @@ -1,18 +1,12 @@ -### Example 1: {{ Add title here }} +### Example 1: Create a monitor log analytics solution for the log analytics workspace ```powershell -PS C:\> {{ Add code here }} +PS C:\> $workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName azureps-manual-test -Name monitoringworkspace-2vob7n +PS C:\> New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName azureps-manual-test -Location $workspace.Location -WorkspaceResourceId $workspace.ResourceId -{{ Add output here }} +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions East US ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` - -{{ Add description here }} +This command creates a monitor log analytics solution for the log analytics workspace. diff --git a/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md index 093355d11d50..488e5a62274d 100644 --- a/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md @@ -1,18 +1,17 @@ -### Example 1: {{ Add title here }} +### Example 1: Remove a monitor log analytics solution by name ```powershell -PS C:\> {{ Add code here }} +PS C:\> Remove-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-manual-test -Name 'Containers(monitoringworkspace-2vob7n)' -{{ Add output here }} ``` -{{ Add description here }} +This command removes a monitor log analytics solution by name. -### Example 2: {{ Add title here }} +### Example 2: Remove a monitor log analytics solution by object ```powershell -PS C:\> {{ Add code here }} +PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-manual-test -Name 'Containers(monitoringworkspace-pevful)' +PS C:\> Remove-AzMonitorLogAnalyticsSolution -InputObject $monitor -{{ Add output here }} ``` -{{ Add description here }} +This command removes a monitor log analytics solution by object. diff --git a/src/MonitoringSolutions/examples/Update-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/Update-AzMonitorLogAnalyticsSolution.md index 093355d11d50..1c8593f10fd9 100644 --- a/src/MonitoringSolutions/examples/Update-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/Update-AzMonitorLogAnalyticsSolution.md @@ -1,18 +1,23 @@ -### Example 1: {{ Add title here }} +### Example 1: Update a monitor log analytics solution by name ```powershell -PS C:\> {{ Add code here }} +PS C:\> Update-AzMonitorLogAnalyticsSolution -ResourceGroupName lucas-manual-test -Name 'Containers(monitoringworkspace-2vob7n)' -Tag @{'Operation'='update';'Param'='Tag'} -{{ Add output here }} +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions East US ``` -{{ Add description here }} +This command updates a monitor log analytics solution by name. -### Example 2: {{ Add title here }} +### Example 2: Update a monitor log analytics solution by object ```powershell -PS C:\> {{ Add code here }} +PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName lucas-manual-test -Name 'Containers(monitoringworkspace-2vob7n)' +PS C:\> Update-AzMonitorLogAnalyticsSolution -InputObject $monitor -Tag @{'Operation'='update';'Param'='Tag'} -{{ Add output here }} +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions East US ``` -{{ Add description here }} +This command updates a monitor log analytics solution by object. diff --git a/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Recording.json b/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Recording.json new file mode 100644 index 000000000000..fa5f5a51050e --- /dev/null +++ b/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Recording.json @@ -0,0 +1,209 @@ +{ + "Get-AzMonitorLogAnalyticsSolution+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "6a0e32c5-f81d-4ce4-bd02-5c304e507aa5" ], + "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_List1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-original-request-ids": [ "f63a3fbb-ed4b-489a-a05c-eca427ad811c", "bda0d55f-555f-4ba4-90d3-3041913e7770" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "1515cb7f-1b2b-4d46-8fdd-29ba9b357a5d" ], + "x-ms-correlation-request-id": [ "1515cb7f-1b2b-4d46-8fdd-29ba9b357a5d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040101Z:1515cb7f-1b2b-4d46-8fdd-29ba9b357a5d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Sun, 28 Jun 2020 04:01:00 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ], + "Content-Length": [ "4039" ] + }, + "Content": "{\"value\":[{\"plan\":{\"name\":\"Containers(monitoringworkspace-t01)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Sun, 28 Jun 2020 03:13:17 GMT\",\"lastModifiedTime\":\"Sun, 28 Jun 2020 03:44:06 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01/views/Containers(monitoringworkspace-t01)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-t01)\",\"name\":\"Containers(monitoringworkspace-t01)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\",\"tags\":{\"key03\":\"3\",\"key01\":\"1\",\"key02\":\"2\"}},{\"plan\":{\"name\":\"Containers(monitoringworkspace-pevful)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-pevful\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Sun, 28 Jun 2020 03:55:57 GMT\",\"lastModifiedTime\":\"Sun, 28 Jun 2020 03:58:25 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-pevful/views/Containers(monitoringworkspace-pevful)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-pevful)\",\"name\":\"Containers(monitoringworkspace-pevful)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\",\"tags\":{\"key02\":\"2\",\"key01\":\"1\",\"key03\":\"3\"}},{\"plan\":{\"name\":\"Containers(monitoringworkspace-ab79hg)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Sun, 28 Jun 2020 04:00:57 GMT\",\"lastModifiedTime\":\"Sun, 28 Jun 2020 04:00:57 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\"name\":\"Containers(monitoringworkspace-ab79hg)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\"},{\"plan\":{\"name\":\"Containers(yemingmonitor)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonitor\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Mon, 08 Jun 2020 08:51:41 GMT\",\"lastModifiedTime\":\"Wed, 17 Jun 2020 08:19:49 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonitor/views/Containers(yemingmonitor)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/Microsoft.OperationsManagement/solutions/Containers(yemingmonitor)\",\"name\":\"Containers(yemingmonitor)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"West US 2\"}]}" + } + }, + "Get-AzMonitorLogAnalyticsSolution+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "9560bd01-7c7b-47c5-b4d4-7750d35a9633" ], + "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "3b6bdaee-5c5f-4d3b-9ea3-5446425ce34b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "03dd5ad8-0dfe-4a56-bfb8-522e20118d35" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040102Z:03dd5ad8-0dfe-4a56-bfb8-522e20118d35" ], + "Date": [ "Sun, 28 Jun 2020 04:01:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1154" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + } + }, + "Get-AzMonitorLogAnalyticsSolution+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "cd7f2b68-e92b-43be-a1a0-ab29988c9e23" ], + "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "1c9647eb-969c-4bd1-956d-b1d16b2d4235" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "5d844993-66d1-40c9-a810-9eb9b13a1487" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040102Z:5d844993-66d1-40c9-a810-9eb9b13a1487" ], + "Date": [ "Sun, 28 Jun 2020 04:01:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1263" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n }\r\n ]\r\n}" + } + }, + "Get-AzMonitorLogAnalyticsSolution+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "655cdc9c-94f4-4b63-a879-e2198c8c2ed7" ], + "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "d4c5ef34-ae85-4d3e-8066-d67b8264cf4a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "f6442330-6cb3-4fdc-b2f7-2859c3d4ebb1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040103Z:f6442330-6cb3-4fdc-b2f7-2859c3d4ebb1" ], + "Date": [ "Sun, 28 Jun 2020 04:01:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1154" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + } + }, + "Get-AzMonitorLogAnalyticsSolution+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)?api-version=2015-11-01-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "8521dbe0-3690-4536-96ab-1b14bf382e10" ], + "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "dd855985-6c8b-41b5-ab95-8a4ee12db4a4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "2bbbf8c4-312f-40ad-b564-eff7aa4aa23e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040103Z:2bbbf8c4-312f-40ad-b564-eff7aa4aa23e" ], + "Date": [ "Sun, 28 Jun 2020 04:01:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1154" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + } + } +} \ No newline at end of file diff --git a/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Tests.ps1 b/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Tests.ps1 index 496d4e060dad..697f94cdc4ff 100644 --- a/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Tests.ps1 +++ b/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Tests.ps1 @@ -1,3 +1,8 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMonitorLogAnalyticsSolution.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { @@ -8,18 +13,23 @@ while(-not $mockingPath) { Describe 'Get-AzMonitorLogAnalyticsSolution' { It 'List1' { - { throw [System.NotImplementedException] } | Should -Not -Throw + $monitorList = Get-AzMonitorLogAnalyticsSolution + $monitorList.Count | Should -BeGreaterOrEqual 1 } It 'Get' { - { throw [System.NotImplementedException] } | Should -Not -Throw + $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName $env.resourceGroup -Name $env.monitorName01 + $monitor.Name | Should -Be $env.monitorName01 } It 'List' { - { throw [System.NotImplementedException] } | Should -Not -Throw + $monitorList = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName $env.resourceGroup + $monitorList.Count | Should -Be 1 } It 'GetViaIdentity' { - { throw [System.NotImplementedException] } | Should -Not -Throw + $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName $env.resourceGroup -Name $env.monitorName01 + $newMonitor = Get-AzMonitorLogAnalyticsSolution -InputObject $monitor + $newMonitor.Name | Should -Be $env.monitorName01 } } diff --git a/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Recording.json b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Recording.json new file mode 100644 index 000000000000..5b913e03bd09 --- /dev/null +++ b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Recording.json @@ -0,0 +1,39 @@ +{ + "New-AzMonitorLogAnalyticsSolution+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview", + "Content": "{\n \"plan\": {\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\n \"product\": \"OMSGallery/Containers\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\"\n },\n \"location\": \"eastus\"\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "418" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "6c130007-e588-4b39-8a3a-68ae31d968e2" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "29b2a645-999c-4ab6-aade-eb9c42f4fe63" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040108Z:29b2a645-999c-4ab6-aade-eb9c42f4fe63" ], + "Date": [ "Sun, 28 Jun 2020 04:01:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1154" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-sfcz4y/views/Containers(monitoringworkspace-sfcz4y)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)\",\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + } + } +} \ No newline at end of file diff --git a/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 index 53d0145245ae..c38c31c4a4fc 100644 --- a/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 +++ b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 @@ -1,3 +1,8 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzMonitorLogAnalyticsSolution.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { @@ -8,6 +13,7 @@ while(-not $mockingPath) { Describe 'New-AzMonitorLogAnalyticsSolution' { It 'CreateExpanded' { - { throw [System.NotImplementedException] } | Should -Not -Throw + $monitor = New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName $env.resourceGroup -Location $env.location -WorkspaceResourceId $env.workspaceResourceId02 + $monitor.ProvisioningState | Should -Be 'Succeeded' } } diff --git a/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Recording.json b/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Recording.json new file mode 100644 index 000000000000..ee7780acdb90 --- /dev/null +++ b/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Recording.json @@ -0,0 +1,242 @@ +{ + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview", + "Content": "{\n \"plan\": {\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\n \"product\": \"OMSGallery/Containers\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\"\n },\n \"location\": \"eastus\"\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "418" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "cffcb6ff-6496-4e5e-a57a-fcb1d251739c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-correlation-request-id": [ "a1f5951b-9eee-449a-be98-990c66393e51" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040109Z:a1f5951b-9eee-449a-be98-990c66393e51" ], + "Date": [ "Sun, 28 Jun 2020 04:01:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1154" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-sfcz4y/views/Containers(monitoringworkspace-sfcz4y)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)\",\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + } + }, + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "531b60fd-f1e3-4020-b64e-b5d4909574cb" ], + "CommandName": [ "Remove-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Remove-AzMonitorLogAnalyticsSolution_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "29efc3b3-868d-4c55-8e30-9474f0134187" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "afb6dea6-2705-4511-9561-342a357a6eff" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040113Z:afb6dea6-2705-4511-9561-342a357a6eff" ], + "Date": [ "Sun, 28 Jun 2020 04:01:12 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "3e0ee419-7ec4-4393-bccf-1e1fa4008933" ], + "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "d02f9df7-80be-469e-a10c-57352dd830a2" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-correlation-request-id": [ "9083eebb-d031-4f51-b86c-aeb061cb9ac8" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040114Z:9083eebb-d031-4f51-b86c-aeb061cb9ac8" ], + "Date": [ "Sun, 28 Jun 2020 04:01:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1263" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n }\r\n ]\r\n}" + } + }, + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview", + "Content": "{\n \"plan\": {\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\n \"product\": \"OMSGallery/Containers\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\"\n },\n \"location\": \"eastus\"\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "418" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "cbda6c44-9333-4496-a053-4c3c7c15135a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-correlation-request-id": [ "bb726185-17a0-4d39-b8d9-268a49a34b85" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040117Z:bb726185-17a0-4d39-b8d9-268a49a34b85" ], + "Date": [ "Sun, 28 Jun 2020 04:01:16 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1154" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-sfcz4y/views/Containers(monitoringworkspace-sfcz4y)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)\",\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + } + }, + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)?api-version=2015-11-01-preview+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "bac383f0-878a-4102-9cf2-91b27000881e" ], + "CommandName": [ "Remove-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Remove-AzMonitorLogAnalyticsSolution_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "d66fc4b4-9200-4da5-b42c-66dc015bf833" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-correlation-request-id": [ "d418cc4b-14ae-452c-83e3-f74130610756" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040120Z:d418cc4b-14ae-452c-83e3-f74130610756" ], + "Date": [ "Sun, 28 Jun 2020 04:01:19 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "62de2d6a-1eab-49af-9f7d-6ff482b9dc05" ], + "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "134d90f6-a1e8-4c06-bcd2-ee63bf8293f8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-correlation-request-id": [ "c4654d5f-d4fa-475b-a0d8-04eaaca1f885" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040120Z:c4654d5f-d4fa-475b-a0d8-04eaaca1f885" ], + "Date": [ "Sun, 28 Jun 2020 04:01:19 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1263" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n }\r\n ]\r\n}" + } + } +} \ No newline at end of file diff --git a/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Tests.ps1 b/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Tests.ps1 index 3810ae71f342..bd54d21d8f65 100644 --- a/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Tests.ps1 +++ b/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Tests.ps1 @@ -1,3 +1,8 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzMonitorLogAnalyticsSolution.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { @@ -8,10 +13,16 @@ while(-not $mockingPath) { Describe 'Remove-AzMonitorLogAnalyticsSolution' { It 'Delete' { - { throw [System.NotImplementedException] } | Should -Not -Throw + $monitor = New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName $env.resourceGroup -Location $env.location -WorkspaceResourceId $env.workspaceResourceId02 + Remove-AzMonitorLogAnalyticsSolution -ResourceGroupName $env.resourceGroup -Name $monitor.Name + $monitorList = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName $env.resourceGroup + $monitorList.Name | Should -Not -Contain $monitor.Name } It 'DeleteViaIdentity' { - { throw [System.NotImplementedException] } | Should -Not -Throw + $monitor = New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName $env.resourceGroup -Location $env.location -WorkspaceResourceId $env.workspaceResourceId02 + Remove-AzMonitorLogAnalyticsSolution -InputObject $monitor + $monitorList = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName $env.resourceGroup + $monitorList.Name | Should -Not -Contain $monitor.Name } } diff --git a/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Recording.json b/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Recording.json new file mode 100644 index 000000000000..3f2cd0299cec --- /dev/null +++ b/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Recording.json @@ -0,0 +1,118 @@ +{ + "Update-AzMonitorLogAnalyticsSolution+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview", + "Content": "{\n \"tags\": {\n \"key01\": \"1\",\n \"key02\": \"2\"\n }\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "54" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "e2326545-4241-4c35-9a2e-90eb2d9d5170" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "x-ms-correlation-request-id": [ "c6262317-dac9-4ba0-b1b4-0864cbeb4b10" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040122Z:c6262317-dac9-4ba0-b1b4-0864cbeb4b10" ], + "Date": [ "Sun, 28 Jun 2020 04:01:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1210" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\",\r\n \"tags\": {\r\n \"key01\": \"1\",\r\n \"key02\": \"2\"\r\n }\r\n}" + } + }, + "Update-AzMonitorLogAnalyticsSolution+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "e35fc5e8-42e7-4834-891a-a0124c9077c5" ], + "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], + "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "3bfc1fd9-aae1-42b8-a36b-8f0b60456494" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-correlation-request-id": [ "700be5dc-b753-4ac3-9dfe-27cc89f487f2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040123Z:700be5dc-b753-4ac3-9dfe-27cc89f487f2" ], + "Date": [ "Sun, 28 Jun 2020 04:01:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1210" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:01:21 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\",\r\n \"tags\": {\r\n \"key01\": \"1\",\r\n \"key02\": \"2\"\r\n }\r\n}" + } + }, + "Update-AzMonitorLogAnalyticsSolution+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)?api-version=2015-11-01-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)?api-version=2015-11-01-preview", + "Content": "{\n \"tags\": {\n \"key02\": \"2\",\n \"key03\": \"3\",\n \"key01\": \"1\"\n }\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "72" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "80609eea-8b58-44df-b426-39f35fff1724" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "x-ms-correlation-request-id": [ "6db34858-36c1-4873-ad33-67ff91ac8572" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040125Z:6db34858-36c1-4873-ad33-67ff91ac8572" ], + "Date": [ "Sun, 28 Jun 2020 04:01:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1229" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:01:21 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\",\r\n \"tags\": {\r\n \"key02\": \"2\",\r\n \"key03\": \"3\",\r\n \"key01\": \"1\"\r\n }\r\n}" + } + } +} \ No newline at end of file diff --git a/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Tests.ps1 b/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Tests.ps1 index 89e1cb5b013c..9d63f1f3b306 100644 --- a/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Tests.ps1 +++ b/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Tests.ps1 @@ -1,3 +1,8 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzMonitorLogAnalyticsSolution.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { @@ -8,10 +13,15 @@ while(-not $mockingPath) { Describe 'Update-AzMonitorLogAnalyticsSolution' { It 'UpdateExpanded' { - { throw [System.NotImplementedException] } | Should -Not -Throw + $tag = @{'key01' = 1; 'key02' = 2} + $monitor = Update-AzMonitorLogAnalyticsSolution -ResourceGroupName $env.resourceGroup -Name $env.monitorName01 -Tag $tag + $monitor.Tag.Count | Should -Be 2 } It 'UpdateViaIdentityExpanded' { - { throw [System.NotImplementedException] } | Should -Not -Throw + $tag = @{'key01' = 1; 'key02' = 2; 'key03' = 3} + $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName $env.resourceGroup -Name $env.monitorName01 + $newMonitor = Update-AzMonitorLogAnalyticsSolution -InputObject $monitor -Tag $tag + $newMonitor.Tag.Count | Should -Be 3 } } diff --git a/src/MonitoringSolutions/test/deployment-templates/operational-insightsworkspace/parameters.json b/src/MonitoringSolutions/test/deployment-templates/operational-insightsworkspace/parameters.json new file mode 100644 index 000000000000..abd6820e0930 --- /dev/null +++ b/src/MonitoringSolutions/test/deployment-templates/operational-insightsworkspace/parameters.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "workspaces_yemingmonitor_name": { + "value": "lucasmonitor" + } + } +} \ No newline at end of file diff --git a/src/MonitoringSolutions/test/deployment-templates/operational-insightsworkspace/template.json b/src/MonitoringSolutions/test/deployment-templates/operational-insightsworkspace/template.json new file mode 100644 index 000000000000..06bbbc910147 --- /dev/null +++ b/src/MonitoringSolutions/test/deployment-templates/operational-insightsworkspace/template.json @@ -0,0 +1,574 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "workspaces_yemingmonitor_name": { + "defaultValue": "lucasmonitor", + "type": "String" + } + }, + "variables": {}, + "resources": [ + { + "type": "microsoft.operationalinsights/workspaces", + "apiVersion": "2020-03-01-preview", + "name": "[parameters('workspaces_yemingmonitor_name')]", + "location": "westus2", + "properties": { + "provisioningState": "Succeeded", + "sku": { + "name": "pergb2018" + }, + "retentionInDays": 30, + "publicNetworkAccessForIngestion": "Enabled", + "publicNetworkAccessForQuery": "Enabled" + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_General|AlphabeticallySortedComputers')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "All Computers with their most recent data", + "category": "General Exploration", + "query": "search not(ObjectName == \"Advisor Metrics\" or ObjectName == \"ManagedSpace\") | summarize AggregatedValue = max(TimeGenerated) by Computer | limit 500000 | sort by Computer asc\r\n// Oql: NOT(ObjectName=\"Advisor Metrics\" OR ObjectName=ManagedSpace) | measure max(TimeGenerated) by Computer | top 500000 | Sort Computer // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_General|dataPointsPerManagementGroup')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Which Management Group is generating the most data points?", + "category": "General Exploration", + "query": "search * | summarize AggregatedValue = count() by ManagementGroupName\r\n// Oql: * | Measure count() by ManagementGroupName // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_General|dataTypeDistribution')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Distribution of data Types", + "category": "General Exploration", + "query": "search * | extend Type = $table | summarize AggregatedValue = count() by Type\r\n// Oql: * | Measure count() by Type // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_General|StaleComputers')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Stale Computers (data older than 24 hours)", + "category": "General Exploration", + "query": "search not(ObjectName == \"Advisor Metrics\" or ObjectName == \"ManagedSpace\") | summarize lastdata = max(TimeGenerated) by Computer | limit 500000 | where lastdata < ago(24h)\r\n// Oql: NOT(ObjectName=\"Advisor Metrics\" OR ObjectName=ManagedSpace) | measure max(TimeGenerated) as lastdata by Computer | top 500000 | where lastdata < NOW-24HOURS // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|AllEvents')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "All Events", + "category": "Log Management", + "query": "Event | sort by TimeGenerated desc\r\n// Oql: Type=Event // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|AllSyslog')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "All Syslogs", + "category": "Log Management", + "query": "Syslog | sort by TimeGenerated desc\r\n// Oql: Type=Syslog // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|AllSyslogByFacility')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "All Syslog Records grouped by Facility", + "category": "Log Management", + "query": "Syslog | summarize AggregatedValue = count() by Facility\r\n// Oql: Type=Syslog | Measure count() by Facility // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|AllSyslogByProcessName')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "All Syslog Records grouped by ProcessName", + "category": "Log Management", + "query": "Syslog | summarize AggregatedValue = count() by ProcessName\r\n// Oql: Type=Syslog | Measure count() by ProcessName // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|AllSyslogsWithErrors')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "All Syslog Records with Errors", + "category": "Log Management", + "query": "Syslog | where SeverityLevel == \"error\" | sort by TimeGenerated desc\r\n// Oql: Type=Syslog SeverityLevel=error // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|AverageHTTPRequestTimeByClientIPAddress')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Average HTTP Request time by Client IP Address", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = avg(TimeTaken) by cIP\r\n// Oql: Type=W3CIISLog | Measure Avg(TimeTaken) by cIP // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|AverageHTTPRequestTimeHTTPMethod')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Average HTTP Request time by HTTP Method", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = avg(TimeTaken) by csMethod\r\n// Oql: Type=W3CIISLog | Measure Avg(TimeTaken) by csMethod // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|CountIISLogEntriesClientIPAddress')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of IIS Log Entries by Client IP Address", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = count() by cIP\r\n// Oql: Type=W3CIISLog | Measure count() by cIP // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|CountIISLogEntriesHTTPRequestMethod')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of IIS Log Entries by HTTP Request Method", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = count() by csMethod\r\n// Oql: Type=W3CIISLog | Measure count() by csMethod // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|CountIISLogEntriesHTTPUserAgent')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of IIS Log Entries by HTTP User Agent", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = count() by csUserAgent\r\n// Oql: Type=W3CIISLog | Measure count() by csUserAgent // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|CountOfIISLogEntriesByHostRequestedByClient')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of IIS Log Entries by Host requested by client", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = count() by csHost\r\n// Oql: Type=W3CIISLog | Measure count() by csHost // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|CountOfIISLogEntriesByURLForHost')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of IIS Log Entries by URL for the host \"www.contoso.com\" (replace with your own)", + "category": "Log Management", + "query": "search csHost == \"www.contoso.com\" | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = count() by csUriStem\r\n// Oql: Type=W3CIISLog csHost=\"www.contoso.com\" | Measure count() by csUriStem // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|CountOfIISLogEntriesByURLRequestedByClient')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of IIS Log Entries by URL requested by client (without query strings)", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = count() by csUriStem\r\n// Oql: Type=W3CIISLog | Measure count() by csUriStem // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|CountOfWarningEvents')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of Events with level \"Warning\" grouped by Event ID", + "category": "Log Management", + "query": "Event | where EventLevelName == \"warning\" | summarize AggregatedValue = count() by EventID\r\n// Oql: Type=Event EventLevelName=warning | Measure count() by EventID // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|DisplayBreakdownRespondCodes')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Shows breakdown of response codes", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = count() by scStatus\r\n// Oql: Type=W3CIISLog | Measure count() by scStatus // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|EventsByEventLog')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of Events grouped by Event Log", + "category": "Log Management", + "query": "Event | summarize AggregatedValue = count() by EventLog\r\n// Oql: Type=Event | Measure count() by EventLog // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|EventsByEventsID')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of Events grouped by Event ID", + "category": "Log Management", + "query": "Event | summarize AggregatedValue = count() by EventID\r\n// Oql: Type=Event | Measure count() by EventID // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|EventsByEventSource')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of Events grouped by Event Source", + "category": "Log Management", + "query": "Event | summarize AggregatedValue = count() by Source\r\n// Oql: Type=Event | Measure count() by Source // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|EventsInOMBetween2000to3000')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Events in the Operations Manager Event Log whose Event ID is in the range between 2000 and 3000", + "category": "Log Management", + "query": "Event | where EventLog == \"Operations Manager\" and EventID >= 2000 and EventID <= 3000 | sort by TimeGenerated desc\r\n// Oql: Type=Event EventLog=\"Operations Manager\" EventID:[2000..3000] // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|EventsWithStartedinEventID')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Count of Events containing the word \"started\" grouped by EventID", + "category": "Log Management", + "query": "search in (Event) \"started\" | summarize AggregatedValue = count() by EventID\r\n// Oql: Type=Event \"started\" | Measure count() by EventID // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|FindMaximumTimeTakenForEachPage')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Find the maximum time taken for each page", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = max(TimeTaken) by csUriStem\r\n// Oql: Type=W3CIISLog | Measure Max(TimeTaken) by csUriStem // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|IISLogEntriesForClientIP')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "IIS Log Entries for a specific client IP Address (replace with your own)", + "category": "Log Management", + "query": "search cIP == \"192.168.0.1\" | extend Type = $table | where Type == W3CIISLog | sort by TimeGenerated desc | project csUriStem, scBytes, csBytes, TimeTaken, scStatus\r\n// Oql: Type=W3CIISLog cIP=\"192.168.0.1\" | Select csUriStem,scBytes,csBytes,TimeTaken,scStatus // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|ListAllIISLogEntries')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "All IIS Log Entries", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | sort by TimeGenerated desc\r\n// Oql: Type=W3CIISLog // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|NoOfConnectionsToOMSDKService')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "How many connections to Operations Manager's SDK service by day", + "category": "Log Management", + "query": "Event | where EventID == 26328 and EventLog == \"Operations Manager\" | summarize AggregatedValue = count() by bin(TimeGenerated, 1d) | sort by TimeGenerated desc\r\n// Oql: Type=Event EventID=26328 EventLog=\"Operations Manager\" | Measure count() interval 1DAY // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|ServerRestartTime')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "When did my servers initiate restart?", + "category": "Log Management", + "query": "search in (Event) \"shutdown\" and EventLog == \"System\" and Source == \"User32\" and EventID == 1074 | sort by TimeGenerated desc | project TimeGenerated, Computer\r\n// Oql: shutdown Type=Event EventLog=System Source=User32 EventID=1074 | Select TimeGenerated,Computer // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|Show404PagesList')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Shows which pages people are getting a 404 for", + "category": "Log Management", + "query": "search scStatus == 404 | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = count() by csUriStem\r\n// Oql: Type=W3CIISLog scStatus=404 | Measure count() by csUriStem // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|ShowServersThrowingInternalServerError')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Shows servers that are throwing internal server error", + "category": "Log Management", + "query": "search scStatus == 500 | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = count() by sComputerName\r\n// Oql: Type=W3CIISLog scStatus=500 | Measure count() by sComputerName // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|TotalBytesReceivedByEachAzureRoleInstance')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Total Bytes received by each Azure Role Instance", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = sum(csBytes) by RoleInstance\r\n// Oql: Type=W3CIISLog | Measure Sum(csBytes) by RoleInstance // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|TotalBytesReceivedByEachIISComputer')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Total Bytes received by each IIS Computer", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = sum(csBytes) by Computer | limit 500000\r\n// Oql: Type=W3CIISLog | Measure Sum(csBytes) by Computer | top 500000 // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|TotalBytesRespondedToClientsByClientIPAddress')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Total Bytes responded back to clients by Client IP Address", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = sum(scBytes) by cIP\r\n// Oql: Type=W3CIISLog | Measure Sum(scBytes) by cIP // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|TotalBytesRespondedToClientsByEachIISServerIPAddress')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Total Bytes responded back to clients by each IIS ServerIP Address", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = sum(scBytes) by sIP\r\n// Oql: Type=W3CIISLog | Measure Sum(scBytes) by sIP // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|TotalBytesSentByClientIPAddress')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Total Bytes sent by Client IP Address", + "category": "Log Management", + "query": "search * | extend Type = $table | where Type == W3CIISLog | summarize AggregatedValue = sum(csBytes) by cIP\r\n// Oql: Type=W3CIISLog | Measure Sum(csBytes) by cIP // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PEF: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|WarningEvents')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "All Events with level \"Warning\"", + "category": "Log Management", + "query": "Event | where EventLevelName == \"warning\" | sort by TimeGenerated desc\r\n// Oql: Type=Event EventLevelName=warning // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|WindowsFireawallPolicySettingsChanged')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "Windows Firewall Policy settings have changed", + "category": "Log Management", + "query": "Event | where EventLog == \"Microsoft-Windows-Windows Firewall With Advanced Security/Firewall\" and EventID == 2008 | sort by TimeGenerated desc\r\n// Oql: Type=Event EventLog=\"Microsoft-Windows-Windows Firewall With Advanced Security/Firewall\" EventID=2008 // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + }, + { + "type": "Microsoft.OperationalInsights/workspaces/savedSearches", + "apiVersion": "2020-03-01-preview", + "name": "[concat(parameters('workspaces_yemingmonitor_name'), '/LogManagement(', parameters('workspaces_yemingmonitor_name'), ')_LogManagement|WindowsFireawallPolicySettingsChangedByMachines')]", + "dependsOn": [ + "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_yemingmonitor_name'))]" + ], + "properties": { + "displayName": "On which machines and how many times have Windows Firewall Policy settings changed", + "category": "Log Management", + "query": "Event | where EventLog == \"Microsoft-Windows-Windows Firewall With Advanced Security/Firewall\" and EventID == 2008 | summarize AggregatedValue = count() by Computer | limit 500000\r\n// Oql: Type=Event EventLog=\"Microsoft-Windows-Windows Firewall With Advanced Security/Firewall\" EventID=2008 | measure count() by Computer | top 500000 // Args: {OQ: True; WorkspaceId: 00000000-0000-0000-0000-000000000000} // Settings: {PTT: True; SortI: True; SortF: True} // Version: 0.1.122", + "version": 2 + } + } + ] +} \ No newline at end of file diff --git a/src/MonitoringSolutions/test/env.json b/src/MonitoringSolutions/test/env.json new file mode 100644 index 000000000000..160b07b71f53 --- /dev/null +++ b/src/MonitoringSolutions/test/env.json @@ -0,0 +1,9 @@ +{ + "monitorName01": "Containers(monitoringworkspace-ab79hg)", + "workspaceResourceId01": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg", + "location": "eastus", + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", + "resourceGroup": "monitoringsolutions-rg-253bym", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "workspaceResourceId02": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y" +} diff --git a/src/MonitoringSolutions/test/readme.md b/src/MonitoringSolutions/test/readme.md index 7c752b4c8c43..1969200c6a09 100644 --- a/src/MonitoringSolutions/test/readme.md +++ b/src/MonitoringSolutions/test/readme.md @@ -1,5 +1,5 @@ # Test -This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `../custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. ## Info - Modifiable: yes diff --git a/src/MonitoringSolutions/test/test-new.ps1 b/src/MonitoringSolutions/test/test-new.ps1 index f6fd7bb89661..863d95f5490e 100644 --- a/src/MonitoringSolutions/test/test-new.ps1 +++ b/src/MonitoringSolutions/test/test-new.ps1 @@ -6,9 +6,10 @@ $workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName yemingmonitor -Name yemingmonitor +# $workspace.ResourceId = /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonito New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName yemingmonitor -Location $workspace.location -WorkspaceResourceId $workspace.ResourceId -# Name Type Location +# Name Type Location # ---- ---- -------- # Containers(yemingmonitor) Microsoft.OperationsManagement/solutions West US 2 diff --git a/src/MonitoringSolutions/test/utils.ps1 b/src/MonitoringSolutions/test/utils.ps1 index 8876c288462c..291637f81bbe 100644 --- a/src/MonitoringSolutions/test/utils.ps1 +++ b/src/MonitoringSolutions/test/utils.ps1 @@ -9,9 +9,45 @@ $env = @{} function setupEnv() { # Preload subscriptionId and tenant from context, which will be used in test # as default. You could change them if needed. + Write-Host -ForegroundColor Yellow "Required Az.OperationalInsights, please check if Az.OperationalInsights installed" $env.SubscriptionId = (Get-AzContext).Subscription.Id $env.Tenant = (Get-AzContext).Tenant.Id + $env.location = 'eastus' # For any resources you created for test, you should add it to $env here. + #Generate some random strings for use in the test. + $rstr1 = RandomString -allChars $false -len 6 + $rstr2 = RandomString -allChars $false -len 6 + $rstr3 = RandomString -allChars $false -len 6 + + #Create the test group. + Write-Host -ForegroundColor Green 'Create test group' + $resourceGroup = 'monitoringsolutions-rg-' + $rstr1 + New-AzResourceGroup -Name $resourceGroup -Location $env.location + $null = $env.Add('resourceGroup', $resourceGroup) + Write-Host -ForegroundColor Green 'The test group created successfully' + + # Deploy operational insights workspace + Write-Host -ForegroundColor Green 'Deploying operational insights workspace' + $workspacesName01 = 'monitoringworkspace-' + (RandomString -allChars $false -len 6) + $workspacesName02 = 'monitoringworkspace-' + (RandomString -allChars $false -len 6) + <# Deploy failed, azure portal responsed error message: "statusMessage": "{\"error\":{\"code\":\"InvalidRequestContent\",\"message\":\"The request content was invalid and could not be deserialized: 'Error converting value \\\"insights-jxvq9o\\\" to type 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Data.Definitions.DeploymentParameterDefinition'. Path 'properties.parameters.workspaces_name', line 5, position 42.'.\"}}", + $workspacesParam = Get-Content .\test\deployment-templates\operational-insightsworkspace\parameters.json | ConvertFrom-Json + $workspacesParam.parameters.workspaces_yemingmonitor_name = 'lucasmonitor' + set-content -Path .\test\deployment-templates\operational-insightsworkspace\parameters.json -Value (ConvertTo-Json $workspacesParam) + New-AzDeployment -Mode Incremental -TemplateFile .\test\deployment-templates\operational-insightsworkspace\template.json -TemplateParameterFile .\test\deployment-templates\operational-insightsworkspace\parameters.json -ResourceGroupName $env.resourceGroup + #> + $workspace01 = New-AzOperationalInsightsWorkspace -ResourceGroupName $env.resourceGroup -Name $workspacesName01 -Location $env.location -Sku "Standard" + $workspace02 = New-AzOperationalInsightsWorkspace -ResourceGroupName $env.resourceGroup -Name $workspacesName02 -Location $env.location -Sku "Standard" + $null = $env.Add('workspaceResourceId01', $workspace01.ResourceId) + $null = $env.Add('workspaceResourceId02', $workspace02.ResourceId) + Write-Host -ForegroundColor Green 'The operational insights workspace deployed successfully' + + # Create monitor log analytics for test. + Write-Host -ForegroundColor Green 'create monitor log analytics' + $monitor = New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName $env.resourceGroup -Location $env.location -WorkspaceResourceId $env.workspaceResourceId01 + $env.Add('monitorName01', $monitor.Name) + Write-Host -ForegroundColor Green 'The monitor log analytics created successfully' + $envFile = 'env.json' if ($TestMode -eq 'live') { $envFile = 'localEnv.json' @@ -20,5 +56,6 @@ function setupEnv() { } function cleanupEnv() { # Clean resources you create for testing + Remove-AzResourceGroup -Name $env.resourceGroup } From 115f6351f1d1d3e1caeedab7b82a79f203c6ac20 Mon Sep 17 00:00:00 2001 From: LucasYao93 <53558334+LucasYao93@users.noreply.github.com> Date: Tue, 30 Jun 2020 16:36:25 +0800 Subject: [PATCH 09/13] Modified test cases and examples. --- .../docs/Get-AzMonitorLogAnalyticsSolution.md | 20 ++- .../docs/New-AzMonitorLogAnalyticsSolution.md | 21 +++ .../Remove-AzMonitorLogAnalyticsSolution.md | 8 ++ .../Get-AzMonitorLogAnalyticsSolution.md | 20 ++- .../New-AzMonitorLogAnalyticsSolution.md | 24 ++++ .../Remove-AzMonitorLogAnalyticsSolution.md | 8 ++ ...MonitorLogAnalyticsSolution.Recording.json | 90 ++++++------ ...MonitorLogAnalyticsSolution.Recording.json | 129 ++++++++++++++++-- ...ew-AzMonitorLogAnalyticsSolution.Tests.ps1 | 9 ++ ...MonitorLogAnalyticsSolution.Recording.json | 112 +++++++-------- ...MonitorLogAnalyticsSolution.Recording.json | 56 ++++---- src/MonitoringSolutions/test/env.json | 10 +- src/MonitoringSolutions/test/test-new.ps1 | 16 --- 13 files changed, 356 insertions(+), 167 deletions(-) delete mode 100644 src/MonitoringSolutions/test/test-new.ps1 diff --git a/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md index bd3494a68116..8b52424e9f34 100644 --- a/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Get-AzMonitorLogAnalyticsSolution.md @@ -52,9 +52,21 @@ Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 This command gets a monitor log analytics solution by name. -### Example 2: Get a monitor log analytics solution by object +### Example 2: Get a monitor log analytics solution by resource id ```powershell -PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor -Name 'Containers(azureps-monitor)' +PS C:\> @{Id = "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/azureps-manual-test/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-t01)"} | Get-AzMonitorLogAnalyticsSolution + +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-t01) Microsoft.OperationsManagement/solutions East US +``` + +This command gets a monitor log analytics solution by resource id. + +### Example 3: Get a monitor log analytics solution by object +```powershell + +PS C:\> $monitor = New-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor -Name 'Containers(azureps-monitor)' PS C:\> Get-AzMonitorLogAnalyticsSolution -InputObject $monitor Name Type Location ---- ---- -------- @@ -63,7 +75,7 @@ Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 This command gets a monitor log analytics solution by object. -### Example 3: Get all monitor log analytics solutions under a resource group +### Example 4: Get all monitor log analytics solutions under a resource group ```powershell PS C:\> Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor @@ -74,7 +86,7 @@ Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 This command gets all monitor log analytics solutions under a resource group. -### Example 4: Get all monitor log analytics solutions under a subscription +### Example 5: Get all monitor log analytics solutions under a subscription ```powershell PS C:\> Get-AzMonitorLogAnalyticsSolution diff --git a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md index 650c37df2f8d..2a08cb993d53 100644 --- a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md @@ -35,6 +35,27 @@ Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions This command creates a monitor log analytics solution for the log analytics workspace. +Parameter Type support value list + +| Type | Description | +| :-----| :----- | +| SecurityCenterFree | Azure Security Center – Free Edition | +| Security | Azure Security Center | +| Updates | Update Management | +| ContainerInsights | Azure Monitor for Containers | +| ServiceMap | Service Map | +| AzureActivity | Activity log analytics | +| ChangeTracking | Change tracking and inventory | +| VMInsights | Azure Monitor for VMs | +| SecurityInsights | Azure Sentinel | +| NetworkMonitoring | Network Performance Monitor | +| SQLVulnerabilityAssessment | SQL Vulnerability Assessment | +| SQLAdvancedThreatProtection | SQL Advanced Threat Protection | +| AntiMalware | Antimalware Assessment | +| AzureAutomation | Automation Hybrid Worker | +| LogicAppsManagement | Logic Apps Management | +| SQLDataClassification | SQL Data Discovery & Classification | + ## PARAMETERS ### -DefaultProfile diff --git a/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md index 90764c858f41..54486c03fa1a 100644 --- a/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Remove-AzMonitorLogAnalyticsSolution.md @@ -46,6 +46,14 @@ PS C:\> Remove-AzMonitorLogAnalyticsSolution -InputObject $monitor This command removes a monitor log analytics solution by object. +### Example 3: Remove a monitor log analytics solution by pipeline +```powershell +PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-manual-test -Name 'Containers(monitoringworkspace-asdehu)' | Remove-AzMonitorLogAnalyticsSolution + +``` + +This command removes a monitor log analytics solution by pipeline. + ## PARAMETERS ### -DefaultProfile diff --git a/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md index 0c0c0794fd93..f14c699d4adc 100644 --- a/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/Get-AzMonitorLogAnalyticsSolution.md @@ -9,9 +9,21 @@ Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 This command gets a monitor log analytics solution by name. -### Example 2: Get a monitor log analytics solution by object +### Example 2: Get a monitor log analytics solution by resource id ```powershell -PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor -Name 'Containers(azureps-monitor)' +PS C:\> @{Id = "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/azureps-manual-test/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-t01)"} | Get-AzMonitorLogAnalyticsSolution + +Name Type Location +---- ---- -------- +Containers(monitoringworkspace-t01) Microsoft.OperationsManagement/solutions East US +``` + +This command gets a monitor log analytics solution by resource id. + +### Example 3: Get a monitor log analytics solution by object +```powershell + +PS C:\> $monitor = New-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor -Name 'Containers(azureps-monitor)' PS C:\> Get-AzMonitorLogAnalyticsSolution -InputObject $monitor Name Type Location ---- ---- -------- @@ -20,7 +32,7 @@ Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 This command gets a monitor log analytics solution by object. -### Example 3: Get all monitor log analytics solutions under a resource group +### Example 4: Get all monitor log analytics solutions under a resource group ```powershell PS C:\> Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-monitor @@ -31,7 +43,7 @@ Containers(azureps-monitor) Microsoft.OperationsManagement/solutions West US 2 This command gets all monitor log analytics solutions under a resource group. -### Example 4: Get all monitor log analytics solutions under a subscription +### Example 5: Get all monitor log analytics solutions under a subscription ```powershell PS C:\> Get-AzMonitorLogAnalyticsSolution diff --git a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md index cf0a9dbca136..292ababd06e7 100644 --- a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md @@ -1,3 +1,6 @@ +## RELATED LINKS +[Get-AzOperationalInsightsWorkspace](https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/get-azoperationalinsightsworkspace) + ### Example 1: Create a monitor log analytics solution for the log analytics workspace ```powershell PS C:\> $workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName azureps-manual-test -Name monitoringworkspace-2vob7n @@ -10,3 +13,24 @@ Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions This command creates a monitor log analytics solution for the log analytics workspace. +Parameter Type support value list + +| Type | Description | +| :-----| :----- | +| SecurityCenterFree | Azure Security Center – Free Edition | +| Security | Azure Security Center | +| Updates | Update Management | +| ContainerInsights | Azure Monitor for Containers | +| ServiceMap | Service Map | +| AzureActivity | Activity log analytics | +| ChangeTracking | Change tracking and inventory | +| VMInsights | Azure Monitor for VMs | +| SecurityInsights | Azure Sentinel | +| NetworkMonitoring | Network Performance Monitor | +| SQLVulnerabilityAssessment | SQL Vulnerability Assessment | +| SQLAdvancedThreatProtection | SQL Advanced Threat Protection | +| AntiMalware | Antimalware Assessment | +| AzureAutomation | Automation Hybrid Worker | +| LogicAppsManagement | Logic Apps Management | +| SQLDataClassification | SQL Data Discovery & Classification | + diff --git a/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md index 488e5a62274d..9ce4df7f55ba 100644 --- a/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/Remove-AzMonitorLogAnalyticsSolution.md @@ -15,3 +15,11 @@ PS C:\> Remove-AzMonitorLogAnalyticsSolution -InputObject $monitor This command removes a monitor log analytics solution by object. +### Example 3: Remove a monitor log analytics solution by pipeline +```powershell +PS C:\> $monitor = Get-AzMonitorLogAnalyticsSolution -ResourceGroupName azureps-manual-test -Name 'Containers(monitoringworkspace-asdehu)' | Remove-AzMonitorLogAnalyticsSolution + +``` + +This command removes a monitor log analytics solution by pipeline. + diff --git a/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Recording.json b/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Recording.json index fa5f5a51050e..321720799c44 100644 --- a/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Recording.json +++ b/src/MonitoringSolutions/test/Get-AzMonitorLogAnalyticsSolution.Recording.json @@ -6,7 +6,7 @@ "Content": null, "Headers": { "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "6a0e32c5-f81d-4ce4-bd02-5c304e507aa5" ], + "x-ms-client-request-id": [ "7c6ea449-2ce3-4d44-bff8-b4b96284b1ce" ], "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_List1" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,31 +21,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-original-request-ids": [ "f63a3fbb-ed4b-489a-a05c-eca427ad811c", "bda0d55f-555f-4ba4-90d3-3041913e7770" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "1515cb7f-1b2b-4d46-8fdd-29ba9b357a5d" ], - "x-ms-correlation-request-id": [ "1515cb7f-1b2b-4d46-8fdd-29ba9b357a5d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040101Z:1515cb7f-1b2b-4d46-8fdd-29ba9b357a5d" ], + "x-ms-original-request-ids": [ "6f984b52-60d2-43b5-8262-93a8ee2203cb", "d7f9dcbc-7796-4054-9fb2-72f36ffaf59c" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "3674ed73-b925-423d-8b31-68c711adeebb" ], + "x-ms-correlation-request-id": [ "3674ed73-b925-423d-8b31-68c711adeebb" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065707Z:3674ed73-b925-423d-8b31-68c711adeebb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Sun, 28 Jun 2020 04:01:00 GMT" ] + "Date": [ "Tue, 30 Jun 2020 06:57:07 GMT" ] }, "ContentHeaders": { "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ], - "Content-Length": [ "4039" ] + "Content-Length": [ "5748" ] }, - "Content": "{\"value\":[{\"plan\":{\"name\":\"Containers(monitoringworkspace-t01)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Sun, 28 Jun 2020 03:13:17 GMT\",\"lastModifiedTime\":\"Sun, 28 Jun 2020 03:44:06 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01/views/Containers(monitoringworkspace-t01)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-t01)\",\"name\":\"Containers(monitoringworkspace-t01)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\",\"tags\":{\"key03\":\"3\",\"key01\":\"1\",\"key02\":\"2\"}},{\"plan\":{\"name\":\"Containers(monitoringworkspace-pevful)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-pevful\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Sun, 28 Jun 2020 03:55:57 GMT\",\"lastModifiedTime\":\"Sun, 28 Jun 2020 03:58:25 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-pevful/views/Containers(monitoringworkspace-pevful)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-pevful)\",\"name\":\"Containers(monitoringworkspace-pevful)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\",\"tags\":{\"key02\":\"2\",\"key01\":\"1\",\"key03\":\"3\"}},{\"plan\":{\"name\":\"Containers(monitoringworkspace-ab79hg)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Sun, 28 Jun 2020 04:00:57 GMT\",\"lastModifiedTime\":\"Sun, 28 Jun 2020 04:00:57 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\"name\":\"Containers(monitoringworkspace-ab79hg)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\"},{\"plan\":{\"name\":\"Containers(yemingmonitor)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonitor\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Mon, 08 Jun 2020 08:51:41 GMT\",\"lastModifiedTime\":\"Wed, 17 Jun 2020 08:19:49 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonitor/views/Containers(yemingmonitor)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/Microsoft.OperationsManagement/solutions/Containers(yemingmonitor)\",\"name\":\"Containers(yemingmonitor)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"West US 2\"}]}" + "Content": "{\"value\":[{\"plan\":{\"name\":\"Containers(monitoringworkspace-t01)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Sun, 28 Jun 2020 03:13:17 GMT\",\"lastModifiedTime\":\"Sun, 28 Jun 2020 03:44:06 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01/views/Containers(monitoringworkspace-t01)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-t01)\",\"name\":\"Containers(monitoringworkspace-t01)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\",\"tags\":{\"key03\":\"3\",\"key01\":\"1\",\"key02\":\"2\"}},{\"plan\":{\"name\":\"Security(monitoringworkspace-t01)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Security\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Tue, 30 Jun 2020 06:35:27 GMT\",\"lastModifiedTime\":\"Tue, 30 Jun 2020 06:35:27 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01/views/Security(monitoringworkspace-t01)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/Microsoft.OperationsManagement/solutions/Security(monitoringworkspace-t01)\",\"name\":\"Security(monitoringworkspace-t01)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\"},{\"plan\":{\"name\":\"SecurityCenterFree(monitoringworkspace-t01)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/SecurityCenterFree\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Tue, 30 Jun 2020 06:33:04 GMT\",\"lastModifiedTime\":\"Tue, 30 Jun 2020 06:33:04 GMT\",\"containedResources\":[]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(monitoringworkspace-t01)\",\"name\":\"SecurityCenterFree(monitoringworkspace-t01)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\"},{\"plan\":{\"name\":\"Updates(monitoringworkspace-t01)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Updates\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Tue, 30 Jun 2020 06:35:52 GMT\",\"lastModifiedTime\":\"Tue, 30 Jun 2020 06:35:52 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-t01/views/Updates(monitoringworkspace-t01)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/lucas-manual-test/providers/Microsoft.OperationsManagement/solutions/Updates(monitoringworkspace-t01)\",\"name\":\"Updates(monitoringworkspace-t01)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\"},{\"plan\":{\"name\":\"Containers(monitoringworkspace-k5foa9)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Tue, 30 Jun 2020 06:57:03 GMT\",\"lastModifiedTime\":\"Tue, 30 Jun 2020 06:57:03 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\"name\":\"Containers(monitoringworkspace-k5foa9)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"East US\"},{\"plan\":{\"name\":\"Containers(yemingmonitor)\",\"publisher\":\"Microsoft\",\"promotionCode\":\"\",\"product\":\"OMSGallery/Containers\"},\"properties\":{\"workspaceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonitor\",\"provisioningState\":\"Succeeded\",\"creationTime\":\"Mon, 08 Jun 2020 08:51:41 GMT\",\"lastModifiedTime\":\"Wed, 17 Jun 2020 08:19:49 GMT\",\"containedResources\":[\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonitor/views/Containers(yemingmonitor)\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/Microsoft.OperationsManagement/solutions/Containers(yemingmonitor)\",\"name\":\"Containers(yemingmonitor)\",\"type\":\"Microsoft.OperationsManagement/solutions\",\"location\":\"West US 2\"}]}" } }, - "Get-AzMonitorLogAnalyticsSolution+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview+1": { + "Get-AzMonitorLogAnalyticsSolution+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview", "Content": null, "Headers": { "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "9560bd01-7c7b-47c5-b4d4-7750d35a9633" ], + "x-ms-client-request-id": [ "7c9ab025-cc37-4752-8ca6-232aed5257f5" ], "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -62,32 +62,32 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "3b6bdaee-5c5f-4d3b-9ea3-5446425ce34b" ], + "x-ms-request-id": [ "cb5dd1ca-86f9-4303-ae0d-6ffa9e170582" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "03dd5ad8-0dfe-4a56-bfb8-522e20118d35" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040102Z:03dd5ad8-0dfe-4a56-bfb8-522e20118d35" ], - "Date": [ "Sun, 28 Jun 2020 04:01:01 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "79bd7e88-deff-47f4-8c63-6e08984ae79c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065708Z:79bd7e88-deff-47f4-8c63-6e08984ae79c" ], + "Date": [ "Tue, 30 Jun 2020 06:57:08 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1154" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" } }, - "Get-AzMonitorLogAnalyticsSolution+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+1": { + "Get-AzMonitorLogAnalyticsSolution+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", "Content": null, "Headers": { "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "cd7f2b68-e92b-43be-a1a0-ab29988c9e23" ], + "x-ms-client-request-id": [ "a451c327-7be8-4c63-91ae-8d6377578bea" ], "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -104,32 +104,32 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "1c9647eb-969c-4bd1-956d-b1d16b2d4235" ], + "x-ms-request-id": [ "b3d7f393-ccfe-45ed-89ff-9d893fa32750" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "5d844993-66d1-40c9-a810-9eb9b13a1487" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040102Z:5d844993-66d1-40c9-a810-9eb9b13a1487" ], - "Date": [ "Sun, 28 Jun 2020 04:01:01 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "f95cf440-2206-4a40-820a-117868c45c0d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065708Z:f95cf440-2206-4a40-820a-117868c45c0d" ], + "Date": [ "Tue, 30 Jun 2020 06:57:08 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1263" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n }\r\n ]\r\n}" + "Content": "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n }\r\n ]\r\n}" } }, - "Get-AzMonitorLogAnalyticsSolution+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview+1": { + "Get-AzMonitorLogAnalyticsSolution+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview", "Content": null, "Headers": { "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "655cdc9c-94f4-4b63-a879-e2198c8c2ed7" ], + "x-ms-client-request-id": [ "a5364bd5-80b8-400c-ab8a-7ec2af270b73" ], "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -146,32 +146,32 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "d4c5ef34-ae85-4d3e-8066-d67b8264cf4a" ], + "x-ms-request-id": [ "5bb98c0a-af7d-4658-9c5b-d9c70538a59d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "f6442330-6cb3-4fdc-b2f7-2859c3d4ebb1" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040103Z:f6442330-6cb3-4fdc-b2f7-2859c3d4ebb1" ], - "Date": [ "Sun, 28 Jun 2020 04:01:02 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-correlation-request-id": [ "03e0be88-7046-4eba-a582-8f947a1db348" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065709Z:03e0be88-7046-4eba-a582-8f947a1db348" ], + "Date": [ "Tue, 30 Jun 2020 06:57:09 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1154" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" } }, - "Get-AzMonitorLogAnalyticsSolution+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)?api-version=2015-11-01-preview+2": { + "Get-AzMonitorLogAnalyticsSolution+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)?api-version=2015-11-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)?api-version=2015-11-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)?api-version=2015-11-01-preview", "Content": null, "Headers": { "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "8521dbe0-3690-4536-96ab-1b14bf382e10" ], + "x-ms-client-request-id": [ "a159d7b2-8eab-42e0-8a7d-a177685beb6c" ], "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -188,22 +188,22 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "dd855985-6c8b-41b5-ab95-8a4ee12db4a4" ], + "x-ms-request-id": [ "cc1e1d5d-f0db-4848-8521-f699168c262d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "2bbbf8c4-312f-40ad-b564-eff7aa4aa23e" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040103Z:2bbbf8c4-312f-40ad-b564-eff7aa4aa23e" ], - "Date": [ "Sun, 28 Jun 2020 04:01:02 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-correlation-request-id": [ "2fe76f89-0d9b-4f34-8263-178512e7820d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065709Z:2fe76f89-0d9b-4f34-8263-178512e7820d" ], + "Date": [ "Tue, 30 Jun 2020 06:57:09 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1154" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" } } } \ No newline at end of file diff --git a/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Recording.json b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Recording.json index 5b913e03bd09..925182173a06 100644 --- a/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Recording.json +++ b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Recording.json @@ -1,9 +1,9 @@ { - "New-AzMonitorLogAnalyticsSolution+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview+1": { + "New-AzMonitorLogAnalyticsSolution+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-clihub%29?api-version=2015-11-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview", - "Content": "{\n \"plan\": {\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\n \"product\": \"OMSGallery/Containers\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\"\n },\n \"location\": \"eastus\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-clihub%29?api-version=2015-11-01-preview", + "Content": "{\n \"plan\": {\n \"name\": \"Containers(monitoringworkspace-clihub)\",\n \"product\": \"OMSGallery/Containers\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-clihub\"\n },\n \"location\": \"eastus\"\n}", "Headers": { }, "ContentHeaders": { @@ -18,22 +18,133 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "6c130007-e588-4b39-8a3a-68ae31d968e2" ], + "x-ms-request-id": [ "0463450f-16d5-4d2d-8745-6574176ef286" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "29b2a645-999c-4ab6-aade-eb9c42f4fe63" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040108Z:29b2a645-999c-4ab6-aade-eb9c42f4fe63" ], - "Date": [ "Sun, 28 Jun 2020 04:01:07 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], + "x-ms-correlation-request-id": [ "a6b1c738-cce8-43c6-a5ae-eb2abe6cf121" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065713Z:a6b1c738-cce8-43c6-a5ae-eb2abe6cf121" ], + "Date": [ "Tue, 30 Jun 2020 06:57:13 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1154" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-sfcz4y/views/Containers(monitoringworkspace-sfcz4y)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)\",\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-clihub)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-clihub\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-clihub/views/Containers(monitoringworkspace-clihub)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-clihub)\",\r\n \"name\": \"Containers(monitoringworkspace-clihub)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + } + }, + "New-AzMonitorLogAnalyticsSolution+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview+2": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview", + "Content": "{\n \"plan\": {\n \"name\": \"SecurityCenterFree(monitoringworkspace-k5foa9)\",\n \"product\": \"OMSGallery/SecurityCenterFree\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\"\n },\n \"location\": \"eastus\"\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "434" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "2300b0a9-8612-458c-88d9-0fbc12503da5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1188" ], + "x-ms-correlation-request-id": [ "d85f6e2a-6932-4140-bd5c-5b9924e580b3" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065716Z:d85f6e2a-6932-4140-bd5c-5b9924e580b3" ], + "Date": [ "Tue, 30 Jun 2020 06:57:16 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "951" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"SecurityCenterFree(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/SecurityCenterFree\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": []\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(monitoringworkspace-k5foa9)\",\r\n \"name\": \"SecurityCenterFree(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + } + }, + "New-AzMonitorLogAnalyticsSolution+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Security%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview+3": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Security%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview", + "Content": "{\n \"plan\": {\n \"name\": \"Security(monitoringworkspace-k5foa9)\",\n \"product\": \"OMSGallery/Security\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\"\n },\n \"location\": \"eastus\"\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "414" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "c1c24f06-72e3-4694-aec4-ad594bb24567" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1187" ], + "x-ms-correlation-request-id": [ "6a9a20e0-d2aa-46d6-8ea2-0550b227df08" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065720Z:6a9a20e0-d2aa-46d6-8ea2-0550b227df08" ], + "Date": [ "Tue, 30 Jun 2020 06:57:20 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1144" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Security(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Security\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9/views/Security(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Security(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Security(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + } + }, + "New-AzMonitorLogAnalyticsSolution+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Updates%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview+4": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Updates%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview", + "Content": "{\n \"plan\": {\n \"name\": \"Updates(monitoringworkspace-k5foa9)\",\n \"product\": \"OMSGallery/Updates\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\"\n },\n \"location\": \"eastus\"\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "412" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-AMS-APIVersion": [ "WebAPI1.0" ], + "CacheControl": [ "no-cache" ], + "x-ms-request-id": [ "b5d2e131-79fe-4a19-9009-1938c590696a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET", "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1186" ], + "x-ms-correlation-request-id": [ "1f20ffb4-55ab-4b74-9d7b-0b9b0c5a171c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065723Z:1f20ffb4-55ab-4b74-9d7b-0b9b0c5a171c" ], + "Date": [ "Tue, 30 Jun 2020 06:57:23 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1139" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Updates(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Updates\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9/views/Updates(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Updates(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Updates(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" } } } \ No newline at end of file diff --git a/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 index c38c31c4a4fc..62883b1d52c8 100644 --- a/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 +++ b/src/MonitoringSolutions/test/New-AzMonitorLogAnalyticsSolution.Tests.ps1 @@ -15,5 +15,14 @@ Describe 'New-AzMonitorLogAnalyticsSolution' { It 'CreateExpanded' { $monitor = New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName $env.resourceGroup -Location $env.location -WorkspaceResourceId $env.workspaceResourceId02 $monitor.ProvisioningState | Should -Be 'Succeeded' + + $monitor = New-AzMonitorLogAnalyticsSolution -Type SecurityCenterFree -ResourceGroupName $env.resourceGroup -Location $env.location -WorkspaceResourceId $env.workspaceResourceId01 + $monitor.ProvisioningState | Should -Be 'Succeeded' + + $monitor = New-AzMonitorLogAnalyticsSolution -Type Security -ResourceGroupName $env.resourceGroup -Location $env.location -WorkspaceResourceId $env.workspaceResourceId01 + $monitor.ProvisioningState | Should -Be 'Succeeded' + + $monitor = New-AzMonitorLogAnalyticsSolution -Type Updates -ResourceGroupName $env.resourceGroup -Location $env.location -WorkspaceResourceId $env.workspaceResourceId01 + $monitor.ProvisioningState | Should -Be 'Succeeded' } } diff --git a/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Recording.json b/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Recording.json index ee7780acdb90..009577010a35 100644 --- a/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Recording.json +++ b/src/MonitoringSolutions/test/Remove-AzMonitorLogAnalyticsSolution.Recording.json @@ -1,9 +1,9 @@ { - "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview+1": { + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-clihub%29?api-version=2015-11-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview", - "Content": "{\n \"plan\": {\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\n \"product\": \"OMSGallery/Containers\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\"\n },\n \"location\": \"eastus\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-clihub%29?api-version=2015-11-01-preview", + "Content": "{\n \"plan\": {\n \"name\": \"Containers(monitoringworkspace-clihub)\",\n \"product\": \"OMSGallery/Containers\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-clihub\"\n },\n \"location\": \"eastus\"\n}", "Headers": { }, "ContentHeaders": { @@ -18,32 +18,32 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "cffcb6ff-6496-4e5e-a57a-fcb1d251739c" ], + "x-ms-request-id": [ "a23ab4e4-d4ab-4973-a130-9b372e91e284" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "a1f5951b-9eee-449a-be98-990c66393e51" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040109Z:a1f5951b-9eee-449a-be98-990c66393e51" ], - "Date": [ "Sun, 28 Jun 2020 04:01:08 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1185" ], + "x-ms-correlation-request-id": [ "4d0a2546-5a17-4412-ab14-71e41b7dcb00" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065724Z:4d0a2546-5a17-4412-ab14-71e41b7dcb00" ], + "Date": [ "Tue, 30 Jun 2020 06:57:24 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1154" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-sfcz4y/views/Containers(monitoringworkspace-sfcz4y)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)\",\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-clihub)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-clihub\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-clihub/views/Containers(monitoringworkspace-clihub)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-clihub)\",\r\n \"name\": \"Containers(monitoringworkspace-clihub)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" } }, - "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview+2": { + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-clihub%29?api-version=2015-11-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-clihub%29?api-version=2015-11-01-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "531b60fd-f1e3-4020-b64e-b5d4909574cb" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "09dcb65e-6c02-42d2-939f-5f2a8e48670f" ], "CommandName": [ "Remove-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Remove-AzMonitorLogAnalyticsSolution_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -60,15 +60,15 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "29efc3b3-868d-4c55-8e30-9474f0134187" ], + "x-ms-request-id": [ "9ffd4e71-8ff8-4a8a-bfd3-50679db2f13e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "afb6dea6-2705-4511-9561-342a357a6eff" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040113Z:afb6dea6-2705-4511-9561-342a357a6eff" ], - "Date": [ "Sun, 28 Jun 2020 04:01:12 GMT" ] + "x-ms-correlation-request-id": [ "cfee0cbe-cbd1-400d-8ee0-d4e51f960286" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065727Z:cfee0cbe-cbd1-400d-8ee0-d4e51f960286" ], + "Date": [ "Tue, 30 Jun 2020 06:57:27 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -77,14 +77,14 @@ "Content": null } }, - "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+3": { + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "3e0ee419-7ec4-4393-bccf-1e1fa4008933" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "636e6078-e3c1-40e2-97bd-4f485f6e1b4f" ], "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -101,29 +101,29 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "d02f9df7-80be-469e-a10c-57352dd830a2" ], + "x-ms-request-id": [ "37672cb6-8c5c-4082-9f2f-14b8bacac561" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "9083eebb-d031-4f51-b86c-aeb061cb9ac8" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040114Z:9083eebb-d031-4f51-b86c-aeb061cb9ac8" ], - "Date": [ "Sun, 28 Jun 2020 04:01:13 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-correlation-request-id": [ "d46a3b2e-a32f-4f56-834e-61d87481a41c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065727Z:d46a3b2e-a32f-4f56-834e-61d87481a41c" ], + "Date": [ "Tue, 30 Jun 2020 06:57:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1263" ], + "Content-Length": [ "4750" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n }\r\n ]\r\n}" + "Content": "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n },\r\n {\r\n \"plan\": {\r\n \"name\": \"Security(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Security\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:19 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:19 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9/views/Security(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Security(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Security(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n },\r\n {\r\n \"plan\": {\r\n \"name\": \"SecurityCenterFree(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/SecurityCenterFree\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:15 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:15 GMT\",\r\n \"containedResources\": []\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(monitoringworkspace-k5foa9)\",\r\n \"name\": \"SecurityCenterFree(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n },\r\n {\r\n \"plan\": {\r\n \"name\": \"Updates(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Updates\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:22 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:22 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9/views/Updates(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Updates(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Updates(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n }\r\n ]\r\n}" } }, - "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview+1": { + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-clihub%29?api-version=2015-11-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-sfcz4y%29?api-version=2015-11-01-preview", - "Content": "{\n \"plan\": {\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\n \"product\": \"OMSGallery/Containers\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\"\n },\n \"location\": \"eastus\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-clihub%29?api-version=2015-11-01-preview", + "Content": "{\n \"plan\": {\n \"name\": \"Containers(monitoringworkspace-clihub)\",\n \"product\": \"OMSGallery/Containers\",\n \"promotionCode\": \"\",\n \"publisher\": \"Microsoft\"\n },\n \"properties\": {\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-clihub\"\n },\n \"location\": \"eastus\"\n}", "Headers": { }, "ContentHeaders": { @@ -138,32 +138,32 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "cbda6c44-9333-4496-a053-4c3c7c15135a" ], + "x-ms-request-id": [ "d4f9146c-25bc-445e-ab01-916781b6f4c7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "bb726185-17a0-4d39-b8d9-268a49a34b85" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040117Z:bb726185-17a0-4d39-b8d9-268a49a34b85" ], - "Date": [ "Sun, 28 Jun 2020 04:01:16 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1184" ], + "x-ms-correlation-request-id": [ "d1b40f78-e203-4b2d-96a7-18a3684a7909" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065731Z:d1b40f78-e203-4b2d-96a7-18a3684a7909" ], + "Date": [ "Tue, 30 Jun 2020 06:57:30 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1154" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-sfcz4y/views/Containers(monitoringworkspace-sfcz4y)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)\",\r\n \"name\": \"Containers(monitoringworkspace-sfcz4y)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-clihub)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-clihub\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-clihub/views/Containers(monitoringworkspace-clihub)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-clihub)\",\r\n \"name\": \"Containers(monitoringworkspace-clihub)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n}" } }, - "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)?api-version=2015-11-01-preview+2": { + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-clihub)?api-version=2015-11-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-sfcz4y)?api-version=2015-11-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-clihub)?api-version=2015-11-01-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "bac383f0-878a-4102-9cf2-91b27000881e" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "5b49de74-f95f-416a-8f85-859b15f58a0b" ], "CommandName": [ "Remove-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Remove-AzMonitorLogAnalyticsSolution_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -180,15 +180,15 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "d66fc4b4-9200-4da5-b42c-66dc015bf833" ], + "x-ms-request-id": [ "a6245144-d914-440f-9923-bc641938f9bb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-correlation-request-id": [ "d418cc4b-14ae-452c-83e3-f74130610756" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040120Z:d418cc4b-14ae-452c-83e3-f74130610756" ], - "Date": [ "Sun, 28 Jun 2020 04:01:19 GMT" ] + "x-ms-correlation-request-id": [ "6e4487b0-36d8-407c-8aa0-b3d98cb2751f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065733Z:6e4487b0-36d8-407c-8aa0-b3d98cb2751f" ], + "Date": [ "Tue, 30 Jun 2020 06:57:33 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -197,14 +197,14 @@ "Content": null } }, - "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+3": { + "Remove-AzMonitorLogAnalyticsSolution+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "62de2d6a-1eab-49af-9f7d-6ff482b9dc05" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "c7444b55-ff2c-4e7d-b7d4-134f7a32535b" ], "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -221,22 +221,22 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "134d90f6-a1e8-4c06-bcd2-ee63bf8293f8" ], + "x-ms-request-id": [ "cf88beef-df84-453b-9b7e-008258558440" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "c4654d5f-d4fa-475b-a0d8-04eaaca1f885" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040120Z:c4654d5f-d4fa-475b-a0d8-04eaaca1f885" ], - "Date": [ "Sun, 28 Jun 2020 04:01:19 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "x-ms-correlation-request-id": [ "76ae32e4-54c5-44b1-b3aa-e572607d8bac" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065734Z:76ae32e4-54c5-44b1-b3aa-e572607d8bac" ], + "Date": [ "Tue, 30 Jun 2020 06:57:33 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1263" ], + "Content-Length": [ "4750" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n }\r\n ]\r\n}" + "Content": "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n },\r\n {\r\n \"plan\": {\r\n \"name\": \"Security(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Security\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:19 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:19 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9/views/Security(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Security(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Security(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n },\r\n {\r\n \"plan\": {\r\n \"name\": \"SecurityCenterFree(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/SecurityCenterFree\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:15 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:15 GMT\",\r\n \"containedResources\": []\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(monitoringworkspace-k5foa9)\",\r\n \"name\": \"SecurityCenterFree(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n },\r\n {\r\n \"plan\": {\r\n \"name\": \"Updates(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Updates\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:22 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:22 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9/views/Updates(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Updates(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Updates(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\"\r\n }\r\n ]\r\n}" } } } \ No newline at end of file diff --git a/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Recording.json b/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Recording.json index 3f2cd0299cec..f80a62887c62 100644 --- a/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Recording.json +++ b/src/MonitoringSolutions/test/Update-AzMonitorLogAnalyticsSolution.Recording.json @@ -1,9 +1,9 @@ { - "Update-AzMonitorLogAnalyticsSolution+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview+1": { + "Update-AzMonitorLogAnalyticsSolution+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview+1": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview", - "Content": "{\n \"tags\": {\n \"key01\": \"1\",\n \"key02\": \"2\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview", + "Content": "{\n \"tags\": {\n \"key02\": \"2\",\n \"key01\": \"1\"\n }\n}", "Headers": { }, "ContentHeaders": { @@ -18,32 +18,32 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "e2326545-4241-4c35-9a2e-90eb2d9d5170" ], + "x-ms-request-id": [ "ee1d3dba-0922-426c-89c8-2aa913904b0e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], - "x-ms-correlation-request-id": [ "c6262317-dac9-4ba0-b1b4-0864cbeb4b10" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040122Z:c6262317-dac9-4ba0-b1b4-0864cbeb4b10" ], - "Date": [ "Sun, 28 Jun 2020 04:01:21 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1183" ], + "x-ms-correlation-request-id": [ "b33d8968-06ba-4dae-b8e7-d05e68644a12" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065736Z:b33d8968-06ba-4dae-b8e7-d05e68644a12" ], + "Date": [ "Tue, 30 Jun 2020 06:57:35 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1210" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\",\r\n \"tags\": {\r\n \"key01\": \"1\",\r\n \"key02\": \"2\"\r\n }\r\n}" + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\",\r\n \"tags\": {\r\n \"key02\": \"2\",\r\n \"key01\": \"1\"\r\n }\r\n}" } }, - "Update-AzMonitorLogAnalyticsSolution+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview+1": { + "Update-AzMonitorLogAnalyticsSolution+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-ab79hg%29?api-version=2015-11-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers%28monitoringworkspace-k5foa9%29?api-version=2015-11-01-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "e35fc5e8-42e7-4834-891a-a0124c9077c5" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "650628cc-3fcc-40bc-80cf-f78437c07bc0" ], "CommandName": [ "Get-AzMonitorLogAnalyticsSolution" ], "FullCommandName": [ "Get-AzMonitorLogAnalyticsSolution_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -60,29 +60,29 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "3bfc1fd9-aae1-42b8-a36b-8f0b60456494" ], + "x-ms-request-id": [ "d24ef9a7-c811-4209-b8f9-1f867b2889ac" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "700be5dc-b753-4ac3-9dfe-27cc89f487f2" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040123Z:700be5dc-b753-4ac3-9dfe-27cc89f487f2" ], - "Date": [ "Sun, 28 Jun 2020 04:01:22 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "x-ms-correlation-request-id": [ "70dc5f3e-469b-416b-8e94-0121ba263c76" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065736Z:70dc5f3e-469b-416b-8e94-0121ba263c76" ], + "Date": [ "Tue, 30 Jun 2020 06:57:36 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1210" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:01:21 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\",\r\n \"tags\": {\r\n \"key01\": \"1\",\r\n \"key02\": \"2\"\r\n }\r\n}" + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:34 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\",\r\n \"tags\": {\r\n \"key02\": \"2\",\r\n \"key01\": \"1\"\r\n }\r\n}" } }, - "Update-AzMonitorLogAnalyticsSolution+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)?api-version=2015-11-01-preview+2": { + "Update-AzMonitorLogAnalyticsSolution+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)?api-version=2015-11-01-preview+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)?api-version=2015-11-01-preview", - "Content": "{\n \"tags\": {\n \"key02\": \"2\",\n \"key03\": \"3\",\n \"key01\": \"1\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)?api-version=2015-11-01-preview", + "Content": "{\n \"tags\": {\n \"key01\": \"1\",\n \"key03\": \"3\",\n \"key02\": \"2\"\n }\n}", "Headers": { }, "ContentHeaders": { @@ -97,22 +97,22 @@ "Pragma": [ "no-cache" ], "X-AMS-APIVersion": [ "WebAPI1.0" ], "CacheControl": [ "no-cache" ], - "x-ms-request-id": [ "80609eea-8b58-44df-b426-39f35fff1724" ], + "x-ms-request-id": [ "d004f320-ed3d-42fc-bef3-1ef9f7a6eb08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET", "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "x-ms-correlation-request-id": [ "6db34858-36c1-4873-ad33-67ff91ac8572" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200628T040125Z:6db34858-36c1-4873-ad33-67ff91ac8572" ], - "Date": [ "Sun, 28 Jun 2020 04:01:24 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1182" ], + "x-ms-correlation-request-id": [ "c5f2acb3-7c9a-4b10-8cd5-ac3f5716f073" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200630T065738Z:c5f2acb3-7c9a-4b10-8cd5-ac3f5716f073" ], + "Date": [ "Tue, 30 Jun 2020 06:57:38 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1229" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Sun, 28 Jun 2020 04:00:57 GMT\",\r\n \"lastModifiedTime\": \"Sun, 28 Jun 2020 04:01:21 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-ab79hg/views/Containers(monitoringworkspace-ab79hg)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-ab79hg)\",\r\n \"name\": \"Containers(monitoringworkspace-ab79hg)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\",\r\n \"tags\": {\r\n \"key02\": \"2\",\r\n \"key03\": \"3\",\r\n \"key01\": \"1\"\r\n }\r\n}" + "Content": "{\r\n \"plan\": {\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Tue, 30 Jun 2020 06:57:03 GMT\",\r\n \"lastModifiedTime\": \"Tue, 30 Jun 2020 06:57:34 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationalInsights/workspaces/monitoringworkspace-k5foa9/views/Containers(monitoringworkspace-k5foa9)\"\r\n ]\r\n },\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/Microsoft.OperationsManagement/solutions/Containers(monitoringworkspace-k5foa9)\",\r\n \"name\": \"Containers(monitoringworkspace-k5foa9)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n \"location\": \"East US\",\r\n \"tags\": {\r\n \"key01\": \"1\",\r\n \"key03\": \"3\",\r\n \"key02\": \"2\"\r\n }\r\n}" } } } \ No newline at end of file diff --git a/src/MonitoringSolutions/test/env.json b/src/MonitoringSolutions/test/env.json index 160b07b71f53..e6b590146012 100644 --- a/src/MonitoringSolutions/test/env.json +++ b/src/MonitoringSolutions/test/env.json @@ -1,9 +1,9 @@ { - "monitorName01": "Containers(monitoringworkspace-ab79hg)", - "workspaceResourceId01": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-ab79hg", + "monitorName01": "Containers(monitoringworkspace-k5foa9)", "location": "eastus", - "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", - "resourceGroup": "monitoringsolutions-rg-253bym", + "workspaceResourceId02": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-clihub", + "resourceGroup": "monitoringsolutions-rg-ol9km3", "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "workspaceResourceId02": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-253bym/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-sfcz4y" + "workspaceResourceId01": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/monitoringsolutions-rg-ol9km3/providers/microsoft.operationalinsights/workspaces/monitoringworkspace-k5foa9", + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f" } diff --git a/src/MonitoringSolutions/test/test-new.ps1 b/src/MonitoringSolutions/test/test-new.ps1 deleted file mode 100644 index 863d95f5490e..000000000000 --- a/src/MonitoringSolutions/test/test-new.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -# 1. create a solution -# Notes: -# The name of the solution is not assigned by user, it is generated. -# `-Type ` is a code of the solution type. We are working with service team to provide a list of available types. -# Only first party (Microsoft) solutions are supported. - -$workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName yemingmonitor -Name yemingmonitor - -# $workspace.ResourceId = /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/yemingmonitor/providers/microsoft.operationalinsights/workspaces/yemingmonito -New-AzMonitorLogAnalyticsSolution -Type Containers -ResourceGroupName yemingmonitor -Location $workspace.location -WorkspaceResourceId $workspace.ResourceId - -# Name Type Location -# ---- ---- -------- -# Containers(yemingmonitor) Microsoft.OperationsManagement/solutions West US 2 - -# 2. \ No newline at end of file From 896a8ef0e6aaf8b9c0c5671f7f60655d010bf108 Mon Sep 17 00:00:00 2001 From: LucasYao93 <53558334+LucasYao93@users.noreply.github.com> Date: Tue, 30 Jun 2020 17:07:19 +0800 Subject: [PATCH 10/13] Modified test cases and examples. --- .../docs/New-AzMonitorLogAnalyticsSolution.md | 4 ++++ .../examples/New-AzMonitorLogAnalyticsSolution.md | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md index 2a08cb993d53..756aa29a578a 100644 --- a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md @@ -35,6 +35,10 @@ Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions This command creates a monitor log analytics solution for the log analytics workspace. +Related Links + +[Get-AzOperationalInsightsWorkspace](https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/get-azoperationalinsightsworkspace) + Parameter Type support value list | Type | Description | diff --git a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md index 292ababd06e7..2f1cdc262d65 100644 --- a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md @@ -1,6 +1,3 @@ -## RELATED LINKS -[Get-AzOperationalInsightsWorkspace](https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/get-azoperationalinsightsworkspace) - ### Example 1: Create a monitor log analytics solution for the log analytics workspace ```powershell PS C:\> $workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName azureps-manual-test -Name monitoringworkspace-2vob7n @@ -13,6 +10,10 @@ Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions This command creates a monitor log analytics solution for the log analytics workspace. +Related Links + +[Get-AzOperationalInsightsWorkspace](https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/get-azoperationalinsightsworkspace) + Parameter Type support value list | Type | Description | From e18223b9272dbd978dbc11ec7b314884cb2f3f12 Mon Sep 17 00:00:00 2001 From: LucasYao93 <53558334+LucasYao93@users.noreply.github.com> Date: Tue, 30 Jun 2020 17:38:03 +0800 Subject: [PATCH 11/13] Add related link of New-AzMonitorLogAnalyticsSolution. --- .../custom/New-AzMonitorLogAnalyticsSolution.ps1 | 11 ++--------- .../docs/New-AzMonitorLogAnalyticsSolution.md | 8 ++++---- .../examples/New-AzMonitorLogAnalyticsSolution.md | 4 ---- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 b/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 index b3a930cf5fb7..6c45d6ccea76 100644 --- a/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 +++ b/src/MonitoringSolutions/custom/New-AzMonitorLogAnalyticsSolution.ps1 @@ -18,19 +18,12 @@ Creates a log analytics solution. .Description Creates a log analytics solution. -.Example -PS C:\> {{ Add code here }} - -{{ Add output here }} -.Example -PS C:\> {{ Add code here }} - -{{ Add output here }} - .Outputs Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolution .Link https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions/new-azmonitorloganalyticssolution +.LINK +[Get-AzOperationalInsightsWorkspace](https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/get-azoperationalinsightsworkspace) #> function New-AzMonitorLogAnalyticsSolution { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MonitoringSolutions.Models.Api20151101Preview.ISolution])] diff --git a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md index 756aa29a578a..dc7b9dc188ac 100644 --- a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md @@ -35,10 +35,6 @@ Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions This command creates a monitor log analytics solution for the log analytics workspace. -Related Links - -[Get-AzOperationalInsightsWorkspace](https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/get-azoperationalinsightsworkspace) - Parameter Type support value list | Type | Description | @@ -217,3 +213,7 @@ ALIASES ## RELATED LINKS + + +[Get-AzOperationalInsightsWorkspace](https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/get-azoperationalinsightsworkspace) + diff --git a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md index 2f1cdc262d65..d9433a59268c 100644 --- a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md @@ -10,10 +10,6 @@ Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions This command creates a monitor log analytics solution for the log analytics workspace. -Related Links - -[Get-AzOperationalInsightsWorkspace](https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/get-azoperationalinsightsworkspace) - Parameter Type support value list | Type | Description | From 9d8ff5ed9713e8f0d6558b6b64a6ecec4f141ee4 Mon Sep 17 00:00:00 2001 From: Yeming Liu Date: Tue, 30 Jun 2020 17:59:34 +0800 Subject: [PATCH 12/13] doc --- src/MonitoringSolutions/docs/Az.MonitoringSolutions.md | 2 +- .../docs/New-AzMonitorLogAnalyticsSolution.md | 4 ++-- .../examples/New-AzMonitorLogAnalyticsSolution.md | 4 ++-- src/MonitoringSolutions/test/readme.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md index 0adc7044f6dc..a7424dbb92ac 100644 --- a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md +++ b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md @@ -1,6 +1,6 @@ --- Module Name: Az.MonitoringSolutions -Module Guid: 97af14bb-dd33-4d43-9298-de0e1924c0b3 +Module Guid: 927083b8-3b1f-45a1-87ef-788c54d8d5a3 Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions Help Version: 1.0.0.0 Locale: en-US diff --git a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md index dc7b9dc188ac..59ae7ef88772 100644 --- a/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/New-AzMonitorLogAnalyticsSolution.md @@ -35,7 +35,7 @@ Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions This command creates a monitor log analytics solution for the log analytics workspace. -Parameter Type support value list +Commonly used types are: | Type | Description | | :-----| :----- | @@ -47,7 +47,7 @@ Parameter Type support value list | AzureActivity | Activity log analytics | | ChangeTracking | Change tracking and inventory | | VMInsights | Azure Monitor for VMs | -| SecurityInsights | Azure Sentinel | +| SecurityInsights | Azure Sentinel | | NetworkMonitoring | Network Performance Monitor | | SQLVulnerabilityAssessment | SQL Vulnerability Assessment | | SQLAdvancedThreatProtection | SQL Advanced Threat Protection | diff --git a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md index d9433a59268c..9dc9bab70503 100644 --- a/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/examples/New-AzMonitorLogAnalyticsSolution.md @@ -10,7 +10,7 @@ Containers(monitoringworkspace-2vob7n) Microsoft.OperationsManagement/solutions This command creates a monitor log analytics solution for the log analytics workspace. -Parameter Type support value list +Commonly used types are: | Type | Description | | :-----| :----- | @@ -22,7 +22,7 @@ Parameter Type support value list | AzureActivity | Activity log analytics | | ChangeTracking | Change tracking and inventory | | VMInsights | Azure Monitor for VMs | -| SecurityInsights | Azure Sentinel | +| SecurityInsights | Azure Sentinel | | NetworkMonitoring | Network Performance Monitor | | SQLVulnerabilityAssessment | SQL Vulnerability Assessment | | SQLAdvancedThreatProtection | SQL Advanced Threat Protection | diff --git a/src/MonitoringSolutions/test/readme.md b/src/MonitoringSolutions/test/readme.md index 1969200c6a09..7c752b4c8c43 100644 --- a/src/MonitoringSolutions/test/readme.md +++ b/src/MonitoringSolutions/test/readme.md @@ -1,5 +1,5 @@ # Test -This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `../custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. ## Info - Modifiable: yes From 137da792eaa859ef6505cd3270ccd2e0370efdcd Mon Sep 17 00:00:00 2001 From: Yeming Liu Date: Thu, 2 Jul 2020 16:41:01 +0800 Subject: [PATCH 13/13] update description of updte-solution --- src/MonitoringSolutions/docs/Az.MonitoringSolutions.md | 5 ++--- .../docs/Update-AzMonitorLogAnalyticsSolution.md | 6 ++---- src/MonitoringSolutions/readme.md | 5 +++++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md index a7424dbb92ac..d6199c16543e 100644 --- a/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md +++ b/src/MonitoringSolutions/docs/Az.MonitoringSolutions.md @@ -1,6 +1,6 @@ --- Module Name: Az.MonitoringSolutions -Module Guid: 927083b8-3b1f-45a1-87ef-788c54d8d5a3 +Module Guid: ea677a1c-aecd-4441-8953-7881b5cfc8a6 Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.monitoringsolutions Help Version: 1.0.0.0 Locale: en-US @@ -21,6 +21,5 @@ Creates a log analytics solution. Deletes the solution in the subscription. ### [Update-AzMonitorLogAnalyticsSolution](Update-AzMonitorLogAnalyticsSolution.md) -Patch a Solution. -Only updating tags supported. +Update the tags of a solution. diff --git a/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md index 2b770e262d3e..1dd0185410f9 100644 --- a/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md +++ b/src/MonitoringSolutions/docs/Update-AzMonitorLogAnalyticsSolution.md @@ -8,8 +8,7 @@ schema: 2.0.0 # Update-AzMonitorLogAnalyticsSolution ## SYNOPSIS -Patch a Solution. -Only updating tags supported. +Update the tags of a solution. ## SYNTAX @@ -26,8 +25,7 @@ Update-AzMonitorLogAnalyticsSolution -InputObject ``` ## DESCRIPTION -Patch a Solution. -Only updating tags supported. +Update the tags of a solution. ## EXAMPLES diff --git a/src/MonitoringSolutions/readme.md b/src/MonitoringSolutions/readme.md index dbee3192e9a4..8a031190a305 100644 --- a/src/MonitoringSolutions/readme.md +++ b/src/MonitoringSolutions/readme.md @@ -88,4 +88,9 @@ directive: - Name - Type - Location + + # Update the cmdlet description of Update-AzMonitorLogAnalyticsSolution + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}"].patch.description + transform: return "Update the tags of a solution." ```