resource_configs
Creates, updates, deletes, gets or lists a resource_configs resource.
Overview
| Name | resource_configs |
| Type | Resource |
| Id | aws.config.resource_configs |
Fields
The following fields are returned by SELECT queries:
- batch_get_resource_config
| Name | Datatype | Description |
|---|---|---|
base_configuration_items | array | A list that contains the current configuration of one or more resources. |
unprocessed_resource_keys | array | A list of resource keys that were not processed with the current response. The unprocessesResourceKeys value is in the same form as ResourceKeys, so the value can be directly provided to a subsequent BatchGetResourceConfig operation. If there are no unprocessed resource keys, the response contains an empty unprocessedResourceKeys list. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_resource_config | select | region | Returns the BaseConfigurationItem for one or more requested resources. The operation also returns a list of resources that are not processed in the current request. If there are no unprocessed resources, the operation returns an empty unprocessedResourceKeys list. The API does not return results for deleted resources. The API does not return any tags for the requested resources. This information is filtered out of the supplementaryConfiguration section of the API response. | |
put_resource_config | replace | region, ResourceType, SchemaVersionId, ResourceId, Configuration | Records the configuration state for the resource provided in the request. The configuration state of a resource is represented in 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 Config APIs. The custom resource type must be registered with CloudFormation. This API accepts the configuration item registered with CloudFormation. When you call this API, 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. | |
delete_resource_config | delete | region | Records the configuration state for a custom resource that has been deleted. This API records a new ConfigurationItem with a ResourceDeleted status. You can retrieve the ConfigurationItems recorded for this resource in your Config History. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- batch_get_resource_config
Returns the BaseConfigurationItem for one or more requested resources. The operation also returns a list of resources that are not processed in the current request. If there are no unprocessed resources, the operation returns an empty unprocessedResourceKeys list. The API does not return results for deleted resources. The API does not return any tags for the requested resources. This information is filtered out of the supplementaryConfiguration section of the API response.
SELECT
base_configuration_items,
unprocessed_resource_keys
FROM aws.config.resource_configs
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_resource_config
Records the configuration state for the resource provided in the request. The configuration state of a resource is represented in 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 Config APIs. The custom resource type must be registered with CloudFormation. This API accepts the configuration item registered with CloudFormation. When you call this API, 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.
REPLACE aws.config.resource_configs
SET
ResourceType = '{{ ResourceType }}',
SchemaVersionId = '{{ SchemaVersionId }}',
ResourceId = '{{ ResourceId }}',
ResourceName = '{{ ResourceName }}',
Configuration = '{{ Configuration }}',
Tags = '{{ Tags }}'
WHERE
region = '{{ region }}' --required
AND ResourceType = '{{ ResourceType }}' --required
AND SchemaVersionId = '{{ SchemaVersionId }}' --required
AND ResourceId = '{{ ResourceId }}' --required
AND Configuration = '{{ Configuration }}' --required;
DELETE examples
- delete_resource_config
Records the configuration state for a custom resource that has been deleted. This API records a new ConfigurationItem with a ResourceDeleted status. You can retrieve the ConfigurationItems recorded for this resource in your Config History.
DELETE FROM aws.config.resource_configs
WHERE region = '{{ region }}' --required
;