PutResourceConfig - AWS Config

PutResourceConfig

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

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

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Configuration

The configuration object of the resource in valid JSON format. It must match the schema registered with AWS CloudFormation.

Note

The configuration JSON must not exceed 64 KB.

Type: String

Required: Yes

ResourceId

Unique identifier of the resource.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 768.

Required: Yes

ResourceName

Name of the resource.

Type: String

Required: No

ResourceType

The type of the resource. The custom resource type must be registered with AWS CloudFormation.

Note

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

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

Tags associated with the resource.

Note

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

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

Errors

For information about the errors that are common to all actions, see Common Errors.

InsufficientPermissionsException

Indicates one of the following errors:

  • For PutConfigRule, the rule cannot be created because the IAM role assigned to AWS Config lacks permissions to perform the config:Put* action.

  • For PutConfigRule, the AWS Lambda function cannot be invoked. Check the function ARN, and check the function's permissions.

  • For PutOrganizationConfigRule, 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 and PutOrganizationConformancePack, 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.

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 .

HTTP Status Code: 400

NoRunningConfigurationRecorderException

There is no configuration recorder running.

HTTP Status Code: 400

ValidationException

The requested action is not valid.

For PutStoredQuery, you will see this exception if there are missing required fields or if the input value fails the validation, or if you are trying to create more than 300 queries.

For GetStoredQuery, ListStoredQuery, and DeleteStoredQuery you will see this exception if there are missing required fields or if the input value fails the validation.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: