updateFeatureGroup method
Updates the feature group by either adding features or updating the online
store configuration. Use one of the following request parameters at a time
while using the UpdateFeatureGroup API.
You can add features for your feature group using the
FeatureAdditions request parameter. Features cannot be
removed from a feature group.
You can update the online store configuration by using the
OnlineStoreConfig request parameter. If a
TtlDuration is specified, the default
TtlDuration applies for all records added to the feature
group after the feature group is updated. If a record level
TtlDuration exists from using the PutRecord API,
the record level TtlDuration applies to that record instead
of the default TtlDuration. To remove the default
TtlDuration from an existing feature group, use the
UpdateFeatureGroup API and set the TtlDuration
Unit and Value to null.
May throw ResourceLimitExceeded.
May throw ResourceNotFound.
Parameter featureGroupName :
The name or Amazon Resource Name (ARN) of the feature group that you're
updating.
Parameter featureAdditions :
Updates the feature group. Updating a feature group is an asynchronous
operation. When you get an HTTP 200 response, you've made a valid request.
It takes some time after you've made a valid request for Feature Store to
update the feature group.
Parameter onlineStoreConfig :
Updates the feature group online store configuration.
Implementation
Future<UpdateFeatureGroupResponse> updateFeatureGroup({
required String featureGroupName,
List<FeatureDefinition>? featureAdditions,
OnlineStoreConfigUpdate? onlineStoreConfig,
ThroughputConfigUpdate? throughputConfig,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.UpdateFeatureGroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FeatureGroupName': featureGroupName,
if (featureAdditions != null) 'FeatureAdditions': featureAdditions,
if (onlineStoreConfig != null) 'OnlineStoreConfig': onlineStoreConfig,
if (throughputConfig != null) 'ThroughputConfig': throughputConfig,
},
);
return UpdateFeatureGroupResponse.fromJson(jsonResponse.body);
}