Skip to main content

key_value_stores

Creates, updates, deletes or gets a key_value_store resource or lists key_value_stores in a region

Overview

Namekey_value_stores
TypeResource
DescriptionThe key value store. Use this to separate data from function code, allowing you to update data without having to publish a new version of a function. The key value store holds keys and their corresponding values.
Idaws.cloudfront.key_value_stores

Fields

NameDatatypeDescription
arnstring
idstring
statusstring
namestringThe name of the key value store.
commentstringA comment for the key value store.
import_sourceobjectThe import source for the key value store.
regionstringAWS region.

For more information, see AWS::CloudFront::KeyValueStore.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all key_value_stores in a region.

SELECT
region,
arn,
id,
status,
name,
comment,
import_source
FROM aws.cloudfront.key_value_stores
;

Gets all properties from an individual key_value_store.

SELECT
region,
arn,
id,
status,
name,
comment,
import_source
FROM aws.cloudfront.key_value_stores
WHERE data__Identifier = '<Name>';

INSERT example

Use the following StackQL query and manifest file to create a new key_value_store resource, using stack-deploy.

/*+ create */
INSERT INTO aws.cloudfront.key_value_stores (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.cloudfront.key_value_stores
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';

Permissions

To operate on the key_value_stores resource, the following permissions are required:

Create

cloudfront:CreateKeyValueStore,
cloudfront:DescribeKeyValueStore,
s3:GetObject,
s3:HeadObject,
s3:GetBucketLocation

Delete

cloudfront:DeleteKeyValueStore,
cloudfront:DescribeKeyValueStore

List

cloudfront:ListKeyValueStores

Read

cloudfront:DescribeKeyValueStore

Update

cloudfront:UpdateKeyValueStore,
cloudfront:DescribeKeyValueStore