

# GetCustomRulePolicy
<a name="API_GetCustomRulePolicy"></a>

Returns the policy definition containing the logic for your AWS Config Custom Policy rule.

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

```
{
   "ConfigRuleName": "string"
}
```

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

 ** [ConfigRuleName](#API_GetCustomRulePolicy_RequestSyntax) **   <a name="config-GetCustomRulePolicy-request-ConfigRuleName"></a>
The name of your AWS Config Custom Policy rule.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `.*\S.*`   
Required: No

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

```
{
   "PolicyText": "string"
}
```

## Response Elements
<a name="API_GetCustomRulePolicy_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.

 ** [PolicyText](#API_GetCustomRulePolicy_ResponseSyntax) **   <a name="config-GetCustomRulePolicy-response-PolicyText"></a>
The policy definition containing the logic for your AWS Config Custom Policy rule.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 10000.

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

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

 ** NoSuchConfigRuleException **   
The AWS Config rule in the request is not valid. Verify that the rule is an AWS Config Process Check rule, that the rule name is correct, and that valid Amazon Resouce Names (ARNs) are used before trying again.  
HTTP Status Code: 400

## See Also
<a name="API_GetCustomRulePolicy_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/config-2014-11-12/GetCustomRulePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/config-2014-11-12/GetCustomRulePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/config-2014-11-12/GetCustomRulePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/config-2014-11-12/GetCustomRulePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/config-2014-11-12/GetCustomRulePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/config-2014-11-12/GetCustomRulePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/config-2014-11-12/GetCustomRulePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/config-2014-11-12/GetCustomRulePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/config-2014-11-12/GetCustomRulePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/config-2014-11-12/GetCustomRulePolicy) 