

# DeleteResourceMetricsConfiguration
<a name="API_DeleteResourceMetricsConfiguration"></a>

Deletes the resource metrics configuration for an Amazon resource. After you delete the configuration, Amazon CloudWatch stops collecting detailed metrics for the resource. Metric data that Amazon CloudWatch already collected for the resource is not deleted.

This operation returns a `ResourceNotFoundException` if no resource metrics configuration exists for the specified resource ARN. Verify that the resource ARN is correct.

To delete a resource metrics configuration, you must have the `cloudwatch:DeleteResourceMetricsConfiguration` permission. For information about scoping this permission to specific resources, see [Condition keys for resource metrics configuration access](https://docs.amazonaws.cn/AmazonCloudWatch/latest/monitoring/iam-cw-condition-keys-resource-arn.html) in the *Amazon CloudWatch User Guide*.

## Request Parameters
<a name="API_DeleteResourceMetricsConfiguration_RequestParameters"></a>

 ** ResourceArn **   
The Amazon Resource Name (ARN) of the Amazon resource to delete the resource metrics configuration for.  
Type: String  
Length Constraints: Minimum length of 20. Maximum length of 2048.  
Pattern: `arn:[a-zA-Z0-9-]+:[a-zA-Z0-9-]+:[a-zA-Z0-9-]*:\d{12}:.+`   
Required: Yes

## Errors
<a name="API_DeleteResourceMetricsConfiguration_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** ResourceNotFoundException **   
The named resource does not exist.  
HTTP Status Code: 404

## See Also
<a name="API_DeleteResourceMetricsConfiguration_SeeAlso"></a>

For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 
+  [Amazon SDK for C\+\+](https://docs.amazonaws.cn/goto/SdkForCpp/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 
+  [Amazon SDK for Python (Boto3)](https://docs.amazonaws.cn/goto/boto3/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/monitoring-2010-08-01/DeleteResourceMetricsConfiguration) 