update_keys
¶
update_keys(
kvs_arn: KvsARN,
if_match: Etag,
*,
config_overrides: Optional[CloudFrontKeyValueStoreClientConfig] = None,
puts: Optional[PutKeyRequestsList] = None,
deletes: Optional[DeleteKeyRequestsList] = None,
) -> UpdateKeysResponse
Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.
Parameters:
-
kvs_arn(KvsARN) –The Amazon Resource Name (ARN) of the Key Value Store.
-
if_match(Etag) –The current version (ETag) of the Key Value Store that you are updating keys of, which you can get using DescribeKeyValueStore.
-
puts(Optional[PutKeyRequestsList], default:None) –List of key value pairs to put.
-
deletes(Optional[DeleteKeyRequestsList], default:None) –List of keys to delete.
Raises:
-
AccessDeniedException–Access denied.
-
ConflictException–Resource is not in expected state.
-
InternalServerException–Internal server error.
-
ResourceNotFoundException–Resource was not found.
-
ServiceQuotaExceededException–Limit exceeded.
-
ValidationException–Validation failed.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Put 2 keys into the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'
>>> client.update_keys(kvs_arn='arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58', if_match='KV0AB12C3DEF456', puts=[{'Key': 'key1', 'Value': 'value1'}, {'Key': 'key2', 'Value': 'value2'}])
Delete 2 keys from the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'
>>> client.update_keys(kvs_arn='arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58', if_match='KV0AB12C3DEF456', deletes=[{'Key': 'key1'}, {'Key': 'key2'}])
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'
>>> client.update_keys(kvs_arn='arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58', if_match='KV0AB12C3DEF456', puts=[{'Key': 'key1', 'Value': 'value1'}, {'Key': 'key2', 'Value': 'value2'}], deletes=[{'Key': 'key3'}, {'Key': 'key4'}])
Source code in docs_src/capo_cloudfront_keyvaluestore/_services/cloud_front_key_value_store.py
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | |