

# PutResourceConfig
<a name="API_PutResourceConfig"></a>

Records the configuration state for the resource provided in the request. The configuration state of a resource is represented in AWS Config as Configuration Items. Once this API records the configuration item, you can retrieve the list of configuration items for the custom resource type using existing AWS Config APIs. 

**Note**  
The custom resource type must be registered with AWS CloudFormation. This API accepts the configuration item registered with AWS CloudFormation.  
When you call this API, AWS Config only stores configuration state of the resource provided in the request. This API does not change or remediate the configuration of the resource.   
Write-only schema properites are not recorded as part of the published configuration item.

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

```
{
   "Configuration": "string",
   "ResourceId": "string",
   "ResourceName": "string",
   "ResourceType": "string",
   "SchemaVersionId": "string",
   "Tags": { 
      "string" : "string" 
   }
}
```

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

 ** [Configuration](#API_PutResourceConfig_RequestSyntax) **   <a name="config-PutResourceConfig-request-Configuration"></a>
The configuration object of the resource in valid JSON format. It must match the schema registered with AWS CloudFormation.  
The configuration JSON must not exceed 64 KB.
Type: String  
Required: Yes

 ** [ResourceId](#API_PutResourceConfig_RequestSyntax) **   <a name="config-PutResourceConfig-request-ResourceId"></a>
Unique identifier of the resource.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 768.  
Required: Yes

 ** [ResourceName](#API_PutResourceConfig_RequestSyntax) **   <a name="config-PutResourceConfig-request-ResourceName"></a>
Name of the resource.  
Type: String  
Required: No

 ** [ResourceType](#API_PutResourceConfig_RequestSyntax) **   <a name="config-PutResourceConfig-request-ResourceType"></a>
The type of the resource. The custom resource type must be registered with AWS CloudFormation.   
You cannot use the organization names “amzn”, “amazon”, “alexa”, “custom” with custom resource types. It is the first part of the ResourceType up to the first ::.
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 196.  
Required: Yes

 ** [SchemaVersionId](#API_PutResourceConfig_RequestSyntax) **   <a name="config-PutResourceConfig-request-SchemaVersionId"></a>
Version of the schema registered for the ResourceType in AWS CloudFormation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[A-Za-z0-9-]+`   
Required: Yes

 ** [Tags](#API_PutResourceConfig_RequestSyntax) **   <a name="config-PutResourceConfig-request-Tags"></a>
Tags associated with the resource.  
This field is not to be confused with the AWS-wide tag feature for AWS resources. Tags for `PutResourceConfig` are tags that you supply for the configuration items of your custom resources.
Type: String to string map  
Required: No

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

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

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

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

 ** InsufficientPermissionsException **   
Indicates one of the following errors:  
+ For [PutConfigRule](https://docs.aws.amazon.com/config/latest/APIReference/API_PutConfigRule.html), the rule cannot be created because the IAM role assigned to AWS Config lacks permissions to perform the config:Put\$1 action.
+ For [PutConfigRule](https://docs.aws.amazon.com/config/latest/APIReference/API_PutConfigRule.html), the AWS Lambda function cannot be invoked. Check the function ARN, and check the function's permissions.
+ For [PutOrganizationConfigRule](https://docs.aws.amazon.com/config/latest/APIReference/API_PutOrganizationConfigRule.html), organization AWS Config rule cannot be created because you do not have permissions to call IAM `GetRole` action or create a service-linked role.
+ For [PutConformancePack](https://docs.aws.amazon.com/config/latest/APIReference/API_PutConformancePack.html) and [PutOrganizationConformancePack](https://docs.aws.amazon.com/config/latest/APIReference/API_PutOrganizationConformancePack.html), a conformance pack cannot be created because you do not have the following permissions: 
  + You do not have permission to call IAM `GetRole` action or create a service-linked role.
  + You do not have permission to read Amazon S3 bucket or call SSM:GetDocument.
+ For [PutServiceLinkedConfigurationRecorder](https://docs.aws.amazon.com/config/latest/APIReference/API_PutServiceLinkedConfigurationRecorder.html), a service-linked configuration recorder cannot be created because you do not have the following permissions: IAM `CreateServiceLinkedRole`.
HTTP Status Code: 400

 ** MaxActiveResourcesExceededException **   
You have reached the limit of active custom resource types in your account. There is a limit of 100,000. Delete unused resources using [DeleteResourceConfig](https://docs.aws.amazon.com/config/latest/APIReference/API_DeleteResourceConfig.html) ``.  
HTTP Status Code: 400

 ** NoRunningConfigurationRecorderException **   
There is no configuration recorder running.  
HTTP Status Code: 400

 ** ValidationException **   
The requested operation is not valid. You will see this exception if there are missing required fields or if the input value fails the validation.  
For [PutStoredQuery](https://docs.aws.amazon.com/config/latest/APIReference/API_PutStoredQuery.html), one of the following errors:  
+ There are missing required fields.
+ The input value fails the validation.
+ You are trying to create more than 300 queries.
For [DescribeConfigurationRecorders](https://docs.aws.amazon.com/config/latest/APIReference/API_DescribeConfigurationRecorders.html) and [DescribeConfigurationRecorderStatus](https://docs.aws.amazon.com/config/latest/APIReference/API_DescribeConfigurationRecorderStatus.html), one of the following errors:  
+ You have specified more than one configuration recorder.
+ You have provided a service principal for service-linked configuration recorder that is not valid.
For [AssociateResourceTypes](https://docs.aws.amazon.com/config/latest/APIReference/API_AssociateResourceTypes.html) and [DisassociateResourceTypes](https://docs.aws.amazon.com/config/latest/APIReference/API_DisassociateResourceTypes.html), one of the following errors:  
+ Your configuraiton recorder has a recording strategy that does not allow the association or disassociation of resource types.
+ One or more of the specified resource types are already associated or disassociated with the configuration recorder.
+ For service-linked configuration recorders, the configuration recorder does not record one or more of the specified resource types.
HTTP Status Code: 400

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