Interface CloudFrontKeyValueStoreClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder()
method.
Amazon CloudFront KeyValueStore Service to View and Update Data in a KVS Resource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a builder that can be used to configure and create aCloudFrontKeyValueStoreClient.create()Create aCloudFrontKeyValueStoreClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default DeleteKeyResponsedeleteKey(Consumer<DeleteKeyRequest.Builder> deleteKeyRequest) Deletes the key value pair specified by the key.default DeleteKeyResponsedeleteKey(DeleteKeyRequest deleteKeyRequest) Deletes the key value pair specified by the key.default DescribeKeyValueStoreResponsedescribeKeyValueStore(Consumer<DescribeKeyValueStoreRequest.Builder> describeKeyValueStoreRequest) Returns metadata information about Key Value Store.default DescribeKeyValueStoreResponsedescribeKeyValueStore(DescribeKeyValueStoreRequest describeKeyValueStoreRequest) Returns metadata information about Key Value Store.default GetKeyResponsegetKey(Consumer<GetKeyRequest.Builder> getKeyRequest) Returns a key value pair.default GetKeyResponsegetKey(GetKeyRequest getKeyRequest) Returns a key value pair.default ListKeysResponselistKeys(Consumer<ListKeysRequest.Builder> listKeysRequest) Returns a list of key value pairs.default ListKeysResponselistKeys(ListKeysRequest listKeysRequest) Returns a list of key value pairs.default ListKeysIterablelistKeysPaginator(Consumer<ListKeysRequest.Builder> listKeysRequest) This is a variant oflistKeys(software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysRequest)operation.default ListKeysIterablelistKeysPaginator(ListKeysRequest listKeysRequest) This is a variant oflistKeys(software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysRequest)operation.default PutKeyResponseputKey(Consumer<PutKeyRequest.Builder> putKeyRequest) Creates a new key value pair or replaces the value of an existing key.default PutKeyResponseputKey(PutKeyRequest putKeyRequest) Creates a new key value pair or replaces the value of an existing key.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadatadefault UpdateKeysResponseupdateKeys(Consumer<UpdateKeysRequest.Builder> updateKeysRequest) Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.default UpdateKeysResponseupdateKeys(UpdateKeysRequest updateKeysRequest) Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
deleteKey
default DeleteKeyResponse deleteKey(DeleteKeyRequest deleteKeyRequest) throws ConflictException, ValidationException, InternalServerException, ServiceQuotaExceededException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Deletes the key value pair specified by the key.
- Parameters:
deleteKeyRequest-- Returns:
- Result of the DeleteKey operation returned by the service.
- See Also:
-
deleteKey
default DeleteKeyResponse deleteKey(Consumer<DeleteKeyRequest.Builder> deleteKeyRequest) throws ConflictException, ValidationException, InternalServerException, ServiceQuotaExceededException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Deletes the key value pair specified by the key.
This is a convenience which creates an instance of the
DeleteKeyRequest.Builderavoiding the need to create one manually viaDeleteKeyRequest.builder()- Parameters:
deleteKeyRequest- AConsumerthat will call methods onDeleteKeyRequest.Builderto create a request.- Returns:
- Result of the DeleteKey operation returned by the service.
- See Also:
-
describeKeyValueStore
default DescribeKeyValueStoreResponse describeKeyValueStore(DescribeKeyValueStoreRequest describeKeyValueStoreRequest) throws ConflictException, InternalServerException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Returns metadata information about Key Value Store.
- Parameters:
describeKeyValueStoreRequest-- Returns:
- Result of the DescribeKeyValueStore operation returned by the service.
- See Also:
-
describeKeyValueStore
default DescribeKeyValueStoreResponse describeKeyValueStore(Consumer<DescribeKeyValueStoreRequest.Builder> describeKeyValueStoreRequest) throws ConflictException, InternalServerException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Returns metadata information about Key Value Store.
This is a convenience which creates an instance of the
DescribeKeyValueStoreRequest.Builderavoiding the need to create one manually viaDescribeKeyValueStoreRequest.builder()- Parameters:
describeKeyValueStoreRequest- AConsumerthat will call methods onDescribeKeyValueStoreRequest.Builderto create a request.- Returns:
- Result of the DescribeKeyValueStore operation returned by the service.
- See Also:
-
getKey
default GetKeyResponse getKey(GetKeyRequest getKeyRequest) throws ConflictException, InternalServerException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Returns a key value pair.
- Parameters:
getKeyRequest-- Returns:
- Result of the GetKey operation returned by the service.
- See Also:
-
getKey
default GetKeyResponse getKey(Consumer<GetKeyRequest.Builder> getKeyRequest) throws ConflictException, InternalServerException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Returns a key value pair.
This is a convenience which creates an instance of the
GetKeyRequest.Builderavoiding the need to create one manually viaGetKeyRequest.builder()- Parameters:
getKeyRequest- AConsumerthat will call methods onGetKeyRequest.Builderto create a request.- Returns:
- Result of the GetKey operation returned by the service.
- See Also:
-
listKeys
default ListKeysResponse listKeys(ListKeysRequest listKeysRequest) throws ConflictException, ValidationException, InternalServerException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Returns a list of key value pairs.
- Parameters:
listKeysRequest-- Returns:
- Result of the ListKeys operation returned by the service.
- See Also:
-
listKeys
default ListKeysResponse listKeys(Consumer<ListKeysRequest.Builder> listKeysRequest) throws ConflictException, ValidationException, InternalServerException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Returns a list of key value pairs.
This is a convenience which creates an instance of the
ListKeysRequest.Builderavoiding the need to create one manually viaListKeysRequest.builder()- Parameters:
listKeysRequest- AConsumerthat will call methods onListKeysRequest.Builderto create a request.- Returns:
- Result of the ListKeys operation returned by the service.
- See Also:
-
listKeysPaginator
default ListKeysIterable listKeysPaginator(ListKeysRequest listKeysRequest) throws ConflictException, ValidationException, InternalServerException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException This is a variant of
listKeys(software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.cloudfrontkeyvaluestore.paginators.ListKeysIterable responses = client.listKeysPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.cloudfrontkeyvaluestore.paginators.ListKeysIterable responses = client .listKeysPaginator(request); for (software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.cloudfrontkeyvaluestore.paginators.ListKeysIterable responses = client.listKeysPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listKeys(software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysRequest)operation.- Parameters:
listKeysRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listKeysPaginator
default ListKeysIterable listKeysPaginator(Consumer<ListKeysRequest.Builder> listKeysRequest) throws ConflictException, ValidationException, InternalServerException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException This is a variant of
listKeys(software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.cloudfrontkeyvaluestore.paginators.ListKeysIterable responses = client.listKeysPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.cloudfrontkeyvaluestore.paginators.ListKeysIterable responses = client .listKeysPaginator(request); for (software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.cloudfrontkeyvaluestore.paginators.ListKeysIterable responses = client.listKeysPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listKeys(software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysRequest)operation.
This is a convenience which creates an instance of the
ListKeysRequest.Builderavoiding the need to create one manually viaListKeysRequest.builder()- Parameters:
listKeysRequest- AConsumerthat will call methods onListKeysRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
putKey
default PutKeyResponse putKey(PutKeyRequest putKeyRequest) throws ConflictException, ValidationException, InternalServerException, ServiceQuotaExceededException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Creates a new key value pair or replaces the value of an existing key.
- Parameters:
putKeyRequest- A key value pair.- Returns:
- Result of the PutKey operation returned by the service.
- See Also:
-
putKey
default PutKeyResponse putKey(Consumer<PutKeyRequest.Builder> putKeyRequest) throws ConflictException, ValidationException, InternalServerException, ServiceQuotaExceededException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Creates a new key value pair or replaces the value of an existing key.
This is a convenience which creates an instance of the
PutKeyRequest.Builderavoiding the need to create one manually viaPutKeyRequest.builder()- Parameters:
putKeyRequest- AConsumerthat will call methods onPutKeyRequest.Builderto create a request. A key value pair.- Returns:
- Result of the PutKey operation returned by the service.
- See Also:
-
updateKeys
default UpdateKeysResponse updateKeys(UpdateKeysRequest updateKeysRequest) throws ConflictException, ValidationException, InternalServerException, ServiceQuotaExceededException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.
- Parameters:
updateKeysRequest-- Returns:
- Result of the UpdateKeys operation returned by the service.
- See Also:
-
updateKeys
default UpdateKeysResponse updateKeys(Consumer<UpdateKeysRequest.Builder> updateKeysRequest) throws ConflictException, ValidationException, InternalServerException, ServiceQuotaExceededException, ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, CloudFrontKeyValueStoreException Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.
This is a convenience which creates an instance of the
UpdateKeysRequest.Builderavoiding the need to create one manually viaUpdateKeysRequest.builder()- Parameters:
updateKeysRequest- AConsumerthat will call methods onUpdateKeysRequest.Builderto create a request.- Returns:
- Result of the UpdateKeys operation returned by the service.
- See Also:
-
create
Create aCloudFrontKeyValueStoreClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aCloudFrontKeyValueStoreClient. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-