Skip to content

/AWS1/CL_COP=>GETRECOMMENDATIONPREFERENCES()

About GetRecommendationPreferences

Returns existing recommendation preferences, such as enhanced infrastructure metrics.

Use the scope parameter to specify which preferences to return. You can specify to return preferences for an organization, a specific account ID, or a specific EC2 instance or Auto Scaling group Amazon Resource Name (ARN).

For more information, see Activating enhanced infrastructure metrics in the Compute Optimizer User Guide.

Method Signature

IMPORTING

Required arguments:

IV_RESOURCETYPE TYPE /AWS1/COPRESOURCETYPE /AWS1/COPRESOURCETYPE

The target resource type of the recommendation preference for which to return preferences.

The Ec2Instance option encompasses standalone instances and instances that are part of Auto Scaling groups. The AutoScalingGroup option encompasses only instances that are part of an Auto Scaling group.

The valid values for this parameter are Ec2Instance and AutoScalingGroup.

Optional arguments:

IO_SCOPE TYPE REF TO /AWS1/CL_COPSCOPE /AWS1/CL_COPSCOPE

An object that describes the scope of the recommendation preference to return.

You can return recommendation preferences that are created at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see Activating enhanced infrastructure metrics in the Compute Optimizer User Guide.

IV_NEXTTOKEN TYPE /AWS1/COPNEXTTOKEN /AWS1/COPNEXTTOKEN

The token to advance to the next page of recommendation preferences.

IV_MAXRESULTS TYPE /AWS1/COPMAXRESULTS /AWS1/COPMAXRESULTS

The maximum number of recommendation preferences to return with a single request.

To retrieve the remaining results, make another request with the returned nextToken value.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_COPGETRECOMMENDATIO02 /AWS1/CL_COPGETRECOMMENDATIO02