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
Modifier and TypeFieldDescriptionstatic final String
Value 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 aCloudFrontKeyValueStoreClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default DeleteKeyResponse
deleteKey
(Consumer<DeleteKeyRequest.Builder> deleteKeyRequest) Deletes the key value pair specified by the key.default DeleteKeyResponse
deleteKey
(DeleteKeyRequest deleteKeyRequest) Deletes the key value pair specified by the key.default DescribeKeyValueStoreResponse
describeKeyValueStore
(Consumer<DescribeKeyValueStoreRequest.Builder> describeKeyValueStoreRequest) Returns metadata information about Key Value Store.default DescribeKeyValueStoreResponse
describeKeyValueStore
(DescribeKeyValueStoreRequest describeKeyValueStoreRequest) Returns metadata information about Key Value Store.default GetKeyResponse
getKey
(Consumer<GetKeyRequest.Builder> getKeyRequest) Returns a key value pair.default GetKeyResponse
getKey
(GetKeyRequest getKeyRequest) Returns a key value pair.default ListKeysResponse
listKeys
(Consumer<ListKeysRequest.Builder> listKeysRequest) Returns a list of key value pairs.default ListKeysResponse
listKeys
(ListKeysRequest listKeysRequest) Returns a list of key value pairs.default ListKeysIterable
listKeysPaginator
(Consumer<ListKeysRequest.Builder> listKeysRequest) This is a variant oflistKeys(software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysRequest)
operation.default ListKeysIterable
listKeysPaginator
(ListKeysRequest listKeysRequest) This is a variant oflistKeys(software.amazon.awssdk.services.cloudfrontkeyvaluestore.model.ListKeysRequest)
operation.default PutKeyResponse
putKey
(Consumer<PutKeyRequest.Builder> putKeyRequest) Creates a new key value pair or replaces the value of an existing key.default PutKeyResponse
putKey
(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 ServiceMetadata
default UpdateKeysResponse
updateKeys
(Consumer<UpdateKeysRequest.Builder> updateKeysRequest) Puts or Deletes multiple key value pairs in a single, all-or-nothing operation.default UpdateKeysResponse
updateKeys
(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
close
Methods 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.Builder
avoiding the need to create one manually viaDeleteKeyRequest.builder()
- Parameters:
deleteKeyRequest
- AConsumer
that will call methods onDeleteKeyRequest.Builder
to 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.Builder
avoiding the need to create one manually viaDescribeKeyValueStoreRequest.builder()
- Parameters:
describeKeyValueStoreRequest
- AConsumer
that will call methods onDescribeKeyValueStoreRequest.Builder
to 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.Builder
avoiding the need to create one manually viaGetKeyRequest.builder()
- Parameters:
getKeyRequest
- AConsumer
that will call methods onGetKeyRequest.Builder
to 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.Builder
avoiding the need to create one manually viaListKeysRequest.builder()
- Parameters:
listKeysRequest
- AConsumer
that will call methods onListKeysRequest.Builder
to 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 Streamsoftware.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 Streamsoftware.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.Builder
avoiding the need to create one manually viaListKeysRequest.builder()
- Parameters:
listKeysRequest
- AConsumer
that will call methods onListKeysRequest.Builder
to 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.Builder
avoiding the need to create one manually viaPutKeyRequest.builder()
- Parameters:
putKeyRequest
- AConsumer
that will call methods onPutKeyRequest.Builder
to 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.Builder
avoiding the need to create one manually viaUpdateKeysRequest.builder()
- Parameters:
updateKeysRequest
- AConsumer
that will call methods onUpdateKeysRequest.Builder
to create a request.- Returns:
- Result of the UpdateKeys operation returned by the service.
- See Also:
-
create
Create aCloudFrontKeyValueStoreClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aCloudFrontKeyValueStoreClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-