

# PutManagedInsightRules

 Creates a managed Contributor Insights rule for a specified AWS resource. When you enable a managed rule, you create a Contributor Insights rule that collects data from AWS services. You cannot edit these rules with `PutInsightRule`. The rules can be enabled, disabled, and deleted using `EnableInsightRules`, `DisableInsightRules`, and `DeleteInsightRules`. If a previously created managed rule is currently disabled, a subsequent call to this API will re-enable it. Use `ListManagedInsightRules` to describe all available rules. 

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

```
{
   "ManagedRules": [ 
      { 
         "ResourceARN": "{{string}}",
         "Tags": [ 
            { 
               "Key": "{{string}}",
               "Value": "{{string}}"
            }
         ],
         "TemplateName": "{{string}}"
      }
   ]
}
```

## Request Parameters
<a name="API_PutManagedInsightRules_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.

 ** [ManagedRules](#API_PutManagedInsightRules_RequestSyntax) **   <a name="ACW-PutManagedInsightRules-request-ManagedRules"></a>
 A list of `ManagedRules` to enable.   
Type: Array of [ManagedRule](API_ManagedRule.md) objects  
Required: Yes

## Response Syntax
<a name="API_PutManagedInsightRules_ResponseSyntax"></a>

```
{
   "Failures": [ 
      { 
         "ExceptionType": "string",
         "FailureCode": "string",
         "FailureDescription": "string",
         "FailureResource": "string"
      }
   ]
}
```

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

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

The following data is returned in JSON format by the service.

 ** [Failures](#API_PutManagedInsightRules_ResponseSyntax) **   <a name="ACW-PutManagedInsightRules-response-Failures"></a>
 An array that lists the rules that could not be enabled.   
Type: Array of [PartialFailure](API_PartialFailure.md) objects

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

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

 ** InvalidParameterValue **   
The value of an input parameter is bad or out-of-range.    
 ** message **   

HTTP Status Code: 400

 ** MissingParameter **   
An input parameter that is required is missing.    
 ** message **   

HTTP Status Code: 400

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

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