|
| 1 | +--- |
| 2 | +external help file: Logic.Monitor-help.xml |
| 3 | +Module Name: Logic.Monitor |
| 4 | +online version: |
| 5 | +schema: 2.0.0 |
| 6 | +--- |
| 7 | + |
| 8 | +# Set-LMAWSDiscoverySettings |
| 9 | + |
| 10 | +## SYNOPSIS |
| 11 | +Updates AWS Cloud discovery settings for specified AWS accounts in LogicMonitor. |
| 12 | + |
| 13 | +## SYNTAX |
| 14 | + |
| 15 | +### Id (Default) |
| 16 | +``` |
| 17 | +Set-LMAWSDiscoverySettings -AccountId <Int32> -ServiceName <String> -Regions <String[]> [-AutoDelete <Boolean>] |
| 18 | + [-DeleteDelayDays <Int32>] [-DisableAlerting <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] |
| 19 | + [-Confirm] [<CommonParameters>] |
| 20 | +``` |
| 21 | + |
| 22 | +### Name |
| 23 | +``` |
| 24 | +Set-LMAWSDiscoverySettings -Name <String> -ServiceName <String> -Regions <String[]> [-AutoDelete <Boolean>] |
| 25 | + [-DeleteDelayDays <Int32>] [-DisableAlerting <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] |
| 26 | + [-Confirm] [<CommonParameters>] |
| 27 | +``` |
| 28 | + |
| 29 | +### Csv |
| 30 | +``` |
| 31 | +Set-LMAWSDiscoverySettings -CsvPath <String> -ServiceName <String> -Regions <String[]> [-AutoDelete <Boolean>] |
| 32 | + [-DeleteDelayDays <Int32>] [-DisableAlerting <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] |
| 33 | + [-Confirm] [<CommonParameters>] |
| 34 | +``` |
| 35 | + |
| 36 | +## DESCRIPTION |
| 37 | +The Set-LMAWSDiscoverySettings function modifies AWS Cloud discovery settings such as monitored regions, automatic deletion policies, and alerting preferences for AWS services within LogicMonitor. |
| 38 | +The function supports updating a single AWS account by AccountId or multiple accounts by importing AccountIds from a CSV file. |
| 39 | + |
| 40 | +## EXAMPLES |
| 41 | + |
| 42 | +### EXAMPLE 1 |
| 43 | +``` |
| 44 | +Set-LMAWSDiscoverySettings -AccountId 317 -ServiceName "EC2" -Regions "us-east-1","us-west-2" |
| 45 | +Updates EC2 discovery settings for AWS account group ID 317 to monitor only us-east-1 and us-west-2 regions. |
| 46 | +``` |
| 47 | + |
| 48 | +### EXAMPLE 2 |
| 49 | +``` |
| 50 | +Set-LMAWSDiscoverySettings -Name "Production AWS Account" -ServiceName "RDS" -Regions "us-east-1","us-east-2" -AutoDelete -DeleteDelayDays 10 |
| 51 | +Updates RDS discovery settings for the AWS account named "Production AWS Account" with automatic deletion enabled after 10 days. |
| 52 | +``` |
| 53 | + |
| 54 | +### EXAMPLE 3 |
| 55 | +``` |
| 56 | +Set-LMAWSDiscoverySettings -CsvPath "C:\aws_accounts.csv" -ServiceName "EC2" -Regions "us-east-1","us-east-2" |
| 57 | +Bulk updates EC2 discovery settings for multiple AWS accounts listed in the CSV file. |
| 58 | +``` |
| 59 | + |
| 60 | +### EXAMPLE 4 |
| 61 | +``` |
| 62 | +Set-LMAWSDiscoverySettings -AccountId 317 -ServiceName "Lambda" -Regions "us-east-1" -AutoDelete -DeleteDelayDays 5 -DisableAlerting |
| 63 | +Updates Lambda discovery settings with automatic deletion after 5 days and alerting disabled on termination. |
| 64 | +``` |
| 65 | + |
| 66 | +## PARAMETERS |
| 67 | + |
| 68 | +### -AccountId |
| 69 | +Specifies the LogicMonitor device group ID of the AWS account for which to update discovery settings. |
| 70 | +This parameter is mandatory when using the 'Id' parameter set. |
| 71 | + |
| 72 | +```yaml |
| 73 | +Type: Int32 |
| 74 | +Parameter Sets: Id |
| 75 | +Aliases: Id |
| 76 | + |
| 77 | +Required: True |
| 78 | +Position: Named |
| 79 | +Default value: 0 |
| 80 | +Accept pipeline input: True (ByPropertyName) |
| 81 | +Accept wildcard characters: False |
| 82 | +``` |
| 83 | +
|
| 84 | +### -Name |
| 85 | +Specifies the name of the AWS account device group. |
| 86 | +This parameter is mandatory when using the 'Name' parameter set. |
| 87 | +
|
| 88 | +```yaml |
| 89 | +Type: String |
| 90 | +Parameter Sets: Name |
| 91 | +Aliases: |
| 92 | + |
| 93 | +Required: True |
| 94 | +Position: Named |
| 95 | +Default value: None |
| 96 | +Accept pipeline input: False |
| 97 | +Accept wildcard characters: False |
| 98 | +``` |
| 99 | +
|
| 100 | +### -CsvPath |
| 101 | +Specifies the path to a CSV file containing multiple AWS AccountIds to update in bulk. |
| 102 | +The CSV must have an "AccountId" column. |
| 103 | +This parameter is part of the 'Csv' parameter set. |
| 104 | +
|
| 105 | +```yaml |
| 106 | +Type: String |
| 107 | +Parameter Sets: Csv |
| 108 | +Aliases: |
| 109 | + |
| 110 | +Required: True |
| 111 | +Position: Named |
| 112 | +Default value: None |
| 113 | +Accept pipeline input: False |
| 114 | +Accept wildcard characters: False |
| 115 | +``` |
| 116 | +
|
| 117 | +### -ServiceName |
| 118 | +Specifies the AWS service name (e.g., "EC2", "RDS", "Lambda") whose discovery settings are to be updated. |
| 119 | +
|
| 120 | +```yaml |
| 121 | +Type: String |
| 122 | +Parameter Sets: (All) |
| 123 | +Aliases: |
| 124 | + |
| 125 | +Required: True |
| 126 | +Position: Named |
| 127 | +Default value: None |
| 128 | +Accept pipeline input: False |
| 129 | +Accept wildcard characters: False |
| 130 | +``` |
| 131 | +
|
| 132 | +### -Regions |
| 133 | +Specifies an array of AWS regions (e.g., "us-east-1","us-east-2") to monitor for the specified service. |
| 134 | +
|
| 135 | +```yaml |
| 136 | +Type: String[] |
| 137 | +Parameter Sets: (All) |
| 138 | +Aliases: |
| 139 | + |
| 140 | +Required: True |
| 141 | +Position: Named |
| 142 | +Default value: None |
| 143 | +Accept pipeline input: False |
| 144 | +Accept wildcard characters: False |
| 145 | +``` |
| 146 | +
|
| 147 | +### -AutoDelete |
| 148 | +Specifies whether to enable automatic deletion of terminated AWS resources. |
| 149 | +
|
| 150 | +```yaml |
| 151 | +Type: Boolean |
| 152 | +Parameter Sets: (All) |
| 153 | +Aliases: |
| 154 | + |
| 155 | +Required: False |
| 156 | +Position: Named |
| 157 | +Default value: None |
| 158 | +Accept pipeline input: False |
| 159 | +Accept wildcard characters: False |
| 160 | +``` |
| 161 | +
|
| 162 | +### -DeleteDelayDays |
| 163 | +Specifies the number of days to wait before automatically deleting terminated resources. |
| 164 | +Defaults to 7. |
| 165 | +
|
| 166 | +```yaml |
| 167 | +Type: Int32 |
| 168 | +Parameter Sets: (All) |
| 169 | +Aliases: |
| 170 | + |
| 171 | +Required: False |
| 172 | +Position: Named |
| 173 | +Default value: None |
| 174 | +Accept pipeline input: False |
| 175 | +Accept wildcard characters: False |
| 176 | +``` |
| 177 | +
|
| 178 | +### -DisableAlerting |
| 179 | +Specifies whether to disable alerting automatically after resource termination. |
| 180 | +
|
| 181 | +```yaml |
| 182 | +Type: Boolean |
| 183 | +Parameter Sets: (All) |
| 184 | +Aliases: |
| 185 | + |
| 186 | +Required: False |
| 187 | +Position: Named |
| 188 | +Default value: None |
| 189 | +Accept pipeline input: False |
| 190 | +Accept wildcard characters: False |
| 191 | +``` |
| 192 | +
|
| 193 | +### -WhatIf |
| 194 | +Shows what would happen if the cmdlet runs. |
| 195 | +The cmdlet is not run. |
| 196 | +
|
| 197 | +```yaml |
| 198 | +Type: SwitchParameter |
| 199 | +Parameter Sets: (All) |
| 200 | +Aliases: wi |
| 201 | + |
| 202 | +Required: False |
| 203 | +Position: Named |
| 204 | +Default value: None |
| 205 | +Accept pipeline input: False |
| 206 | +Accept wildcard characters: False |
| 207 | +``` |
| 208 | +
|
| 209 | +### -Confirm |
| 210 | +Prompts you for confirmation before running the cmdlet. |
| 211 | +
|
| 212 | +```yaml |
| 213 | +Type: SwitchParameter |
| 214 | +Parameter Sets: (All) |
| 215 | +Aliases: cf |
| 216 | + |
| 217 | +Required: False |
| 218 | +Position: Named |
| 219 | +Default value: None |
| 220 | +Accept pipeline input: False |
| 221 | +Accept wildcard characters: False |
| 222 | +``` |
| 223 | +
|
| 224 | +### -ProgressAction |
| 225 | +{{ Fill ProgressAction Description }} |
| 226 | +
|
| 227 | +```yaml |
| 228 | +Type: ActionPreference |
| 229 | +Parameter Sets: (All) |
| 230 | +Aliases: proga |
| 231 | + |
| 232 | +Required: False |
| 233 | +Position: Named |
| 234 | +Default value: None |
| 235 | +Accept pipeline input: False |
| 236 | +Accept wildcard characters: False |
| 237 | +``` |
| 238 | +
|
| 239 | +### CommonParameters |
| 240 | +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). |
| 241 | +
|
| 242 | +## INPUTS |
| 243 | +
|
| 244 | +### You can pipe objects containing AccountId properties to this function. |
| 245 | +## OUTPUTS |
| 246 | +
|
| 247 | +### Returns a LogicMonitor.DeviceGroup object containing the updated AWS account group information. |
| 248 | +## NOTES |
| 249 | +This function requires a valid LogicMonitor API authentication. |
| 250 | +Use Connect-LMAccount before running this command. |
| 251 | +
|
| 252 | +## RELATED LINKS |
0 commit comments