Lists the RecordIdentifier values of all records stored in a FeatureGroup's OnlineStore. This enables you to discover which records exist without retrieving the full record data.
Parameters:
-
feature_group_name
(FeatureGroupNameOrArn)
–
The name or Amazon Resource Name (ARN) of the feature group to list records from.
-
max_results
(Optional[ListRecordsMaxResults], default:
None
)
–
The maximum number of record identifiers to return in a single page of results. For the InMemory tier, this value is a hint and not a strict requirement. The response may contain more or fewer results than the specified MaxResults.
-
next_token
(Optional[ListRecordsNextToken], default:
None
)
–
A token to resume pagination of ListRecords results.
-
include_soft_deleted_records
(Optional[Boolean], default:
None
)
–
If set to true, the result includes records that have been soft deleted.
Raises:
-
AccessForbidden
–
You do not have permission to perform an action.
-
InternalFailure
–
An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support.
-
ResourceNotFound
–
A resource that is required to perform an action was not found.
-
ServiceUnavailable
–
The service is currently unavailable.
-
ValidationError
–
There was an error validating your request.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
List record identifiers from a feature group
>>> await client.list_records(feature_group_name='my-feature-group', max_results=10)
Source code in docs_src/capo_sagemaker_featurestore_runtime/_services/async_sage_maker_feature_store_runtime.py
| async def list_records(
self,
feature_group_name: "capo_sagemaker_featurestore_runtime.types.feature_group_name_or_arn.FeatureGroupNameOrArn",
*,
config_overrides: Optional[
AsyncSageMakerFeatureStoreRuntimeClientConfig
] = None,
max_results: Optional[
"capo_sagemaker_featurestore_runtime.types.list_records_max_results.ListRecordsMaxResults"
] = None,
next_token: Optional[
"capo_sagemaker_featurestore_runtime.types.list_records_next_token.ListRecordsNextToken"
] = None,
include_soft_deleted_records: Optional[
"capo_sagemaker_featurestore_runtime.types.boolean.Boolean"
] = None,
) -> "capo_sagemaker_featurestore_runtime.types.list_records_response.ListRecordsResponse":
"""<p>Lists the <code>RecordIdentifier</code> values of all records stored in a <code>FeatureGroup</code>'s <code>OnlineStore</code>. This enables you to discover which records exist without retrieving the full record data.</p>
Args:
feature_group_name: <p>The name or Amazon Resource Name (ARN) of the feature group to list records from.</p>
max_results: <p>The maximum number of record identifiers to return in a single page of results. For the <code>InMemory</code> tier, this value is a hint and not a strict requirement. The response may contain more or fewer results than the specified <code>MaxResults</code>.</p>
next_token: <p>A token to resume pagination of <code>ListRecords</code> results.</p>
include_soft_deleted_records: <p>If set to <code>true</code>, the result includes records that have been soft deleted.</p>
Raises:
capo_sagemaker_featurestore_runtime.errors.access_forbidden.AccessForbidden: <p>You do not have permission to perform an action.</p>
capo_sagemaker_featurestore_runtime.errors.internal_failure.InternalFailure: <p>An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support.</p>
capo_sagemaker_featurestore_runtime.errors.resource_not_found.ResourceNotFound: <p>A resource that is required to perform an action was not found.</p>
capo_sagemaker_featurestore_runtime.errors.service_unavailable.ServiceUnavailable: <p>The service is currently unavailable.</p>
capo_sagemaker_featurestore_runtime.errors.validation_error.ValidationError: <p>There was an error validating your request.</p>
capo_sagemaker_featurestore_runtime.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
List record identifiers from a feature group
>>> await client.list_records(feature_group_name='my-feature-group', max_results=10)
"""
async def _handler(
req: "AsyncOperationRequest[capo_sagemaker_featurestore_runtime.types.list_records_request.ListRecordsRequest]",
) -> AsyncOperationResponse[
"capo_sagemaker_featurestore_runtime.types.list_records_response.ListRecordsResponse"
]:
import capo_sagemaker_featurestore_runtime._operations.amazon_sage_maker_feature_store_runtime.list_records
(
output,
http_response,
) = await capo_sagemaker_featurestore_runtime._operations.amazon_sage_maker_feature_store_runtime.list_records.async_list_records(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListRecords")
)
input_: capo_sagemaker_featurestore_runtime.types.list_records_request.ListRecordsRequest = {
"feature_group_name": feature_group_name
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
if include_soft_deleted_records is not None:
input_["include_soft_deleted_records"] = include_soft_deleted_records
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|