New-LMPushMetricInstance
Syntax
Section titled “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>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “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
Section titled “Examples”Example 1
Section titled “Example 1”$instances = New-LMPushMetricInstance -InstancesArrary $instances -InstanceName "Instance1" -InstanceDisplayName "Instance 1" -InstanceDescription "This is instance 1" -InstanceProperties @{Property1 = "Value1"; Property2 = "Value2"} -Datapoints $datapointsThis example creates a new instance with the specified parameters and adds it to the existing instances array.
Parameters
Section titled “Parameters”-InstancesArrary
Section titled “-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
Section titled “-InstanceName”The name of the new instance.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 2Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-InstanceDisplayName
Section titled “-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
Section titled “-InstanceDescription”The description of the new instance.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 4Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-InstanceProperties
Section titled “-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
Section titled “-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-WhatIf
Section titled “-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
Section titled “-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
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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
Section titled “Inputs”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”Returns LogicMonitor.Instance object.
Section titled “Returns LogicMonitor.Instance object.”You must run Connect-LMAccount before running this command.