Skip to content

CloudFront KeyValueStore  >  Operations  >  put_key

put_key

Operation

put_key async

put_key(request: PutKeyInput | PutKeyInputDict, /, *, plugins: list[Plugin] | None = None) -> PutKeyOutput
put_key(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[PutKeyInputDict]) -> PutKeyOutput

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

Parameters:

Name Type Description Default
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
PutKeyOutput

An instance of PutKeyOutput.

Input

Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.

Model

PutKeyInput dataclass

Bases: _SerdeShape

A key value pair.

Attributes
if_match class-attribute instance-attribute
if_match: str | None = ...

The current version (ETag) of the Key Value Store that you are putting keys into, which you can get using DescribeKeyValueStore.

key class-attribute instance-attribute
key: str | None = ...

The key to put.

kvs_arn class-attribute instance-attribute
kvs_arn: str | None = ...

The Amazon Resource Name (ARN) of the Key Value Store.

value class-attribute instance-attribute
value: str | None = ...

The value to put.

Dictionaries

PutKeyInputDict

Bases: TypedDict

Dictionary form of PutKeyInput.

Attributes
if_match instance-attribute
if_match: Required[str]

The current version (ETag) of the Key Value Store that you are putting keys into, which you can get using DescribeKeyValueStore.

key instance-attribute
key: Required[str]

The key to put.

kvs_arn instance-attribute
kvs_arn: Required[str]

The Amazon Resource Name (ARN) of the Key Value Store.

value instance-attribute
value: Required[str]

The value to put.

Output

PutKeyOutput dataclass

Bases: _SerdeShape

Metadata information about a Key Value Store.

Attributes

e_tag instance-attribute
e_tag: str

The current version identifier of the Key Value Store after the successful put.

item_count instance-attribute
item_count: int

Number of key value pairs in the Key Value Store after the successful put.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

total_size_in_bytes instance-attribute
total_size_in_bytes: int

Total size of the Key Value Store after the successful put, in bytes.