2023/11/21 - Amazon CloudFront KeyValueStore - 6 new api methods
Changes This release adds support for CloudFront KeyValueStore, a globally managed key value datastore associated with CloudFront Functions.
Returns a list of key value pairs.
See also: AWS API Documentation
Request Syntax
client.list_keys( KvsARN='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Key Value Store.
string
If nextToken is returned in the response, there are more results available. Make the next call using the returned token to retrieve the next page.
integer
Maximum number of results that are returned per call. The default is 10 and maximum allowed page is 50.
dict
Response Syntax
{ 'NextToken': 'string', 'Items': [ { 'Key': 'string', 'Value': 'string' }, ] }
Response Structure
(dict) --
NextToken (string) --
If nextToken is returned in the response, there are more results available. Make the next call using the returned token to retrieve the next page.
Items (list) --
Key value pairs
(dict) --
A key value pair.
Key (string) --
The key of the key value pair.
Value (string) --
The value of the key value pair.
Creates a new key value pair or replaces the value of an existing key.
See also: AWS API Documentation
Request Syntax
client.put_key( Key='string', Value='string', KvsARN='string', IfMatch='string' )
string
[REQUIRED]
The key to put.
string
[REQUIRED]
The value to put.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Key Value Store.
string
[REQUIRED]
The current version (ETag) of the Key Value Store that you are putting keys into, which you can get using DescribeKeyValueStore.
dict
Response Syntax
{ 'ItemCount': 123, 'TotalSizeInBytes': 123, 'ETag': 'string' }
Response Structure
(dict) --
Metadata information about a Key Value Store.
ItemCount (integer) --
Number of key value pairs in the Key Value Store after the successful put.
TotalSizeInBytes (integer) --
Total size of the Key Value Store after the successful put, in bytes.
ETag (string) --
The current version identifier of the Key Value Store after the successful put.
Returns a key value pair.
See also: AWS API Documentation
Request Syntax
client.get_key( KvsARN='string', Key='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Key Value Store.
string
[REQUIRED]
The key to get.
dict
Response Syntax
{ 'Key': 'string', 'Value': 'string', 'ItemCount': 123, 'TotalSizeInBytes': 123 }
Response Structure
(dict) --
A key value pair.
Key (string) --
The key of the key value pair.
Value (string) --
The value of the key value pair.
ItemCount (integer) --
Number of key value pairs in the Key Value Store.
TotalSizeInBytes (integer) --
Total size of the Key Value Store in bytes.
Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.
See also: AWS API Documentation
Request Syntax
client.update_keys( KvsARN='string', IfMatch='string', Puts=[ { 'Key': 'string', 'Value': 'string' }, ], Deletes=[ { 'Key': 'string' }, ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Key Value Store.
string
[REQUIRED]
The current version (ETag) of the Key Value Store that you are updating keys of, which you can get using DescribeKeyValueStore.
list
List of key value pairs to put.
(dict) --
List item for key value pair to put.
Key (string) -- [REQUIRED]
The key of the key value pair list item to put.
Value (string) -- [REQUIRED]
The value for the key value pair to put.
list
List of keys to delete.
(dict) --
List item for keys to delete.
Key (string) -- [REQUIRED]
The key of the key value pair to be deleted.
dict
Response Syntax
{ 'ItemCount': 123, 'TotalSizeInBytes': 123, 'ETag': 'string' }
Response Structure
(dict) --
Metadata information about a Key Value Store.
ItemCount (integer) --
Number of key value pairs in the Key Value Store after the successful update.
TotalSizeInBytes (integer) --
Total size of the Key Value Store after the successful update, in bytes.
ETag (string) --
The current version identifier of the Key Value Store after the successful update.
Deletes the key value pair specified by the key.
See also: AWS API Documentation
Request Syntax
client.delete_key( KvsARN='string', Key='string', IfMatch='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Key Value Store.
string
[REQUIRED]
The key to delete.
string
[REQUIRED]
The current version (ETag) of the Key Value Store that you are deleting keys from, which you can get using DescribeKeyValueStore.
dict
Response Syntax
{ 'ItemCount': 123, 'TotalSizeInBytes': 123, 'ETag': 'string' }
Response Structure
(dict) --
Metadata information about a Key Value Store.
ItemCount (integer) --
Number of key value pairs in the Key Value Store after the successful delete.
TotalSizeInBytes (integer) --
Total size of the Key Value Store after the successful delete, in bytes.
ETag (string) --
The current version identifier of the Key Value Store after the successful delete.
Returns metadata information about Key Value Store.
See also: AWS API Documentation
Request Syntax
client.describe_key_value_store( KvsARN='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Key Value Store.
dict
Response Syntax
{ 'ItemCount': 123, 'TotalSizeInBytes': 123, 'KvsARN': 'string', 'Created': datetime(2015, 1, 1), 'ETag': 'string', 'LastModified': datetime(2015, 1, 1) }
Response Structure
(dict) --
Metadata information about a Key Value Store.
ItemCount (integer) --
Number of key value pairs in the Key Value Store.
TotalSizeInBytes (integer) --
Total size of the Key Value Store in bytes.
KvsARN (string) --
The Amazon Resource Name (ARN) of the Key Value Store.
Created (datetime) --
Date and time when the Key Value Store was created.
ETag (string) --
The version identifier for the current version of the Key Value Store.
LastModified (datetime) --
Date and time when the key value pairs in the Key Value Store was last modified.