

# DeleteIndexPolicy
<a name="API_DeleteIndexPolicy"></a>

Deletes a log-group level field index policy that was applied to a single log group. The indexing of the log events that happened before you delete the policy will still be used for as many as 30 days to improve CloudWatch Logs Insights queries.

If the deleted policy included facet configurations, those facets will no longer be available for interactive exploration in the CloudWatch Logs Insights console for this log group. However, facet data is retained for up to 30 days.

You can't use this operation to delete an account-level index policy. Instead, use [DeleteAccountPolicy](https://docs.amazonaws.cn/AmazonCloudWatchLogs/latest/APIReference/API_DeleteAccountPolicy.html).

If you delete a log-group level field index policy and there is an account-level field index policy, in a few minutes the log group begins using that account-wide policy to index new incoming log events. This operation only affects log group-level policies, including any facet configurations, and preserves any data source-based account policies that may apply to the log group.

## Request Syntax
<a name="API_DeleteIndexPolicy_RequestSyntax"></a>

```
{
   "logGroupIdentifier": "string"
}
```

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

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [logGroupIdentifier](#API_DeleteIndexPolicy_RequestSyntax) **   <a name="CWL-DeleteIndexPolicy-request-logGroupIdentifier"></a>
The log group to delete the index policy for. You can specify either the name or the ARN of the log group.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Pattern: `[\w#+=/:,.@-]*`   
Required: Yes

## Response Elements
<a name="API_DeleteIndexPolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

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

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

 ** InvalidParameterException **   
A parameter is specified incorrectly.  
HTTP Status Code: 400

 ** LimitExceededException **   
You have reached the maximum number of resources that can be created.  
HTTP Status Code: 400

 ** OperationAbortedException **   
Multiple concurrent requests to update the same resource were in conflict.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
The specified resource does not exist.  
HTTP Status Code: 400

 ** ServiceUnavailableException **   
The service cannot complete the request.  
HTTP Status Code: 500

## See Also
<a name="API_DeleteIndexPolicy_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/logs-2014-03-28/DeleteIndexPolicy) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/logs-2014-03-28/DeleteIndexPolicy) 
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/logs-2014-03-28/DeleteIndexPolicy) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/logs-2014-03-28/DeleteIndexPolicy) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/logs-2014-03-28/DeleteIndexPolicy) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/logs-2014-03-28/DeleteIndexPolicy) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/logs-2014-03-28/DeleteIndexPolicy) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/logs-2014-03-28/DeleteIndexPolicy) 
+  [Amazon SDK for Python](https://docs.amazonaws.cn/goto/boto3/logs-2014-03-28/DeleteIndexPolicy) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/logs-2014-03-28/DeleteIndexPolicy) 