get_effective_recommendation_preferences

get_effective_recommendation_preferences(**kwargs)

Returns the recommendation preferences that are in effect for a given resource, such as enhanced infrastructure metrics. Considers all applicable preferences that you might have set at the resource, account, and organization level.

When you create a recommendation preference, you can set its status to Active or Inactive . Use this action to view the recommendation preferences that are in effect, or Active .

See also: AWS API Documentation

Request Syntax

response = client.get_effective_recommendation_preferences(
    resourceArn='string'
)
Parameters
resourceArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the resource for which to confirm effective recommendation preferences. Only EC2 instance and Auto Scaling group ARNs are currently supported.

Return type
dict
Returns
Response Syntax
{
    'enhancedInfrastructureMetrics': 'Active'|'Inactive',
    'externalMetricsPreference': {
        'source': 'Datadog'|'Dynatrace'|'NewRelic'|'Instana'
    }
}

Response Structure

  • (dict) --
    • enhancedInfrastructureMetrics (string) --

      The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable preferences that you might have set at the resource, account, and organization level.

      A status of Active confirms that the preference is applied in the latest recommendation refresh, and a status of Inactive confirms that it's not yet applied to recommendations.

      To validate whether the preference is applied to your last generated set of recommendations, review the effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.

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

    • externalMetricsPreference (dict) --

      The provider of the external metrics recommendation preference. Considers all applicable preferences that you might have set at the account and organization level.

      If the preference is applied in the latest recommendation refresh, an object with a valid source value appears in the response. If the preference isn't applied to the recommendations already, then this object doesn't appear in the response.

      To validate whether the preference is applied to your last generated set of recommendations, review the effectiveRecommendationPreferences value in the response of the GetEC2InstanceRecommendations actions.

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

      • source (string) --

        Contains the source options for external metrics preferences.

Exceptions

  • ComputeOptimizer.Client.exceptions.OptInRequiredException
  • ComputeOptimizer.Client.exceptions.InternalServerException
  • ComputeOptimizer.Client.exceptions.ServiceUnavailableException
  • ComputeOptimizer.Client.exceptions.AccessDeniedException
  • ComputeOptimizer.Client.exceptions.InvalidParameterValueException
  • ComputeOptimizer.Client.exceptions.ResourceNotFoundException
  • ComputeOptimizer.Client.exceptions.MissingAuthenticationToken
  • ComputeOptimizer.Client.exceptions.ThrottlingException