Skip to content

New-LMPushMetricInstance

Terminal window
New-LMPushMetricInstance [[-InstancesArrary] <System.Collections.Generic.List`1[System.Object]>]
[-InstanceName] <String> [[-InstanceDisplayName] <String>] [[-InstanceDescription] <String>]
[[-InstanceProperties] <Hashtable>] [-Datapoints] <System.Collections.Generic.List`1[System.Object]>
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

The New-LMPushMetricInstance function is used to create a new instance of a LogicMonitor push metric. It adds the instance to the specified instances array and returns the updated array.

Terminal window
$instances = New-LMPushMetricInstance -InstancesArrary $instances -InstanceName "Instance1" -InstanceDisplayName "Instance 1" -InstanceDescription "This is instance 1" -InstanceProperties @{Property1 = "Value1"; Property2 = "Value2"} -Datapoints $datapoints

This example creates a new instance with the specified parameters and adds it to the existing instances array.

The array of existing instances to which the new instance will be added.

Type: System.Collections.Generic.List`1[System.Object]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The name of the new instance.

Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The display name of the new instance. If not specified, the InstanceName will be used as the display name.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The description of the new instance.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

A hashtable containing additional properties for the new instance.

Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The list of datapoints associated with the new instance. Datapoints should be the results of the New-LMPushMetricDataPoint function.

Type: System.Collections.Generic.List`1[System.Object]
Parameter Sets: (All)
Aliases:
Required: True
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

None. You cannot pipe objects to this command.

Section titled “None. You cannot pipe objects to this command.”

You must run Connect-LMAccount before running this command.