:doc:`ComputeOptimizer <../../compute-optimizer>` / Client / delete_recommendation_preferences

*********************************
delete_recommendation_preferences
*********************************



.. py:method:: ComputeOptimizer.Client.delete_recommendation_preferences(**kwargs)

  

  Deletes a recommendation preference, such as enhanced infrastructure metrics.

   

  For more information, see `Activating enhanced infrastructure metrics <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html>`__ in the *Compute Optimizer User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/DeleteRecommendationPreferences>`_  


  **Request Syntax**
  ::

    response = client.delete_recommendation_preferences(
        resourceType='Ec2Instance'|'AutoScalingGroup'|'EbsVolume'|'LambdaFunction'|'NotApplicable'|'EcsService'|'License'|'RdsDBInstance'|'AuroraDBClusterStorage'|'Idle',
        scope={
            'name': 'Organization'|'AccountId'|'ResourceArn',
            'value': 'string'
        },
        recommendationPreferenceNames=[
            'EnhancedInfrastructureMetrics'|'InferredWorkloadTypes'|'ExternalMetricsPreference'|'LookBackPeriodPreference'|'PreferredResources'|'UtilizationPreferences',
        ]
    )
    
  :type resourceType: string
  :param resourceType: **[REQUIRED]** 

    The target resource type of the recommendation preference to delete.

     

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

    

  
  :type scope: dict
  :param scope: 

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

     

    You can delete 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 <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html>`__ in the *Compute Optimizer User Guide*.

    

  
    - **name** *(string) --* 

      The name of the scope.

       

      The following scopes are possible:

       

      
      * ``Organization`` - Specifies that the recommendation preference applies at the organization level, for all member accounts of an organization.
       
      * ``AccountId`` - Specifies that the recommendation preference applies at the account level, for all resources of a given resource type in an account.
       
      * ``ResourceArn`` - Specifies that the recommendation preference applies at the individual resource level.
      

      

    
    - **value** *(string) --* 

      The value of the scope.

       

      If you specified the ``name`` of the scope as:

       

      
      * ``Organization`` - The ``value`` must be ``ALL_ACCOUNTS``.
       
      * ``AccountId`` - The ``value`` must be a 12-digit Amazon Web Services account ID.
       
      * ``ResourceArn`` - The ``value`` must be the Amazon Resource Name (ARN) of an EC2 instance or an Amazon EC2 Auto Scaling group.
      

       

      Only EC2 instance and Amazon EC2 Auto Scaling group ARNs are currently supported.

      

    
  
  :type recommendationPreferenceNames: list
  :param recommendationPreferenceNames: **[REQUIRED]** 

    The name of the recommendation preference to delete.

    

  
    - *(string) --* 

    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`ComputeOptimizer.Client.exceptions.OptInRequiredException`

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.InternalServerException`

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.MissingAuthenticationToken`

  
  *   :py:class:`ComputeOptimizer.Client.exceptions.ThrottlingException`

  