ComputeOptimizer / Client / delete_recommendation_preferences

delete_recommendation_preferences#

ComputeOptimizer.Client.delete_recommendation_preferences(**kwargs)#

Deletes a recommendation preference, such as enhanced infrastructure metrics.

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

See also: AWS API Documentation

Request Syntax

response = client.delete_recommendation_preferences(
    resourceType='Ec2Instance'|'AutoScalingGroup'|'EbsVolume'|'LambdaFunction'|'NotApplicable'|'EcsService'|'License',
    scope={
        'name': 'Organization'|'AccountId'|'ResourceArn',
        'value': 'string'
    },
    recommendationPreferenceNames=[
        'EnhancedInfrastructureMetrics'|'InferredWorkloadTypes'|'ExternalMetricsPreference',
    ]
)
Parameters:
  • resourceType (string) –

    [REQUIRED]

    The target resource type of the recommendation preference to delete.

    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.

    Note

    The valid values for this parameter are Ec2Instance and AutoScalingGroup.

  • scope (dict) –

    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 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 Auto Scaling group.

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

  • recommendationPreferenceNames (list) –

    [REQUIRED]

    The name of the recommendation preference to delete.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

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