updateDataset method
- required List<
DatasetAction> actions, - required String datasetName,
- List<
DatasetContentDeliveryRule> ? contentDeliveryRules, - List<
LateDataRule> ? lateDataRules, - RetentionPeriod? retentionPeriod,
- List<
DatasetTrigger> ? triggers, - VersioningConfiguration? versioningConfiguration,
Updates the settings of a data set.
May throw InvalidRequestException. May throw ResourceNotFoundException. May throw InternalFailureException. May throw ServiceUnavailableException. May throw ThrottlingException.
Parameter actions
:
A list of DatasetAction
objects.
Parameter datasetName
:
The name of the data set to update.
Parameter contentDeliveryRules
:
When dataset contents are created, they are delivered to destinations
specified here.
Parameter lateDataRules
:
A list of data rules that send notifications to Amazon CloudWatch, when
data arrives late. To specify lateDataRules
, the dataset must
use a DeltaTimer
filter.
Parameter retentionPeriod
:
How long, in days, dataset contents are kept for the dataset.
Parameter triggers
:
A list of DatasetTrigger
objects. The list can be empty or
can contain up to five DatasetTrigger
objects.
Parameter versioningConfiguration
:
Optional. How many versions of dataset contents are kept. If not specified
or set to null, only the latest version plus the latest succeeded version
(if they are different) are kept for the time period specified by the
retentionPeriod
parameter. For more information, see Keeping
Multiple Versions of AWS IoT Analytics Data Sets in the AWS IoT
Analytics User Guide.
Implementation
Future<void> updateDataset({
required List<DatasetAction> actions,
required String datasetName,
List<DatasetContentDeliveryRule>? contentDeliveryRules,
List<LateDataRule>? lateDataRules,
RetentionPeriod? retentionPeriod,
List<DatasetTrigger>? triggers,
VersioningConfiguration? versioningConfiguration,
}) async {
ArgumentError.checkNotNull(actions, 'actions');
ArgumentError.checkNotNull(datasetName, 'datasetName');
_s.validateStringLength(
'datasetName',
datasetName,
1,
128,
isRequired: true,
);
final $payload = <String, dynamic>{
'actions': actions,
if (contentDeliveryRules != null)
'contentDeliveryRules': contentDeliveryRules,
if (lateDataRules != null) 'lateDataRules': lateDataRules,
if (retentionPeriod != null) 'retentionPeriod': retentionPeriod,
if (triggers != null) 'triggers': triggers,
if (versioningConfiguration != null)
'versioningConfiguration': versioningConfiguration,
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/datasets/${Uri.encodeComponent(datasetName)}',
exceptionFnMap: _exceptionFns,
);
}