Interface CloudFrontKeyValueStoreClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface CloudFrontKeyValueStoreClient extends AwsClient
Service client for accessing Amazon CloudFront KeyValueStore. This can be created using the staticbuilder()method.Amazon CloudFront KeyValueStore Service to View and Update Data in a KVS Resource
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static CloudFrontKeyValueStoreClientBuilderbuilder()Create a builder that can be used to configure and create aCloudFrontKeyValueStoreClient.static CloudFrontKeyValueStoreClientcreate()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.default CloudFrontKeyValueStoreServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default 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
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ServiceQuotaExceededException- Limit exceeded.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ServiceQuotaExceededException- Limit exceeded.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.InternalServerException- Internal server error.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.InternalServerException- Internal server error.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.InternalServerException- Internal server error.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.InternalServerException- Internal server error.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ServiceQuotaExceededException- Limit exceeded.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ServiceQuotaExceededException- Limit exceeded.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ServiceQuotaExceededException- Limit exceeded.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
ConflictException- Resource is not in expected state.ValidationException- Validation failed.InternalServerException- Internal server error.ServiceQuotaExceededException- Limit exceeded.ResourceNotFoundException- Resource was not found.AccessDeniedException- Access denied.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CloudFrontKeyValueStoreException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
create
static CloudFrontKeyValueStoreClient create()
Create aCloudFrontKeyValueStoreClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static CloudFrontKeyValueStoreClientBuilder builder()
Create a builder that can be used to configure and create aCloudFrontKeyValueStoreClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default CloudFrontKeyValueStoreServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-