Skip to content

put_storage_configuration async

put_storage_configuration(
    storage_type: StorageType,
    *,
    config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
    multi_layer_storage: Optional[MultiLayerStorage] = None,
    disassociated_data_storage: Optional[DisassociatedDataStorageState] = None,
    retention_period: Optional[RetentionPeriod] = None,
    warm_tier: Optional[WarmTierState] = None,
    warm_tier_retention_period: Optional[WarmTierRetentionPeriod] = None,
    disallow_ingest_null_na_n: Optional[DisallowIngestNullNaN] = None,
) -> PutStorageConfigurationResponse

Configures storage settings for IoT SiteWise.

Parameters:

  • storage_type (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.

  • multi_layer_storage (Optional[MultiLayerStorage], default: None ) –

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

  • disassociated_data_storage (Optional[DisassociatedDataStorageState], default: None ) –

    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.

      After the disassociatedDataStorage is enabled, you can't disable it.

    • 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.

  • warm_tier (Optional[WarmTierState], default: None ) –

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

  • warm_tier_retention_period (Optional[WarmTierRetentionPeriod], default: None ) –

    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.

  • disallow_ingest_null_na_n (Optional[DisallowIngestNullNaN], default: None ) –

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

Raises:

  • ConflictingOperationException –

    Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

  • InternalFailureException –

    IoT SiteWise can't process your request right now. Try again later.

  • InvalidRequestException –

    The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.

  • LimitExceededException –

    You've reached the quota for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.

    For more information, see Quotas in the IoT SiteWise User Guide.

  • ResourceAlreadyExistsException –

    The resource already exists.

  • ResourceNotFoundException –

    The requested resource can't be found.

  • ThrottlingException –

    Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.

    For more information, see Quotas in the IoT SiteWise User Guide.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_iotsitewise/_services/async_io_t_site_wise.py
async def put_storage_configuration(
    self,
    storage_type: "capo_iotsitewise.types.storage_type.StorageType",
    *,
    config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
    multi_layer_storage: Optional[
        "capo_iotsitewise.types.multi_layer_storage.MultiLayerStorage"
    ] = None,
    disassociated_data_storage: Optional[
        "capo_iotsitewise.types.disassociated_data_storage_state.DisassociatedDataStorageState"
    ] = None,
    retention_period: Optional[
        "capo_iotsitewise.types.retention_period.RetentionPeriod"
    ] = None,
    warm_tier: Optional[
        "capo_iotsitewise.types.warm_tier_state.WarmTierState"
    ] = None,
    warm_tier_retention_period: Optional[
        "capo_iotsitewise.types.warm_tier_retention_period.WarmTierRetentionPeriod"
    ] = None,
    disallow_ingest_null_na_n: Optional[
        "capo_iotsitewise.types.disallow_ingest_null_na_n.DisallowIngestNullNaN"
    ] = None,
) -> "capo_iotsitewise.types.put_storage_configuration_response.PutStorageConfigurationResponse":
    """<p>Configures storage settings for IoT SiteWise.</p>

    Args:
        storage_type: <p>The storage tier that you specified for your data. The <code>storageType</code> parameter can be one of the following values:</p> <ul> <li> <p> <code>SITEWISE_DEFAULT_STORAGE</code> – IoT SiteWise saves your data into the hot tier. The hot tier is a service-managed database.</p> </li> <li> <p> <code>MULTI_LAYER_STORAGE</code> – IoT SiteWise saves your data in both the cold tier and the hot tier. The cold tier is a customer-managed Amazon S3 bucket.</p> </li> </ul>
        multi_layer_storage: <p>Identifies a storage destination. If you specified <code>MULTI_LAYER_STORAGE</code> for the storage type, you must specify a <code>MultiLayerStorage</code> object.</p>
        disassociated_data_storage: <p>Contains the storage configuration for time series (data streams) that aren't associated with asset properties. The <code>disassociatedDataStorage</code> can be one of the following values:</p> <ul> <li> <p> <code>ENABLED</code> – IoT SiteWise accepts time series that aren't associated with asset properties.</p> <important> <p>After the <code>disassociatedDataStorage</code> is enabled, you can't disable it.</p> </important> </li> <li> <p> <code>DISABLED</code> – IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset properties.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/data-streams.html">Data streams</a> in the <i>IoT SiteWise User Guide</i>.</p>
        warm_tier: <p>A service managed storage tier optimized for analytical queries. It stores periodically uploaded, buffered and historical data ingested with the CreaeBulkImportJob API.</p>
        warm_tier_retention_period: <p>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.</p>
        disallow_ingest_null_na_n: <p>Describes the configuration for ingesting NULL and NaN data. By default the feature is allowed. The feature is disallowed if the value is <code>true</code>.</p>

    Raises:
        capo_iotsitewise.errors.conflicting_operation_exception.ConflictingOperationException: <p>Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</p>
        capo_iotsitewise.errors.internal_failure_exception.InternalFailureException: <p>IoT SiteWise can't process your request right now. Try again later.</p>
        capo_iotsitewise.errors.invalid_request_exception.InvalidRequestException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.</p>
        capo_iotsitewise.errors.limit_exceeded_exception.LimitExceededException: <p>You've reached the quota for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html">Quotas</a> in the <i>IoT SiteWise User Guide</i>.</p>
        capo_iotsitewise.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The resource already exists.</p>
        capo_iotsitewise.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_iotsitewise.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html">Quotas</a> in the <i>IoT SiteWise User Guide</i>.</p>
        capo_iotsitewise.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iotsitewise.types.put_storage_configuration_request.PutStorageConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_iotsitewise.types.put_storage_configuration_response.PutStorageConfigurationResponse"
    ]:
        import capo_iotsitewise._operations.aws_io_t_site_wise.put_storage_configuration

        (
            output,
            http_response,
        ) = await capo_iotsitewise._operations.aws_io_t_site_wise.put_storage_configuration.async_put_storage_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutStorageConfiguration")
    )
    input_: capo_iotsitewise.types.put_storage_configuration_request.PutStorageConfigurationRequest = {
        "storage_type": storage_type
    }
    if multi_layer_storage is not None:
        input_["multi_layer_storage"] = multi_layer_storage
    if disassociated_data_storage is not None:
        input_["disassociated_data_storage"] = disassociated_data_storage
    if retention_period is not None:
        input_["retention_period"] = retention_period
    if warm_tier is not None:
        input_["warm_tier"] = warm_tier
    if warm_tier_retention_period is not None:
        input_["warm_tier_retention_period"] = warm_tier_retention_period
    if disallow_ingest_null_na_n is not None:
        input_["disallow_ingest_null_na_n"] = disallow_ingest_null_na_n

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output