software.amazon.awssdk.services.sagemakerfeaturestoreruntime.SageMakerFeatureStoreRuntimeAsyncClient Maven / Gradle / Ivy
Show all versions of sagemakerfeaturestoreruntime Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.sagemakerfeaturestoreruntime;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.awscore.AwsClient;
import software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.BatchGetRecordRequest;
import software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.BatchGetRecordResponse;
import software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.DeleteRecordRequest;
import software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.DeleteRecordResponse;
import software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.GetRecordRequest;
import software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.GetRecordResponse;
import software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.PutRecordRequest;
import software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.PutRecordResponse;
/**
* Service client for accessing Amazon SageMaker Feature Store Runtime asynchronously. This can be created using the
* static {@link #builder()} method.
*
*
* Contains all data plane API operations and data types for the Amazon SageMaker Feature Store. Use this API to put,
* delete, and retrieve (get) features from a feature store.
*
*
* Use the following operations to configure your OnlineStore
and OfflineStore
features, and
* to create and manage feature groups:
*
*
* -
*
*
* -
*
*
* -
*
*
* -
*
*
*
*/
@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
@ThreadSafe
public interface SageMakerFeatureStoreRuntimeAsyncClient extends AwsClient {
String SERVICE_NAME = "sagemaker";
/**
* Value for looking up the service's metadata from the
* {@link software.amazon.awssdk.regions.ServiceMetadataProvider}.
*/
String SERVICE_METADATA_ID = "featurestore-runtime.sagemaker";
/**
*
* Retrieves a batch of Records
from a FeatureGroup
.
*
*
* @param batchGetRecordRequest
* @return A Java Future containing the result of the BatchGetRecord operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ValidationErrorException There was an error validating your request.
* - InternalFailureException An internal failure occurred. Try your request again. If the problem
* persists, contact Amazon Web Services customer support.
* - ServiceUnavailableException The service is currently unavailable.
* - AccessForbiddenException You do not have permission to perform an action.
* - 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.
* - SageMakerFeatureStoreRuntimeException Base class for all service exceptions. Unknown exceptions will
* be thrown as an instance of this type.
*
* @sample SageMakerFeatureStoreRuntimeAsyncClient.BatchGetRecord
* @see AWS API Documentation
*/
default CompletableFuture batchGetRecord(BatchGetRecordRequest batchGetRecordRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Retrieves a batch of Records
from a FeatureGroup
.
*
*
*
* This is a convenience which creates an instance of the {@link BatchGetRecordRequest.Builder} avoiding the need to
* create one manually via {@link BatchGetRecordRequest#builder()}
*
*
* @param batchGetRecordRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.BatchGetRecordRequest.Builder}
* to create a request.
* @return A Java Future containing the result of the BatchGetRecord operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ValidationErrorException There was an error validating your request.
* - InternalFailureException An internal failure occurred. Try your request again. If the problem
* persists, contact Amazon Web Services customer support.
* - ServiceUnavailableException The service is currently unavailable.
* - AccessForbiddenException You do not have permission to perform an action.
* - 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.
* - SageMakerFeatureStoreRuntimeException Base class for all service exceptions. Unknown exceptions will
* be thrown as an instance of this type.
*
* @sample SageMakerFeatureStoreRuntimeAsyncClient.BatchGetRecord
* @see AWS API Documentation
*/
default CompletableFuture batchGetRecord(Consumer batchGetRecordRequest) {
return batchGetRecord(BatchGetRecordRequest.builder().applyMutation(batchGetRecordRequest).build());
}
/**
*
* Deletes a Record
from a FeatureGroup
in the OnlineStore
. Feature Store
* supports both SoftDelete
and HardDelete
. For SoftDelete
(default), feature
* columns are set to null
and the record is no longer retrievable by GetRecord
or
* BatchGetRecord
. For HardDelete
, the complete Record
is removed from the
* OnlineStore
. In both cases, Feature Store appends the deleted record marker to the
* OfflineStore
with feature values set to null
, is_deleted
value set to
* True
, and EventTime
set to the delete input EventTime
.
*
*
* Note that the EventTime
specified in DeleteRecord
should be set later than the
* EventTime
of the existing record in the OnlineStore
for that
* RecordIdentifer
. If it is not, the deletion does not occur:
*
*
* -
*
* For SoftDelete
, the existing (undeleted) record remains in the OnlineStore
, though the
* delete record marker is still written to the OfflineStore
.
*
*
* -
*
* HardDelete
returns EventTime
: 400 ValidationException
to indicate that the
* delete operation failed. No delete record marker is written to the OfflineStore
.
*
*
*
*
* @param deleteRecordRequest
* @return A Java Future containing the result of the DeleteRecord operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ValidationErrorException There was an error validating your request.
* - InternalFailureException An internal failure occurred. Try your request again. If the problem
* persists, contact Amazon Web Services customer support.
* - ServiceUnavailableException The service is currently unavailable.
* - AccessForbiddenException You do not have permission to perform an action.
* - 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.
* - SageMakerFeatureStoreRuntimeException Base class for all service exceptions. Unknown exceptions will
* be thrown as an instance of this type.
*
* @sample SageMakerFeatureStoreRuntimeAsyncClient.DeleteRecord
* @see AWS API Documentation
*/
default CompletableFuture deleteRecord(DeleteRecordRequest deleteRecordRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Deletes a Record
from a FeatureGroup
in the OnlineStore
. Feature Store
* supports both SoftDelete
and HardDelete
. For SoftDelete
(default), feature
* columns are set to null
and the record is no longer retrievable by GetRecord
or
* BatchGetRecord
. For HardDelete
, the complete Record
is removed from the
* OnlineStore
. In both cases, Feature Store appends the deleted record marker to the
* OfflineStore
with feature values set to null
, is_deleted
value set to
* True
, and EventTime
set to the delete input EventTime
.
*
*
* Note that the EventTime
specified in DeleteRecord
should be set later than the
* EventTime
of the existing record in the OnlineStore
for that
* RecordIdentifer
. If it is not, the deletion does not occur:
*
*
* -
*
* For SoftDelete
, the existing (undeleted) record remains in the OnlineStore
, though the
* delete record marker is still written to the OfflineStore
.
*
*
* -
*
* HardDelete
returns EventTime
: 400 ValidationException
to indicate that the
* delete operation failed. No delete record marker is written to the OfflineStore
.
*
*
*
*
*
* This is a convenience which creates an instance of the {@link DeleteRecordRequest.Builder} avoiding the need to
* create one manually via {@link DeleteRecordRequest#builder()}
*
*
* @param deleteRecordRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.DeleteRecordRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the DeleteRecord operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ValidationErrorException There was an error validating your request.
* - InternalFailureException An internal failure occurred. Try your request again. If the problem
* persists, contact Amazon Web Services customer support.
* - ServiceUnavailableException The service is currently unavailable.
* - AccessForbiddenException You do not have permission to perform an action.
* - 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.
* - SageMakerFeatureStoreRuntimeException Base class for all service exceptions. Unknown exceptions will
* be thrown as an instance of this type.
*
* @sample SageMakerFeatureStoreRuntimeAsyncClient.DeleteRecord
* @see AWS API Documentation
*/
default CompletableFuture deleteRecord(Consumer deleteRecordRequest) {
return deleteRecord(DeleteRecordRequest.builder().applyMutation(deleteRecordRequest).build());
}
/**
*
* Use for OnlineStore
serving from a FeatureStore
. Only the latest records stored in the
* OnlineStore
can be retrieved. If no Record with RecordIdentifierValue
is found, then an
* empty result is returned.
*
*
* @param getRecordRequest
* @return A Java Future containing the result of the GetRecord operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ValidationErrorException There was an error validating your request.
* - ResourceNotFoundException A resource that is required to perform an action was not found.
* - InternalFailureException An internal failure occurred. Try your request again. If the problem
* persists, contact Amazon Web Services customer support.
* - ServiceUnavailableException The service is currently unavailable.
* - AccessForbiddenException You do not have permission to perform an action.
* - 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.
* - SageMakerFeatureStoreRuntimeException Base class for all service exceptions. Unknown exceptions will
* be thrown as an instance of this type.
*
* @sample SageMakerFeatureStoreRuntimeAsyncClient.GetRecord
* @see AWS API Documentation
*/
default CompletableFuture getRecord(GetRecordRequest getRecordRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Use for OnlineStore
serving from a FeatureStore
. Only the latest records stored in the
* OnlineStore
can be retrieved. If no Record with RecordIdentifierValue
is found, then an
* empty result is returned.
*
*
*
* This is a convenience which creates an instance of the {@link GetRecordRequest.Builder} avoiding the need to
* create one manually via {@link GetRecordRequest#builder()}
*
*
* @param getRecordRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.GetRecordRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the GetRecord operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ValidationErrorException There was an error validating your request.
* - ResourceNotFoundException A resource that is required to perform an action was not found.
* - InternalFailureException An internal failure occurred. Try your request again. If the problem
* persists, contact Amazon Web Services customer support.
* - ServiceUnavailableException The service is currently unavailable.
* - AccessForbiddenException You do not have permission to perform an action.
* - 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.
* - SageMakerFeatureStoreRuntimeException Base class for all service exceptions. Unknown exceptions will
* be thrown as an instance of this type.
*
* @sample SageMakerFeatureStoreRuntimeAsyncClient.GetRecord
* @see AWS API Documentation
*/
default CompletableFuture getRecord(Consumer getRecordRequest) {
return getRecord(GetRecordRequest.builder().applyMutation(getRecordRequest).build());
}
/**
*
* The PutRecord
API is used to ingest a list of Records
into your feature group.
*
*
* If a new record’s EventTime
is greater, the new record is written to both the
* OnlineStore
and OfflineStore
. Otherwise, the record is a historic record and it is
* written only to the OfflineStore
.
*
*
* You can specify the ingestion to be applied to the OnlineStore
, OfflineStore
, or both
* by using the TargetStores
request parameter.
*
*
* You can set the ingested record to expire at a given time to live (TTL) duration after the record’s event time,
* ExpiresAt
= EventTime
+ TtlDuration
, by specifying the
* TtlDuration
parameter. A record level TtlDuration
is set when specifying the
* TtlDuration
parameter using the PutRecord
API call. If the input
* TtlDuration
is null
or unspecified, TtlDuration
is set to the default
* feature group level TtlDuration
. A record level TtlDuration
supersedes the group level
* TtlDuration
.
*
*
* @param putRecordRequest
* @return A Java Future containing the result of the PutRecord operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ValidationErrorException There was an error validating your request.
* - InternalFailureException An internal failure occurred. Try your request again. If the problem
* persists, contact Amazon Web Services customer support.
* - ServiceUnavailableException The service is currently unavailable.
* - AccessForbiddenException You do not have permission to perform an action.
* - 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.
* - SageMakerFeatureStoreRuntimeException Base class for all service exceptions. Unknown exceptions will
* be thrown as an instance of this type.
*
* @sample SageMakerFeatureStoreRuntimeAsyncClient.PutRecord
* @see AWS API Documentation
*/
default CompletableFuture putRecord(PutRecordRequest putRecordRequest) {
throw new UnsupportedOperationException();
}
/**
*
* The PutRecord
API is used to ingest a list of Records
into your feature group.
*
*
* If a new record’s EventTime
is greater, the new record is written to both the
* OnlineStore
and OfflineStore
. Otherwise, the record is a historic record and it is
* written only to the OfflineStore
.
*
*
* You can specify the ingestion to be applied to the OnlineStore
, OfflineStore
, or both
* by using the TargetStores
request parameter.
*
*
* You can set the ingested record to expire at a given time to live (TTL) duration after the record’s event time,
* ExpiresAt
= EventTime
+ TtlDuration
, by specifying the
* TtlDuration
parameter. A record level TtlDuration
is set when specifying the
* TtlDuration
parameter using the PutRecord
API call. If the input
* TtlDuration
is null
or unspecified, TtlDuration
is set to the default
* feature group level TtlDuration
. A record level TtlDuration
supersedes the group level
* TtlDuration
.
*
*
*
* This is a convenience which creates an instance of the {@link PutRecordRequest.Builder} avoiding the need to
* create one manually via {@link PutRecordRequest#builder()}
*
*
* @param putRecordRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.sagemakerfeaturestoreruntime.model.PutRecordRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the PutRecord operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ValidationErrorException There was an error validating your request.
* - InternalFailureException An internal failure occurred. Try your request again. If the problem
* persists, contact Amazon Web Services customer support.
* - ServiceUnavailableException The service is currently unavailable.
* - AccessForbiddenException You do not have permission to perform an action.
* - 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.
* - SageMakerFeatureStoreRuntimeException Base class for all service exceptions. Unknown exceptions will
* be thrown as an instance of this type.
*
* @sample SageMakerFeatureStoreRuntimeAsyncClient.PutRecord
* @see AWS API Documentation
*/
default CompletableFuture putRecord(Consumer putRecordRequest) {
return putRecord(PutRecordRequest.builder().applyMutation(putRecordRequest).build());
}
@Override
default SageMakerFeatureStoreRuntimeServiceClientConfiguration serviceClientConfiguration() {
throw new UnsupportedOperationException();
}
/**
* Create a {@link SageMakerFeatureStoreRuntimeAsyncClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
*/
static SageMakerFeatureStoreRuntimeAsyncClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link SageMakerFeatureStoreRuntimeAsyncClient}.
*/
static SageMakerFeatureStoreRuntimeAsyncClientBuilder builder() {
return new DefaultSageMakerFeatureStoreRuntimeAsyncClientBuilder();
}
}