updateKeys
inline suspend fun CloudFrontKeyValueStoreClient.updateKeys(crossinline block: UpdateKeysRequest.Builder.() -> Unit): UpdateKeysResponse
Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.
Samples
import aws.sdk.kotlin.services.cloudfrontkeyvaluestore.model.DeleteKeyRequestListItem
import aws.sdk.kotlin.services.cloudfrontkeyvaluestore.model.PutKeyRequestListItem
fun main() {
//sampleStart
// Put 2 keys into the key value store with ARN arn aws cloudfront 123456789012 key value store
// 327284aa bcd5 499f a3ff 26b9a9d31b58
val resp = cloudFrontKeyValueStoreClient.updateKeys {
kvsArn = "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58"
ifMatch = "KV0AB12C3DEF456"
puts = listOf<PutKeyRequestListItem>(
PutKeyRequestListItem {
key = "key1"
value = "value1"
},
PutKeyRequestListItem {
key = "key2"
value = "value2"
}
)
}
//sampleEnd
}
import aws.sdk.kotlin.services.cloudfrontkeyvaluestore.model.DeleteKeyRequestListItem
import aws.sdk.kotlin.services.cloudfrontkeyvaluestore.model.PutKeyRequestListItem
fun main() {
//sampleStart
// Delete 2 keys from the key value store with ARN arn aws cloudfront 123456789012 key value store
// 327284aa bcd5 499f a3ff 26b9a9d31b58
val resp = cloudFrontKeyValueStoreClient.updateKeys {
kvsArn = "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58"
ifMatch = "KV0AB12C3DEF456"
deletes = listOf<DeleteKeyRequestListItem>(
DeleteKeyRequestListItem {
key = "key1"
},
DeleteKeyRequestListItem {
key = "key2"
}
)
}
//sampleEnd
}
import aws.sdk.kotlin.services.cloudfrontkeyvaluestore.model.DeleteKeyRequestListItem
import aws.sdk.kotlin.services.cloudfrontkeyvaluestore.model.PutKeyRequestListItem
fun main() {
//sampleStart
// Put 2 keys into and delete 1 key from the key value store with ARN arn aws cloudfront 123456789012
// key value store 327284aa bcd5 499f a3ff 26b9a9d31b58
val resp = cloudFrontKeyValueStoreClient.updateKeys {
kvsArn = "arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58"
ifMatch = "KV0AB12C3DEF456"
puts = listOf<PutKeyRequestListItem>(
PutKeyRequestListItem {
key = "key1"
value = "value1"
},
PutKeyRequestListItem {
key = "key2"
value = "value2"
}
)
deletes = listOf<DeleteKeyRequestListItem>(
DeleteKeyRequestListItem {
key = "key3"
},
DeleteKeyRequestListItem {
key = "key4"
}
)
}
//sampleEnd
}