Skip to main content

keys

Creates, updates, deletes, gets or lists a keys resource.

Overview

Namekeys
TypeResource
Idaws.cloudfront_keyvaluestore.keys

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
item_countintegerNumber of key value pairs in the Key Value Store.
keystringThe key of the key value pair.
total_size_in_bytesinteger (int64)Total size of the Key Value Store in bytes.
valuestringThe value of the key value pair.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_keyselectkvs_arn, key, regionReturns a key value pair.
list_keysselectkvs_arn, regionNextToken, MaxResultsReturns a list of key value pairs.
update_keysupdatekvs_arn, If-Match, regionPuts or Deletes multiple key value pairs in a single, all-or-nothing operation.
put_keyreplacekey, kvs_arn, If-Match, regionCreates a new key value pair or replaces the value of an existing key.
delete_keydeletekvs_arn, key, If-Match, regionDeletes the key value pair specified by the key.

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.

NameDatatypeDescription
If-MatchstringThe current version (ETag) of the Key Value Store that you are deleting keys from, which you can get using DescribeKeyValueStore.
keystringThe key to delete.
kvs_arnstringThe Amazon Resource Name (ARN) of the Key Value Store.
regionstringAWS region (default: us-east-1)
MaxResultsintegerMaximum number of results that are returned per call. The default is 10 and maximum allowed page is 50.
NextTokenstringIf nextToken is returned in the response, there are more results available. Make the next call using the returned token to retrieve the next page.

SELECT examples

Returns a key value pair.

SELECT
item_count,
key,
total_size_in_bytes,
value
FROM aws.cloudfront_keyvaluestore.keys
WHERE kvs_arn = '{{ kvs_arn }}' -- required
AND key = '{{ key }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.

UPDATE aws.cloudfront_keyvaluestore.keys
SET
Puts = '{{ Puts }}',
Deletes = '{{ Deletes }}'
WHERE
kvs_arn = '{{ kvs_arn }}' --required
AND `If-Match` = '{{ If-Match }}' --required
AND region = '{{ region }}' --required
RETURNING
e_tag,
item_count,
total_size_in_bytes;

REPLACE examples

Creates a new key value pair or replaces the value of an existing key.

REPLACE aws.cloudfront_keyvaluestore.keys
SET
Value = '{{ Value }}'
WHERE
key = '{{ key }}' --required
AND kvs_arn = '{{ kvs_arn }}' --required
AND `If-Match` = '{{ If-Match }}' --required
AND region = '{{ region }}' --required
RETURNING
e_tag,
item_count,
total_size_in_bytes;

DELETE examples

Deletes the key value pair specified by the key.

DELETE FROM aws.cloudfront_keyvaluestore.keys
WHERE kvs_arn = '{{ kvs_arn }}' --required
AND key = '{{ key }}' --required
AND `If-Match` = '{{ If-Match }}' --required
AND region = '{{ region }}' --required
;