Skip to content

Get-LMCostOptimizationRecommendations

Syntax

All (Default)

Terminal window
Get-LMCostOptimizationRecommendations [-BatchSize <Int32>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

Id

Terminal window
Get-LMCostOptimizationRecommendations [-Id <String>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

Filter

Terminal window
Get-LMCostOptimizationRecommendations [-Filter <Object>] [-BatchSize <Int32>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

The Get-LMCostOptimizationRecommendations function retrieves cloud cost optimization recommendations from a connected LogicMonitor portal.

Examples

Example 1

Terminal window
#Retrieve all cost optimization recommendations
Get-LMCostOptimizationRecommendations

Example 2

Terminal window
#Retrieve cost optimization recommendations using a filter
Get-LMCostOptimizationRecommendations -Filter 'recommendationCategory -eq "Underutilized AWS EC2 instances"'

Parameters

-Id

The alphanumeric ID of the cost optimization recommendation to retrieve. Example: 1-2-EBS_UNATTACHED

Type: String
Parameter Sets: Id
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter

A filter object to apply when retrieving cost optimization recommendations.

Type: Object
Parameter Sets: Filter
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchSize

The number of results to return per request. Must be between 1 and 1000. Defaults to 50.

Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 50
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

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

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

No input is accepted.

Outputs

Returns LogicMonitor.CostOptimizationRecommendations objects.

Notes

You must run Connect-LMAccount before running this command. When using filters, consult the LM API docs for allowed filter fields.