

# Amazon CloudFront KeyValueStore
<a name="API_Operations_Amazon_CloudFront_KeyValueStore"></a>

The following actions are supported by Amazon CloudFront KeyValueStore:
+  [DeleteKey](API_kvs_DeleteKey.md) 
+  [DescribeKeyValueStore](API_kvs_DescribeKeyValueStore.md) 
+  [GetKey](API_kvs_GetKey.md) 
+  [ListKeys](API_kvs_ListKeys.md) 
+  [PutKey](API_kvs_PutKey.md) 
+  [UpdateKeys](API_kvs_UpdateKeys.md) 

# DeleteKey
<a name="API_kvs_DeleteKey"></a>

Deletes the key-value pair specified by the key.

## Request Syntax
<a name="API_kvs_DeleteKey_RequestSyntax"></a>

```
DELETE /key-value-stores/KvsARN/keys/Key HTTP/1.1
If-Match: IfMatch
```

## URI Request Parameters
<a name="API_kvs_DeleteKey_RequestParameters"></a>

The request uses the following URI parameters.

 ** [IfMatch](#API_kvs_DeleteKey_RequestSyntax) **   <a name="cloudfront-kvs_DeleteKey-request-IfMatch"></a>
The current version (`ETag`) of the key value store that you are deleting keys from, which you can get by using the `DescribeKeyValueStore` API operation.  
Required: Yes

 ** [Key](#API_kvs_DeleteKey_RequestSyntax) **   <a name="cloudfront-kvs_DeleteKey-request-uri-Key"></a>
The key to delete.  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: Yes

 ** [KvsARN](#API_kvs_DeleteKey_RequestSyntax) **   <a name="cloudfront-kvs_DeleteKey-request-uri-KvsARN"></a>
The Amazon Resource Name (ARN) of the key value store.  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

## Request Body
<a name="API_kvs_DeleteKey_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_kvs_DeleteKey_ResponseSyntax"></a>

```
HTTP/1.1 200
ETag: ETag
Content-type: application/json

{
   "ItemCount": number,
   "TotalSizeInBytes": number
}
```

## Response Elements
<a name="API_kvs_DeleteKey_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers.

 ** [ETag](#API_kvs_DeleteKey_ResponseSyntax) **   <a name="cloudfront-kvs_DeleteKey-response-ETag"></a>
The current version identifier of the key value store after the successful delete.

The following data is returned in JSON format by the service.

 ** [ItemCount](#API_kvs_DeleteKey_ResponseSyntax) **   <a name="cloudfront-kvs_DeleteKey-response-ItemCount"></a>
Number of key-value pairs in the key value store after the successful delete.  
Type: Integer

 ** [TotalSizeInBytes](#API_kvs_DeleteKey_ResponseSyntax) **   <a name="cloudfront-kvs_DeleteKey-response-TotalSizeInBytes"></a>
Total size of the key value store after the successful delete, in bytes.  
Type: Long

## Errors
<a name="API_kvs_DeleteKey_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
Access denied.  
HTTP Status Code: 403

 ** ConflictException **   
Resource is not in expected state.  
HTTP Status Code: 409

 ** InternalServerException **   
Internal server error.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
Resource was not found.  
HTTP Status Code: 404

 ** ServiceQuotaExceededException **   
Limit exceeded.  
HTTP Status Code: 402

 ** ValidationException **   
Validation failed.  
HTTP Status Code: 400

## See Also
<a name="API_kvs_DeleteKey_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudfront-keyvaluestore-2022-07-26/DeleteKey) 

# DescribeKeyValueStore
<a name="API_kvs_DescribeKeyValueStore"></a>

Returns metadata information about the key value store.

## Request Syntax
<a name="API_kvs_DescribeKeyValueStore_RequestSyntax"></a>

```
GET /key-value-stores/KvsARN HTTP/1.1
```

## URI Request Parameters
<a name="API_kvs_DescribeKeyValueStore_RequestParameters"></a>

The request uses the following URI parameters.

 ** [KvsARN](#API_kvs_DescribeKeyValueStore_RequestSyntax) **   <a name="cloudfront-kvs_DescribeKeyValueStore-request-uri-KvsARN"></a>
The Amazon Resource Name (ARN) of the key value store.  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

## Request Body
<a name="API_kvs_DescribeKeyValueStore_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_kvs_DescribeKeyValueStore_ResponseSyntax"></a>

```
HTTP/1.1 200
ETag: ETag
Content-type: application/json

{
   "Created": number,
   "FailureReason": "string",
   "ItemCount": number,
   "KvsARN": "string",
   "LastModified": number,
   "Status": "string",
   "TotalSizeInBytes": number
}
```

## Response Elements
<a name="API_kvs_DescribeKeyValueStore_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers.

 ** [ETag](#API_kvs_DescribeKeyValueStore_ResponseSyntax) **   <a name="cloudfront-kvs_DescribeKeyValueStore-response-ETag"></a>
The version identifier for the current version of the key value store.

The following data is returned in JSON format by the service.

 ** [Created](#API_kvs_DescribeKeyValueStore_ResponseSyntax) **   <a name="cloudfront-kvs_DescribeKeyValueStore-response-Created"></a>
Date and time when the key value store was created.  
Type: Timestamp

 ** [FailureReason](#API_kvs_DescribeKeyValueStore_ResponseSyntax) **   <a name="cloudfront-kvs_DescribeKeyValueStore-response-FailureReason"></a>
The reason why the key value store wasn't created.  
Type: String

 ** [ItemCount](#API_kvs_DescribeKeyValueStore_ResponseSyntax) **   <a name="cloudfront-kvs_DescribeKeyValueStore-response-ItemCount"></a>
Number of key-value pairs in the key value store.  
Type: Integer

 ** [KvsARN](#API_kvs_DescribeKeyValueStore_ResponseSyntax) **   <a name="cloudfront-kvs_DescribeKeyValueStore-response-KvsARN"></a>
The Amazon Resource Name (ARN) of the key value store.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2048.

 ** [LastModified](#API_kvs_DescribeKeyValueStore_ResponseSyntax) **   <a name="cloudfront-kvs_DescribeKeyValueStore-response-LastModified"></a>
Date and time when the key-value pairs in the key value store was last modified.  
Type: Timestamp

 ** [Status](#API_kvs_DescribeKeyValueStore_ResponseSyntax) **   <a name="cloudfront-kvs_DescribeKeyValueStore-response-Status"></a>
The current status of the key value store.  
Type: String

 ** [TotalSizeInBytes](#API_kvs_DescribeKeyValueStore_ResponseSyntax) **   <a name="cloudfront-kvs_DescribeKeyValueStore-response-TotalSizeInBytes"></a>
Total size of the key value store in bytes.  
Type: Long

## Errors
<a name="API_kvs_DescribeKeyValueStore_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
Access denied.  
HTTP Status Code: 403

 ** ConflictException **   
Resource is not in expected state.  
HTTP Status Code: 409

 ** InternalServerException **   
Internal server error.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
Resource was not found.  
HTTP Status Code: 404

## See Also
<a name="API_kvs_DescribeKeyValueStore_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudfront-keyvaluestore-2022-07-26/DescribeKeyValueStore) 

# GetKey
<a name="API_kvs_GetKey"></a>

Returns a key-value pair.

## Request Syntax
<a name="API_kvs_GetKey_RequestSyntax"></a>

```
GET /key-value-stores/KvsARN/keys/Key HTTP/1.1
```

## URI Request Parameters
<a name="API_kvs_GetKey_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Key](#API_kvs_GetKey_RequestSyntax) **   <a name="cloudfront-kvs_GetKey-request-uri-Key"></a>
The key to get.  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: Yes

 ** [KvsARN](#API_kvs_GetKey_RequestSyntax) **   <a name="cloudfront-kvs_GetKey-request-uri-KvsARN"></a>
The Amazon Resource Name (ARN) of the key value store.  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

## Request Body
<a name="API_kvs_GetKey_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_kvs_GetKey_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "ItemCount": number,
   "Key": "string",
   "TotalSizeInBytes": number,
   "Value": "string"
}
```

## Response Elements
<a name="API_kvs_GetKey_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ItemCount](#API_kvs_GetKey_ResponseSyntax) **   <a name="cloudfront-kvs_GetKey-response-ItemCount"></a>
Number of key-value pairs in the key value store.  
Type: Integer

 ** [Key](#API_kvs_GetKey_ResponseSyntax) **   <a name="cloudfront-kvs_GetKey-response-Key"></a>
The key of the key-value pair.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.

 ** [TotalSizeInBytes](#API_kvs_GetKey_ResponseSyntax) **   <a name="cloudfront-kvs_GetKey-response-TotalSizeInBytes"></a>
Total size of the key value store in bytes.  
Type: Long

 ** [Value](#API_kvs_GetKey_ResponseSyntax) **   <a name="cloudfront-kvs_GetKey-response-Value"></a>
The value of the key-value pair.  
Type: String

## Errors
<a name="API_kvs_GetKey_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
Access denied.  
HTTP Status Code: 403

 ** ConflictException **   
Resource is not in expected state.  
HTTP Status Code: 409

 ** InternalServerException **   
Internal server error.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
Resource was not found.  
HTTP Status Code: 404

## See Also
<a name="API_kvs_GetKey_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudfront-keyvaluestore-2022-07-26/GetKey) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudfront-keyvaluestore-2022-07-26/GetKey) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudfront-keyvaluestore-2022-07-26/GetKey) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudfront-keyvaluestore-2022-07-26/GetKey) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudfront-keyvaluestore-2022-07-26/GetKey) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudfront-keyvaluestore-2022-07-26/GetKey) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudfront-keyvaluestore-2022-07-26/GetKey) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudfront-keyvaluestore-2022-07-26/GetKey) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudfront-keyvaluestore-2022-07-26/GetKey) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudfront-keyvaluestore-2022-07-26/GetKey) 

# ListKeys
<a name="API_kvs_ListKeys"></a>

Returns a list of key-value pairs.

## Request Syntax
<a name="API_kvs_ListKeys_RequestSyntax"></a>

```
GET /key-value-stores/KvsARN/keys?MaxResults=MaxResults&NextToken=NextToken HTTP/1.1
```

## URI Request Parameters
<a name="API_kvs_ListKeys_RequestParameters"></a>

The request uses the following URI parameters.

 ** [KvsARN](#API_kvs_ListKeys_RequestSyntax) **   <a name="cloudfront-kvs_ListKeys-request-uri-KvsARN"></a>
The Amazon Resource Name (ARN) of the key value store.  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

 ** [MaxResults](#API_kvs_ListKeys_RequestSyntax) **   <a name="cloudfront-kvs_ListKeys-request-uri-MaxResults"></a>
Maximum number of results that are returned per call. The default is 10 and maximum allowed page is 50.  
Valid Range: Minimum value of 1. Maximum value of 50.

 ** [NextToken](#API_kvs_ListKeys_RequestSyntax) **   <a name="cloudfront-kvs_ListKeys-request-uri-NextToken"></a>
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.

## Request Body
<a name="API_kvs_ListKeys_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_kvs_ListKeys_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Items": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_kvs_ListKeys_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Items](#API_kvs_ListKeys_ResponseSyntax) **   <a name="cloudfront-kvs_ListKeys-response-Items"></a>
The key-value pairs.  
Type: Array of [ListKeysResponseListItem](API_kvs_ListKeysResponseListItem.md) objects

 ** [NextToken](#API_kvs_ListKeys_ResponseSyntax) **   <a name="cloudfront-kvs_ListKeys-response-NextToken"></a>
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.  
Type: String

## Errors
<a name="API_kvs_ListKeys_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
Access denied.  
HTTP Status Code: 403

 ** ConflictException **   
Resource is not in expected state.  
HTTP Status Code: 409

 ** InternalServerException **   
Internal server error.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
Resource was not found.  
HTTP Status Code: 404

 ** ValidationException **   
Validation failed.  
HTTP Status Code: 400

## See Also
<a name="API_kvs_ListKeys_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudfront-keyvaluestore-2022-07-26/ListKeys) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudfront-keyvaluestore-2022-07-26/ListKeys) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudfront-keyvaluestore-2022-07-26/ListKeys) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudfront-keyvaluestore-2022-07-26/ListKeys) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudfront-keyvaluestore-2022-07-26/ListKeys) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudfront-keyvaluestore-2022-07-26/ListKeys) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudfront-keyvaluestore-2022-07-26/ListKeys) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudfront-keyvaluestore-2022-07-26/ListKeys) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudfront-keyvaluestore-2022-07-26/ListKeys) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudfront-keyvaluestore-2022-07-26/ListKeys) 

# PutKey
<a name="API_kvs_PutKey"></a>

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

## Request Syntax
<a name="API_kvs_PutKey_RequestSyntax"></a>

```
PUT /key-value-stores/KvsARN/keys/Key HTTP/1.1
If-Match: IfMatch
Content-type: application/json

{
   "Value": "string"
}
```

## URI Request Parameters
<a name="API_kvs_PutKey_RequestParameters"></a>

The request uses the following URI parameters.

 ** [IfMatch](#API_kvs_PutKey_RequestSyntax) **   <a name="cloudfront-kvs_PutKey-request-IfMatch"></a>
The current version (`ETag`) of the key value store that you are putting keys into, which you can get by using the `DescribeKeyValueStore` API operation.  
Required: Yes

 ** [Key](#API_kvs_PutKey_RequestSyntax) **   <a name="cloudfront-kvs_PutKey-request-uri-Key"></a>
The key to put.  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: Yes

 ** [KvsARN](#API_kvs_PutKey_RequestSyntax) **   <a name="cloudfront-kvs_PutKey-request-uri-KvsARN"></a>
The Amazon Resource Name (ARN) of the key value store.  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

## Request Body
<a name="API_kvs_PutKey_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [Value](#API_kvs_PutKey_RequestSyntax) **   <a name="cloudfront-kvs_PutKey-request-Value"></a>
The value to put.  
Type: String  
Required: Yes

## Response Syntax
<a name="API_kvs_PutKey_ResponseSyntax"></a>

```
HTTP/1.1 200
ETag: ETag
Content-type: application/json

{
   "ItemCount": number,
   "TotalSizeInBytes": number
}
```

## Response Elements
<a name="API_kvs_PutKey_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers.

 ** [ETag](#API_kvs_PutKey_ResponseSyntax) **   <a name="cloudfront-kvs_PutKey-response-ETag"></a>
The current version identifier of the key value store after the successful put.

The following data is returned in JSON format by the service.

 ** [ItemCount](#API_kvs_PutKey_ResponseSyntax) **   <a name="cloudfront-kvs_PutKey-response-ItemCount"></a>
Number of key-value pairs in the key value store after the successful put.  
Type: Integer

 ** [TotalSizeInBytes](#API_kvs_PutKey_ResponseSyntax) **   <a name="cloudfront-kvs_PutKey-response-TotalSizeInBytes"></a>
Total size of the key value store after the successful put, in bytes.  
Type: Long

## Errors
<a name="API_kvs_PutKey_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
Access denied.  
HTTP Status Code: 403

 ** ConflictException **   
Resource is not in expected state.  
HTTP Status Code: 409

 ** InternalServerException **   
Internal server error.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
Resource was not found.  
HTTP Status Code: 404

 ** ServiceQuotaExceededException **   
Limit exceeded.  
HTTP Status Code: 402

 ** ValidationException **   
Validation failed.  
HTTP Status Code: 400

## See Also
<a name="API_kvs_PutKey_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudfront-keyvaluestore-2022-07-26/PutKey) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudfront-keyvaluestore-2022-07-26/PutKey) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudfront-keyvaluestore-2022-07-26/PutKey) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudfront-keyvaluestore-2022-07-26/PutKey) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudfront-keyvaluestore-2022-07-26/PutKey) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudfront-keyvaluestore-2022-07-26/PutKey) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudfront-keyvaluestore-2022-07-26/PutKey) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudfront-keyvaluestore-2022-07-26/PutKey) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudfront-keyvaluestore-2022-07-26/PutKey) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudfront-keyvaluestore-2022-07-26/PutKey) 

# UpdateKeys
<a name="API_kvs_UpdateKeys"></a>

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

## Request Syntax
<a name="API_kvs_UpdateKeys_RequestSyntax"></a>

```
POST /key-value-stores/KvsARN/keys HTTP/1.1
If-Match: IfMatch
Content-type: application/json

{
   "Deletes": [ 
      { 
         "Key": "string"
      }
   ],
   "Puts": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## URI Request Parameters
<a name="API_kvs_UpdateKeys_RequestParameters"></a>

The request uses the following URI parameters.

 ** [IfMatch](#API_kvs_UpdateKeys_RequestSyntax) **   <a name="cloudfront-kvs_UpdateKeys-request-IfMatch"></a>
The current version (`ETag`) of the key value store that you are updating keys of, which you can get by using the `DescribeKeyValueStore` API operation.  
Required: Yes

 ** [KvsARN](#API_kvs_UpdateKeys_RequestSyntax) **   <a name="cloudfront-kvs_UpdateKeys-request-uri-KvsARN"></a>
The Amazon Resource Name (ARN) of the key value store.  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

## Request Body
<a name="API_kvs_UpdateKeys_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [Deletes](#API_kvs_UpdateKeys_RequestSyntax) **   <a name="cloudfront-kvs_UpdateKeys-request-Deletes"></a>
List of keys to delete.  
Type: Array of [DeleteKeyRequestListItem](API_kvs_DeleteKeyRequestListItem.md) objects  
Required: No

 ** [Puts](#API_kvs_UpdateKeys_RequestSyntax) **   <a name="cloudfront-kvs_UpdateKeys-request-Puts"></a>
List of key-value pairs to put.  
Type: Array of [PutKeyRequestListItem](API_kvs_PutKeyRequestListItem.md) objects  
Required: No

## Response Syntax
<a name="API_kvs_UpdateKeys_ResponseSyntax"></a>

```
HTTP/1.1 200
ETag: ETag
Content-type: application/json

{
   "ItemCount": number,
   "TotalSizeInBytes": number
}
```

## Response Elements
<a name="API_kvs_UpdateKeys_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers.

 ** [ETag](#API_kvs_UpdateKeys_ResponseSyntax) **   <a name="cloudfront-kvs_UpdateKeys-response-ETag"></a>
The current version identifier of the key value store after the successful update.

The following data is returned in JSON format by the service.

 ** [ItemCount](#API_kvs_UpdateKeys_ResponseSyntax) **   <a name="cloudfront-kvs_UpdateKeys-response-ItemCount"></a>
Number of key-value pairs in the key value store after the successful update.  
Type: Integer

 ** [TotalSizeInBytes](#API_kvs_UpdateKeys_ResponseSyntax) **   <a name="cloudfront-kvs_UpdateKeys-response-TotalSizeInBytes"></a>
Total size of the key value store after the successful update, in bytes.  
Type: Long

## Errors
<a name="API_kvs_UpdateKeys_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
Access denied.  
HTTP Status Code: 403

 ** ConflictException **   
Resource is not in expected state.  
HTTP Status Code: 409

 ** InternalServerException **   
Internal server error.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
Resource was not found.  
HTTP Status Code: 404

 ** ServiceQuotaExceededException **   
Limit exceeded.  
HTTP Status Code: 402

 ** ValidationException **   
Validation failed.  
HTTP Status Code: 400

## See Also
<a name="API_kvs_UpdateKeys_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudfront-keyvaluestore-2022-07-26/UpdateKeys) 