Skip to content

Commit 0ffad9b

Browse files
committed
align HostGroupIds with Device cmdlets
1 parent 0a5fbf0 commit 0ffad9b

File tree

6 files changed

+48
-46
lines changed

6 files changed

+48
-46
lines changed

Documentation/New-LMUptimeDevice.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Creates a LogicMonitor Uptime device using the v3 device endpoint.
1414

1515
### WebInternal (Default)
1616
```
17-
New-LMUptimeDevice -Name <String> -GroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
17+
New-LMUptimeDevice -Name <String> -HostGroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
1818
[-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>]
1919
[-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
2020
[-UseDefaultAlertSetting <Boolean>] [-Properties <Object>] [-Template <String>] -Domain <String>
@@ -26,7 +26,7 @@ New-LMUptimeDevice -Name <String> -GroupIds <String[]> [-Description <String>] [
2626

2727
### PingExternal
2828
```
29-
New-LMUptimeDevice -Name <String> -GroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
29+
New-LMUptimeDevice -Name <String> -HostGroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
3030
[-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>]
3131
[-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
3232
[-UseDefaultAlertSetting <Boolean>] [-Properties <Object>] [-Template <String>] -Hostname <String>
@@ -37,7 +37,7 @@ New-LMUptimeDevice -Name <String> -GroupIds <String[]> [-Description <String>] [
3737

3838
### PingInternal
3939
```
40-
New-LMUptimeDevice -Name <String> -GroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
40+
New-LMUptimeDevice -Name <String> -HostGroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
4141
[-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>]
4242
[-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
4343
[-UseDefaultAlertSetting <Boolean>] [-Properties <Object>] [-Template <String>] -Hostname <String>
@@ -48,7 +48,7 @@ New-LMUptimeDevice -Name <String> -GroupIds <String[]> [-Description <String>] [
4848

4949
### WebExternal
5050
```
51-
New-LMUptimeDevice -Name <String> -GroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
51+
New-LMUptimeDevice -Name <String> -HostGroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
5252
[-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>]
5353
[-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
5454
[-UseDefaultAlertSetting <Boolean>] [-Properties <Object>] [-Template <String>] -Domain <String>
@@ -74,28 +74,28 @@ Supported monitor types include:
7474

7575
### EXAMPLE 1
7676
```
77-
New-LMUptimeDevice -Name "web-int-01" -GroupIds 17 -Domain "app.example.com" -TestLocationCollectorIds 12
77+
New-LMUptimeDevice -Name "web-int-01" -HostGroupIds 17 -Domain "app.example.com" -TestLocationCollectorIds 12
7878
```
7979

8080
Creates a new internal web uptime check against app.example.com using collector 12.
8181

8282
### EXAMPLE 2
8383
```
84-
New-LMUptimeDevice -Name "web-ext-01" -GroupIds 17 -Domain "app.example.com" -TestLocationSmgIds 2,3,4
84+
New-LMUptimeDevice -Name "web-ext-01" -HostGroupIds 17 -Domain "app.example.com" -TestLocationSmgIds 2,3,4
8585
```
8686

8787
Creates a new external web uptime check using the specified public locations.
8888

8989
### EXAMPLE 3
9090
```
91-
New-LMUptimeDevice -Name "ping-int-01" -GroupIds 17 -Host "intranet.local" -TestLocationCollectorIds 5
91+
New-LMUptimeDevice -Name "ping-int-01" -HostGroupIds 17 -Host "intranet.local" -TestLocationCollectorIds 5
9292
```
9393

9494
Creates an internal ping uptime check that targets intranet.local.
9595

9696
### EXAMPLE 4
9797
```
98-
New-LMUptimeDevice -Name "ping-ext-01" -GroupIds 17 -Host "api.example.net" -TestLocationSmgIds 2,4
98+
New-LMUptimeDevice -Name "ping-ext-01" -HostGroupIds 17 -Host "api.example.net" -TestLocationSmgIds 2,4
9999
```
100100

101101
Creates an external ping uptime check using the provided public locations.
@@ -118,7 +118,7 @@ Accept pipeline input: False
118118
Accept wildcard characters: False
119119
```
120120
121-
### -GroupIds
121+
### -HostGroupIds
122122
Specifies one or more device group identifiers to assign to the Uptime device.
123123
124124
```yaml

Documentation/Set-LMUptimeDevice.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Updates an existing LogicMonitor Uptime device using the v3 device endpoint.
1414

1515
### IdGeneral (Default)
1616
```
17-
Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <String>] [-GroupIds <String[]>]
17+
Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <String>] [-HostGroupIds <String[]>]
1818
[-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>]
1919
[-OverallAlertLevel <String>] [-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>]
2020
[-UseDefaultLocationSetting <Boolean>] [-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>]
@@ -24,7 +24,7 @@ Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <Strin
2424

2525
### IdPing
2626
```
27-
Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <String>] [-GroupIds <String[]>]
27+
Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <String>] [-HostGroupIds <String[]>]
2828
[-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>]
2929
[-OverallAlertLevel <String>] [-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>]
3030
[-UseDefaultLocationSetting <Boolean>] [-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>]
@@ -35,7 +35,7 @@ Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <Strin
3535

3636
### IdWeb
3737
```
38-
Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <String>] [-GroupIds <String[]>]
38+
Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <String>] [-HostGroupIds <String[]>]
3939
[-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>]
4040
[-OverallAlertLevel <String>] [-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>]
4141
[-UseDefaultLocationSetting <Boolean>] [-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>]
@@ -48,35 +48,37 @@ Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <Strin
4848

4949
### NamePing
5050
```
51-
Set-LMUptimeDevice -Name <String> [-PropertiesMethod <String>] [-Description <String>] [-GroupIds <String[]>]
52-
[-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>]
53-
[-OverallAlertLevel <String>] [-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>]
54-
[-UseDefaultLocationSetting <Boolean>] [-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>]
55-
[-Template <String>] [-Hostname <String>] [-Count <Int32>] [-PercentPktsNotReceiveInTime <Int32>]
56-
[-TimeoutInMSPktsNotReceive <Int32>] [-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>]
57-
[-TestLocationAll] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
51+
Set-LMUptimeDevice -Name <String> [-PropertiesMethod <String>] [-Description <String>]
52+
[-HostGroupIds <String[]>] [-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>]
53+
[-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>] [-IndividualAlertLevel <String>]
54+
[-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
55+
[-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>] [-Template <String>] [-Hostname <String>]
56+
[-Count <Int32>] [-PercentPktsNotReceiveInTime <Int32>] [-TimeoutInMSPktsNotReceive <Int32>]
57+
[-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>] [-TestLocationAll]
58+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
5859
```
5960

6061
### NameWeb
6162
```
62-
Set-LMUptimeDevice -Name <String> [-PropertiesMethod <String>] [-Description <String>] [-GroupIds <String[]>]
63-
[-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>]
64-
[-OverallAlertLevel <String>] [-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>]
65-
[-UseDefaultLocationSetting <Boolean>] [-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>]
66-
[-Template <String>] [-Domain <String>] [-Schema <String>] [-IgnoreSSL <Boolean>]
67-
[-PageLoadAlertTimeInMS <Int32>] [-AlertExpr <String>] [-TriggerSSLStatusAlert <Boolean>]
68-
[-TriggerSSLExpirationAlert <Boolean>] [-Steps <Hashtable[]>] [-TestLocationCollectorIds <Int32[]>]
69-
[-TestLocationSmgIds <Int32[]>] [-TestLocationAll] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
70-
[<CommonParameters>]
63+
Set-LMUptimeDevice -Name <String> [-PropertiesMethod <String>] [-Description <String>]
64+
[-HostGroupIds <String[]>] [-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>]
65+
[-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>] [-IndividualAlertLevel <String>]
66+
[-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
67+
[-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>] [-Template <String>] [-Domain <String>]
68+
[-Schema <String>] [-IgnoreSSL <Boolean>] [-PageLoadAlertTimeInMS <Int32>] [-AlertExpr <String>]
69+
[-TriggerSSLStatusAlert <Boolean>] [-TriggerSSLExpirationAlert <Boolean>] [-Steps <Hashtable[]>]
70+
[-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>] [-TestLocationAll]
71+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
7172
```
7273

7374
### NameGeneral
7475
```
75-
Set-LMUptimeDevice -Name <String> [-PropertiesMethod <String>] [-Description <String>] [-GroupIds <String[]>]
76-
[-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>]
77-
[-OverallAlertLevel <String>] [-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>]
78-
[-UseDefaultLocationSetting <Boolean>] [-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>]
79-
[-Template <String>] [-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>] [-TestLocationAll]
76+
Set-LMUptimeDevice -Name <String> [-PropertiesMethod <String>] [-Description <String>]
77+
[-HostGroupIds <String[]>] [-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>]
78+
[-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>] [-IndividualAlertLevel <String>]
79+
[-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
80+
[-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>] [-Template <String>]
81+
[-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>] [-TestLocationAll]
8082
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
8183
```
8284

@@ -168,7 +170,7 @@ Accept pipeline input: False
168170
Accept wildcard characters: False
169171
```
170172
171-
### -GroupIds
173+
### -HostGroupIds
172174
Sets the group identifiers assigned to the Uptime device.
173175
174176
```yaml

Public/New-LMUptimeDevice.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ X-Version header. Supported monitor types include:
1515
.PARAMETER Name
1616
Specifies the device name. Required for every parameter set.
1717
18-
.PARAMETER GroupIds
18+
.PARAMETER HostGroupIds
1919
Specifies one or more device group identifiers to assign to the Uptime device.
2020
2121
.PARAMETER Description
@@ -107,22 +107,22 @@ Specifies synthetic monitoring group identifiers for external checks.
107107
Indicates that all public locations should be used for external checks.
108108
109109
.EXAMPLE
110-
New-LMUptimeDevice -Name "web-int-01" -GroupIds 17 -Domain "app.example.com" -TestLocationCollectorIds 12
110+
New-LMUptimeDevice -Name "web-int-01" -HostGroupIds 17 -Domain "app.example.com" -TestLocationCollectorIds 12
111111
112112
Creates a new internal web uptime check against app.example.com using collector 12.
113113
114114
.EXAMPLE
115-
New-LMUptimeDevice -Name "web-ext-01" -GroupIds 17 -Domain "app.example.com" -TestLocationSmgIds 2,3,4
115+
New-LMUptimeDevice -Name "web-ext-01" -HostGroupIds 17 -Domain "app.example.com" -TestLocationSmgIds 2,3,4
116116
117117
Creates a new external web uptime check using the specified public locations.
118118
119119
.EXAMPLE
120-
New-LMUptimeDevice -Name "ping-int-01" -GroupIds 17 -Host "intranet.local" -TestLocationCollectorIds 5
120+
New-LMUptimeDevice -Name "ping-int-01" -HostGroupIds 17 -Host "intranet.local" -TestLocationCollectorIds 5
121121
122122
Creates an internal ping uptime check that targets intranet.local.
123123
124124
.EXAMPLE
125-
New-LMUptimeDevice -Name "ping-ext-01" -GroupIds 17 -Host "api.example.net" -TestLocationSmgIds 2,4
125+
New-LMUptimeDevice -Name "ping-ext-01" -HostGroupIds 17 -Host "api.example.net" -TestLocationSmgIds 2,4
126126
127127
Creates an external ping uptime check using the provided public locations.
128128
@@ -149,7 +149,7 @@ function New-LMUptimeDevice {
149149
[Parameter(Mandatory, ParameterSetName = 'PingInternal')]
150150
[Parameter(Mandatory, ParameterSetName = 'PingExternal')]
151151
[ValidateNotNullOrEmpty()]
152-
[String[]]$GroupIds,
152+
[String[]]$HostGroupIds,
153153

154154
[String]$Description,
155155

@@ -389,7 +389,7 @@ function New-LMUptimeDevice {
389389
id = 0
390390
name = $Name
391391
description = $Description
392-
groupIds = @($GroupIds | ForEach-Object { [String]$_ })
392+
groupIds = @($HostGroupIds | ForEach-Object { [String]$_ })
393393
isInternal = $isInternal
394394
individualSmAlertEnable = [bool]$IndividualSmAlertEnable
395395
individualAlertLevel = $IndividualAlertLevel

Public/Set-LMUptimeDevice.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Determines how custom properties are applied when supplied. Valid values are Add
2020
.PARAMETER Description
2121
Updates the description of the Uptime device.
2222
23-
.PARAMETER GroupIds
23+
.PARAMETER HostGroupIds
2424
Sets the group identifiers assigned to the Uptime device.
2525
2626
.PARAMETER PollingInterval
@@ -135,7 +135,7 @@ function Set-LMUptimeDevice {
135135

136136
[String]$Description,
137137

138-
[String[]]$GroupIds,
138+
[String[]]$HostGroupIds,
139139

140140
[ValidateSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)]
141141
[Nullable[Int]]$PollingInterval,
@@ -310,7 +310,7 @@ function Set-LMUptimeDevice {
310310
foreach ($key in $PSBoundParameters.Keys) {
311311
switch ($key) {
312312
'Description' { $payload.description = $Description }
313-
'GroupIds' { $payload.groupIds = @($GroupIds | ForEach-Object { [String]$_ }) }
313+
'HostGroupIds' { $payload.hostGroupIds = @($HostGroupIds | ForEach-Object { [String]$_ }) }
314314
'PollingInterval' { $payload.pollingInterval = $PollingInterval }
315315
'AlertTriggerInterval' { $payload.transition = $AlertTriggerInterval }
316316
'GlobalSmAlertCond' {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Connect-LMAccount -UseCachedCredential
9595
### Examples
9696
```powershell
9797
# Create a new external web uptime check
98-
New-LMUptimeDevice -Name "shop.example.com" -GroupIds '123' -Domain 'shop.example.com' -TestLocationAll
98+
New-LMUptimeDevice -Name "shop.example.com" -HostGroupIds '123' -Domain 'shop.example.com' -TestLocationAll
9999
100100
# Update an existing uptime device by name
101101
Set-LMUptimeDevice -Name "shop.example.com" -Description "Updated uptime monitor" -GlobalSmAlertCond half

Tests/LMUptimeDevice.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Describe 'Uptime Device Testing New/Get/Set/Remove' {
1212
It 'When given mandatory parameters, returns a created uptime device with matching values' {
1313
$script:NewUptimeDevice = New-LMUptimeDevice `
1414
-Name $script:UptimeDeviceName `
15-
-GroupIds @('1') `
15+
-HostGroupIds @('1') `
1616
-Domain $script:UptimeDomain `
1717
-Description 'BuildUptimeTest' `
1818
-TestLocationAll `

0 commit comments

Comments
 (0)