software.amazon.awssdk.services.sagemakerfeaturestoreruntime.SageMakerFeatureStoreRuntimeAsyncClient Maven / Gradle / Ivy
/*
* 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.core.SdkClient;
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 SdkClient {
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";
/**
* 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();
}
/**
*
* Deletes a Record
from a FeatureGroup
. A new record will show up in the
* OfflineStore
when the DeleteRecord
API is called. This record will have a value of
* True
in the is_deleted
column.
*
*
* @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 AWS 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
. A new record will show up in the
* OfflineStore
when the DeleteRecord
API is called. This record will have a value of
* True
in the is_deleted
column.
*
*
*
* 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 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 AWS 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 AWS 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 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 AWS 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());
}
/**
*
* Used for data ingestion into the FeatureStore
. The PutRecord
API writes to both the
* OnlineStore
and OfflineStore
. If the record is the latest record for the
* recordIdentifier
, the record is written to both the OnlineStore
and
* OfflineStore
. If the record is a historic record, it is written only to the
* OfflineStore
.
*
*
* @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 AWS 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();
}
/**
*
* Used for data ingestion into the FeatureStore
. The PutRecord
API writes to both the
* OnlineStore
and OfflineStore
. If the record is the latest record for the
* recordIdentifier
, the record is written to both the OnlineStore
and
* OfflineStore
. If the record is a historic record, it is written only to the
* OfflineStore
.
*
*
*
* 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 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 AWS 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());
}
}