Set-LMActionRule
Syntax
Section titled “Syntax”Id (Default)
Section titled “Id (Default)”Set-LMActionRule -Id <int> [-NewName <string>] [-ActionChainId <int>] [-DeviceGroups <string[]>] [-Devices <string[]>] [-DataSource <string>] [-Instance <string>] [-DataPoint <string>] [-ResourceProperties <hashtable>] [-LevelStr <string>] [-Enabled <bool>] [-WhatIf] [-Confirm] [<CommonParameters>]Set-LMActionRule -Name <string> [-NewName <string>] [-ActionChainId <int>] [-DeviceGroups <string[]>] [-Devices <string[]>] [-DataSource <string>] [-Instance <string>] [-DataPoint <string>] [-ResourceProperties <hashtable>] [-LevelStr <string>] [-Enabled <bool>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”The Set-LMActionRule function modifies an existing action rule in LogicMonitor. When -Enabled is specified, the status sub-endpoint is updated separately.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”Set-LMActionRule -Id 123 -NewName "Updated Rule" -ActionChainId 456EXAMPLE 2
Section titled “EXAMPLE 2”Set-LMActionRule -Name "Disk Rule" -Enabled $falseParameters
Section titled “Parameters”-ActionChainId
Section titled “-ActionChainId”Specifies the ID of the action chain to use.
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- cfParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DataPoint
Section titled “-DataPoint”Specifies the datapoint name to apply the rule to.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DataSource
Section titled “-DataSource”Specifies the datasource name to apply the rule to.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DeviceGroups
Section titled “-DeviceGroups”Specifies an array of device group full paths to apply the rule to.
Type: System.String[]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Devices
Section titled “-Devices”Specifies an array of device display names to apply the rule to.
Type: System.String[]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Enabled
Section titled “-Enabled”Specifies whether the action rule is enabled.
Type: System.BooleanDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies the ID of the action rule to modify.
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: Id Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: true ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Instance
Section titled “-Instance”Specifies the instance name to apply the rule to.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases:- DataSourceInstanceNameParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-LevelStr
Section titled “-LevelStr”Specifies the level string for the action rule. Valid values: “All”, “Critical”, “Error”, “Warning”.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies the current name of the action rule.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-NewName
Section titled “-NewName”Specifies the new name for the action rule.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-ResourceProperties
Section titled “-ResourceProperties”Specifies resource properties to filter on.
Type: System.Collections.HashtableDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-WhatIf
Section titled “-WhatIf”Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- wiParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.