Set-LMDeviceDatasourceInstance
Syntax
Name-dsName
Set-LMDeviceDatasourceInstance [-DisplayName <String>] [-WildValue <String>] [-WildValue2 <String>] [-Description <String>] [-Properties <Hashtable>] [-PropertiesMethod <String>] [-StopMonitoring <Boolean>] [-DisableAlerting <Boolean>] [-InstanceGroupId <String>] -InstanceId <String> -DatasourceName <String> -Name <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Id-dsName
Set-LMDeviceDatasourceInstance [-DisplayName <String>] [-WildValue <String>] [-WildValue2 <String>] [-Description <String>] [-Properties <Hashtable>] [-PropertiesMethod <String>] [-StopMonitoring <Boolean>] [-DisableAlerting <Boolean>] [-InstanceGroupId <String>] -InstanceId <String> -DatasourceName <String> -Id <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Name-dsId
Set-LMDeviceDatasourceInstance [-DisplayName <String>] [-WildValue <String>] [-WildValue2 <String>] [-Description <String>] [-Properties <Hashtable>] [-PropertiesMethod <String>] [-StopMonitoring <Boolean>] [-DisableAlerting <Boolean>] [-InstanceGroupId <String>] -InstanceId <String> -DatasourceId <String> -Name <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Id-dsId
Set-LMDeviceDatasourceInstance [-DisplayName <String>] [-WildValue <String>] [-WildValue2 <String>] [-Description <String>] [-Properties <Hashtable>] [-PropertiesMethod <String>] [-StopMonitoring <Boolean>] [-DisableAlerting <Boolean>] [-InstanceGroupId <String>] -InstanceId <String> -DatasourceId <String> -Id <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Description
The Set-LMDeviceDatasourceInstance function modifies an existing device datasource instance in LogicMonitor, allowing updates to its display name, wild values, description, and various other properties.
Examples
Example 1
Set-LMDeviceDatasourceInstance -InstanceId 123 -DisplayName "Updated Instance" -Description "New description"Updates the instance with ID 123 with a new display name and description.
Parameters
-DisplayName
Specifies the new display name for the instance.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-WildValue
Specifies the first wild value for the instance.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-WildValue2
Specifies the second wild value for the instance.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Description
Specifies the description for the instance.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Properties
Specifies a hashtable of custom properties for the instance.
Type: HashtableParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-PropertiesMethod
Specifies how to handle existing properties. Valid values are “Add”, “Replace”, or “Refresh”. Default is “Replace”.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: ReplaceAccept pipeline input: FalseAccept wildcard characters: False
-StopMonitoring
Specifies whether to stop monitoring the instance.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DisableAlerting
Specifies whether to disable alerting for the instance.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-InstanceGroupId
Specifies the ID of the instance group to which the instance belongs.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-InstanceId
Specifies the ID of the instance to update.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: True (ByPropertyName)Accept wildcard characters: False
-DatasourceName
Specifies the name of the datasource associated with the instance.
Type: StringParameter Sets: Name-dsName, Id-dsNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DatasourceId
Specifies the ID of the datasource associated with the instance.
Type: StringParameter Sets: Name-dsIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
Type: StringParameter Sets: Id-dsIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Id
Specifies the ID of the device associated with the instance.
Type: StringParameter Sets: Id-dsNameAliases: DeviceId
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
Type: StringParameter Sets: Id-dsIdAliases: DeviceId
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Name
Specifies the name of the device associated with the instance.
Type: StringParameter Sets: Name-dsName, Name-dsIdAliases: DeviceName
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameterParameter Sets: (All)Aliases: wi
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameterParameter Sets: (All)Aliases: cf
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-ProgressAction
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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.
Inputs
You can pipe objects containing InstanceId, DatasourceId, and Id properties to this function.
Outputs
Returns a LogicMonitor.DeviceDatasourceInstance object containing the updated instance information.
Notes
This function requires a valid LogicMonitor API authentication.