putStorageConfiguration method

Future<PutStorageConfigurationResponse> putStorageConfiguration({
  1. required StorageType storageType,
  2. bool? disallowIngestNullNaN,
  3. DisassociatedDataStorageState? disassociatedDataStorage,
  4. MultiLayerStorage? multiLayerStorage,
  5. RetentionPeriod? retentionPeriod,
  6. WarmTierState? warmTier,
  7. WarmTierRetentionPeriod? warmTierRetentionPeriod,
})

Configures storage settings for IoT SiteWise.

May throw ConflictingOperationException. May throw InternalFailureException. May throw InvalidRequestException. May throw LimitExceededException. May throw ResourceAlreadyExistsException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter storageType : The storage tier that you specified for your data. The storageType parameter can be one of the following values:

  • SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a service-managed database.
  • MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the hot tier. The cold tier is a customer-managed Amazon S3 bucket.

Parameter disallowIngestNullNaN : Describes the configuration for ingesting NULL and NaN data. By default the feature is allowed. The feature is disallowed if the value is true.

Parameter disassociatedDataStorage : Contains the storage configuration for time series (data streams) that aren't associated with asset properties. The disassociatedDataStorage can be one of the following values:

  • ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties.
  • DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset properties.
For more information, see Data streams in the IoT SiteWise User Guide.

Parameter multiLayerStorage : Identifies a storage destination. If you specified MULTI_LAYER_STORAGE for the storage type, you must specify a MultiLayerStorage object.

Parameter warmTier : A service managed storage tier optimized for analytical queries. It stores periodically uploaded, buffered and historical data ingested with the CreaeBulkImportJob API.

Parameter warmTierRetentionPeriod : Set this period to specify how long your data is stored in the warm tier before it is deleted. You can set this only if cold tier is enabled.

Implementation

Future<PutStorageConfigurationResponse> putStorageConfiguration({
  required StorageType storageType,
  bool? disallowIngestNullNaN,
  DisassociatedDataStorageState? disassociatedDataStorage,
  MultiLayerStorage? multiLayerStorage,
  RetentionPeriod? retentionPeriod,
  WarmTierState? warmTier,
  WarmTierRetentionPeriod? warmTierRetentionPeriod,
}) async {
  final $payload = <String, dynamic>{
    'storageType': storageType.value,
    if (disallowIngestNullNaN != null)
      'disallowIngestNullNaN': disallowIngestNullNaN,
    if (disassociatedDataStorage != null)
      'disassociatedDataStorage': disassociatedDataStorage.value,
    if (multiLayerStorage != null) 'multiLayerStorage': multiLayerStorage,
    if (retentionPeriod != null) 'retentionPeriod': retentionPeriod,
    if (warmTier != null) 'warmTier': warmTier.value,
    if (warmTierRetentionPeriod != null)
      'warmTierRetentionPeriod': warmTierRetentionPeriod,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/configuration/account/storage',
    exceptionFnMap: _exceptionFns,
  );
  return PutStorageConfigurationResponse.fromJson(response);
}