New-LMPushMetricInstance
Syntax
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>] [<CommonParameters>]
Description
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.
Examples
Example 1
$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.
Parameters
-InstancesArrary
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: FalsePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-InstanceName
The name of the new instance.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 2Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-InstanceDisplayName
The display name of the new instance. If not specified, the InstanceName will be used as the display name.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 3Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-InstanceDescription
The description of the new instance.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 4Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-InstanceProperties
A hashtable containing additional properties for the new instance.
Type: HashtableParameter Sets: (All)Aliases:
Required: FalsePosition: 5Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Datapoints
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: TruePosition: 6Default 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
None. You cannot pipe objects to this command.
Outputs
Returns LogicMonitor.Instance object.
Notes
You must run Connect-LMAccount before running this command.