Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate AlertsManagement from generation to main #21634

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion src/AlertsManagement/AlertsManagement.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Expand All @@ -22,6 +22,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestFx", "..\..\tools\TestF
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AlertsManagement.Sdk", "AlertsManagement.Sdk\AlertsManagement.Sdk.csproj", "{03DE8A68-76C9-4FD8-A611-117617FF280B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.PrometheusRuleGroups", "PrometheusRuleGroups.Autorest\Az.PrometheusRuleGroups.csproj", "{DEDB2891-A311-4637-8627-F0D2FD344C5A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -64,6 +66,10 @@ Global
{03DE8A68-76C9-4FD8-A611-117617FF280B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03DE8A68-76C9-4FD8-A611-117617FF280B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03DE8A68-76C9-4FD8-A611-117617FF280B}.Release|Any CPU.Build.0 = Release|Any CPU
{DEDB2891-A311-4637-8627-F0D2FD344C5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DEDB2891-A311-4637-8627-F0D2FD344C5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DEDB2891-A311-4637-8627-F0D2FD344C5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DEDB2891-A311-4637-8627-F0D2FD344C5A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
22 changes: 14 additions & 8 deletions src/AlertsManagement/AlertsManagement/Az.AlertsManagement.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 10/28/2022
# Generated on: 4/24/2023
#

@{
Expand Down Expand Up @@ -56,7 +56,8 @@ DotNetFrameworkVersion = '4.7.2'
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.10.3'; })

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'Microsoft.Azure.PowerShell.AlertsManagement.Management.Sdk.dll'
RequiredAssemblies = 'Microsoft.Azure.PowerShell.AlertsManagement.Management.Sdk.dll',
'PrometheusRuleGroups.Autorest\bin\Az.PrometheusRuleGroups.private.dll'

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
Expand All @@ -66,13 +67,18 @@ RequiredAssemblies = 'Microsoft.Azure.PowerShell.AlertsManagement.Management.Sdk

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess =
'Microsoft.Azure.PowerShell.Cmdlets.AlertsManagement.generated.format.ps1xml'
'Microsoft.Azure.PowerShell.Cmdlets.AlertsManagement.generated.format.ps1xml',
'PrometheusRuleGroups.Autorest\Az.PrometheusRuleGroups.format.ps1xml'

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
NestedModules = @('Microsoft.Azure.PowerShell.Cmdlets.AlertsManagement.dll')
NestedModules = @('Microsoft.Azure.PowerShell.Cmdlets.AlertsManagement.dll',
'PrometheusRuleGroups.Autorest\Az.PrometheusRuleGroups.psm1')

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @()
FunctionsToExport = 'Get-AzPrometheusRuleGroup', 'New-AzPrometheusRuleGroup',
'New-AzPrometheusRuleGroupActionObject',
'New-AzPrometheusRuleObject', 'Remove-AzPrometheusRuleGroup',
'Update-AzPrometheusRuleGroup'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-AzAlert', 'Get-AzAlertObjectHistory', 'Update-AzAlertState',
Expand All @@ -82,7 +88,7 @@ CmdletsToExport = 'Get-AzAlert', 'Get-AzAlertObjectHistory', 'Update-AzAlertStat
'Update-AzAlertProcessingRule', 'Remove-AzAlertProcessingRule'

# Variables to export from this module
# VariablesToExport = @()
VariablesToExport = '*'

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = @()
Expand All @@ -102,7 +108,7 @@ PrivateData = @{
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'Azure','Alerts','AlertsManagement','Notifications'
Tags = 'Azure', 'Alerts', 'AlertsManagement', 'Notifications'

# A URL to the license for this module.
LicenseUri = 'https://aka.ms/azps-license'
Expand All @@ -127,7 +133,7 @@ PrivateData = @{

} # End of PSData hashtable

} # End of PrivateData hashtable
} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''
Expand Down
1 change: 1 addition & 0 deletions src/AlertsManagement/AlertsManagement/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Added cmdlets for Prometheus rule group

## Version 0.5.0
* Added parameter `comment` for `Update-AzAlerteState`
Expand Down
36 changes: 27 additions & 9 deletions src/AlertsManagement/AlertsManagement/help/Az.AlertsManagement.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ Locale: en-US
Manages alerts, smart groups and action rule configuration for Alerts Management Platform.

## Az.AlertsManagement Cmdlets
### [Get-AzActionRule](Get-AzActionRule.md)
Get Action Rules Information

### [Get-AzAlert](Get-AzAlert.md)
Get Alerts Information

### [Get-AzAlertObjectHistory](Get-AzAlertObjectHistory.md)
Gets Alert History information

### [Get-AzAlertProcessingRule](Get-AzAlertProcessingRule.md)
Get AlertProcessing Rules Information

### [Get-AzPrometheusRuleGroup](Get-AzPrometheusRuleGroup.md)
Retrieve a Prometheus rule group definition.

### [Get-AzSmartGroup](Get-AzSmartGroup.md)
Gets Smart Groups information

Expand All @@ -29,18 +32,33 @@ Gets smart group history
### [Measure-AzAlertStatistic](Measure-AzAlertStatistic.md)
Gets Alert Summary Information

### [Remove-AzActionRule](Remove-AzActionRule.md)
Deletes a action group
### [New-AzPrometheusRuleGroup](New-AzPrometheusRuleGroup.md)
Create or update a Prometheus rule group definition.

### [New-AzPrometheusRuleGroupActionObject](New-AzPrometheusRuleGroupActionObject.md)
Create an in-memory object for PrometheusRuleGroupAction.

### [Set-AzActionRule](Set-AzActionRule.md)
Create or update an action rule.
### [New-AzPrometheusRuleObject](New-AzPrometheusRuleObject.md)
Create an in-memory object for PrometheusRule.

### [Update-AzActionRule](Update-AzActionRule.md)
Updates action rule properties.
### [Remove-AzAlertProcessingRule](Remove-AzAlertProcessingRule.md)
Deletes an alert processing rule

### [Remove-AzPrometheusRuleGroup](Remove-AzPrometheusRuleGroup.md)
Delete a Prometheus rule group definition.

### [Set-AzAlertProcessingRule](Set-AzAlertProcessingRule.md)
Create or update an alert processing rule.

### [Update-AzAlertProcessingRule](Update-AzAlertProcessingRule.md)
Updates alert processing rule properties.

### [Update-AzAlertState](Update-AzAlertState.md)
Updates alert state

### [Update-AzPrometheusRuleGroup](Update-AzPrometheusRuleGroup.md)
Update an Prometheus rule group definition.

### [Update-AzSmartGroupState](Update-AzSmartGroupState.md)
Updates smart group state

2 changes: 2 additions & 0 deletions src/AlertsManagement/AlertsManagement/help/Get-AzAlert.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Get Alert details by Id (GUID) or Resource Id (Complete ARM Id)
Get Alerts Information. (autogenerated)

<!-- Aladdin Generated Example -->


```powershell
Get-AzAlert -IncludeContext $true -TimeRange '1h'
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ Get AlertProcessing Rules Information

### ListAlertProcessingRules (Default)
```
Get-AzAlertProcessingRule [-Name <String>] [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
Get-AzAlertProcessingRule [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

### ResourceId
### AlertProcessingRuleByName
```
Get-AzActionRule -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
Get-AzAlertProcessingRule -Name <String> -ResourceGroupName <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
```

### ListAlertProcessingRulesByResourceGroupName
```
Get-AzAlertProcessingRule -ResourceGroupName <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
Get-AzAlertProcessingRule -ResourceGroupName <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
```

### AlertProcessingRuleByName
### ResourceId
```
Get-AzAlertProcessingRule -Name <String> -ResourceGroupName <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzAlertProcessingRule -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -77,22 +77,9 @@ Accept pipeline input: False
Accept wildcard characters: False
```


### -Name
Name of alert processing rule.

```yaml
Type: System.String
Parameter Sets: ListAlertProcessingRules
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

```yaml
Type: System.String
Parameter Sets: AlertProcessingRuleByName
Expand All @@ -110,19 +97,22 @@ Resource Group Name in which alert processing rule resides.

```yaml
Type: System.String
Parameter Sets: ListAlertProcessingRules, ListAlertProcessingRulesByResourceGroupName
Parameter Sets: AlertProcessingRuleByName, ListAlertProcessingRulesByResourceGroupName
Aliases:

Required: False
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ResourceId
Get Alert Processing rule by resource id.

```yaml
Type: System.String
Parameter Sets: AlertProcessingRuleByName
Parameter Sets: ResourceId
Aliases:

Required: True
Expand All @@ -132,7 +122,6 @@ Accept pipeline input: False
Accept wildcard characters: False
```


### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

Expand Down
Loading