Skip to content

restore_fhir_datastore

restore_fhir_datastore(
    source_datastore_id: DatastoreId,
    restore_configuration: RestoreConfiguration,
    *,
    config_overrides: Optional[HealthLakeClientConfig] = None,
    datastore_name: Optional[DatastoreName] = None,
    sse_configuration: Optional[SseConfiguration] = None,
    client_token: Optional[ClientTokenString] = None,
    tags: Optional[TagList] = None,
    identity_provider_configuration: Optional[IdentityProviderConfiguration] = None,
    analytics_configuration: Optional[AnalyticsConfiguration] = None,
    nlp_configuration: Optional[NlpConfiguration] = None,
    profile_configuration: Optional[ProfileConfiguration] = None,
) -> RestoreFHIRDatastoreResponse

Restore a backup-enabled data store to a point in time. Creates a new data store from the backup.

Parameters:

  • source_datastore_id (DatastoreId) –

    The identifier of the source data store to restore from.

  • restore_configuration (RestoreConfiguration) –

    The restore configuration specifying the type and parameters for the restore.

  • datastore_name (Optional[DatastoreName], default: None ) –

    The name for the restored data store.

  • sse_configuration (Optional[SseConfiguration], default: None ) –

    The server-side encryption key configuration for the restored data store.

  • client_token (Optional[ClientTokenString], default: None ) –

    An optional user-provided token to ensure API idempotency of the restore.

  • tags (Optional[TagList], default: None ) –

    The resource tags applied to the restored data store.

  • identity_provider_configuration (Optional[IdentityProviderConfiguration], default: None ) –

    The identity provider configuration for the restored data store.

  • analytics_configuration (Optional[AnalyticsConfiguration], default: None ) –

    The analytics configuration for the restored data store.

  • nlp_configuration (Optional[NlpConfiguration], default: None ) –

    The NLP configuration for the restored data store.

  • profile_configuration (Optional[ProfileConfiguration], default: None ) –

    The profile configuration for the restored data store.

Raises:

Examples:

Restore a data store to a point in time

>>> client.restore_fhir_datastore(source_datastore_id='source-datastore-id', restore_configuration={'ContinuousBackupRestoreConfiguration': {'RestorePointTime': '2026-08-01T00:00:00Z'}}, datastore_name='RestoredFhirDatastore')
Source code in docs_src/capo_healthlake/_services/health_lake.py
def restore_fhir_datastore(
    self,
    source_datastore_id: "capo_healthlake.types.datastore_id.DatastoreId",
    restore_configuration: "capo_healthlake.types.restore_configuration.RestoreConfiguration",
    *,
    config_overrides: Optional[HealthLakeClientConfig] = None,
    datastore_name: Optional[
        "capo_healthlake.types.datastore_name.DatastoreName"
    ] = None,
    sse_configuration: Optional[
        "capo_healthlake.types.sse_configuration.SseConfiguration"
    ] = None,
    client_token: Optional[
        "capo_healthlake.types.client_token_string.ClientTokenString"
    ] = None,
    tags: Optional["capo_healthlake.types.tag_list.TagList"] = None,
    identity_provider_configuration: Optional[
        "capo_healthlake.types.identity_provider_configuration.IdentityProviderConfiguration"
    ] = None,
    analytics_configuration: Optional[
        "capo_healthlake.types.analytics_configuration.AnalyticsConfiguration"
    ] = None,
    nlp_configuration: Optional[
        "capo_healthlake.types.nlp_configuration.NlpConfiguration"
    ] = None,
    profile_configuration: Optional[
        "capo_healthlake.types.profile_configuration.ProfileConfiguration"
    ] = None,
) -> "capo_healthlake.types.restore_fhir_datastore_response.RestoreFHIRDatastoreResponse":
    """Restore a backup-enabled data store to a point in time. Creates a new data store from the backup.

    Args:
        source_datastore_id: The identifier of the source data store to restore from.
        restore_configuration: The restore configuration specifying the type and parameters for the restore.
        datastore_name: The name for the restored data store.
        sse_configuration: The server-side encryption key configuration for the restored data store.
        client_token: An optional user-provided token to ensure API idempotency of the restore.
        tags: The resource tags applied to the restored data store.
        identity_provider_configuration: The identity provider configuration for the restored data store.
        analytics_configuration: The analytics configuration for the restored data store.
        nlp_configuration: The NLP configuration for the restored data store.
        profile_configuration: The profile configuration for the restored data store.

    Raises:
        capo_healthlake.errors.access_denied_exception.AccessDeniedException: <p>Access is denied. Your account is not authorized to perform this operation.</p>
        capo_healthlake.errors.conflict_exception.ConflictException: <p>The data store is in a transition state and the user requested action cannot be performed.</p>
        capo_healthlake.errors.internal_server_exception.InternalServerException: <p>An unknown internal error occurred in the service.</p>
        capo_healthlake.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested data store was not found.</p>
        capo_healthlake.errors.throttling_exception.ThrottlingException: <p>The user has exceeded their maximum number of allowed calls to the given API. </p>
        capo_healthlake.errors.validation_exception.ValidationException: <p>The user input parameter was invalid.</p>
        capo_healthlake.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Restore a data store to a point in time

        >>> client.restore_fhir_datastore(source_datastore_id='source-datastore-id', restore_configuration={'ContinuousBackupRestoreConfiguration': {'RestorePointTime': '2026-08-01T00:00:00Z'}}, datastore_name='RestoredFhirDatastore')
    """

    def _handler(
        req: "OperationRequest[capo_healthlake.types.restore_fhir_datastore_request.RestoreFHIRDatastoreRequest]",
    ) -> OperationResponse[
        "capo_healthlake.types.restore_fhir_datastore_response.RestoreFHIRDatastoreResponse"
    ]:
        import capo_healthlake._operations.health_lake.restore_fhir_datastore

        output, http_response = (
            capo_healthlake._operations.health_lake.restore_fhir_datastore.restore_fhir_datastore(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RestoreFHIRDatastore")
    )
    input_: capo_healthlake.types.restore_fhir_datastore_request.RestoreFHIRDatastoreRequest = {
        "source_datastore_id": source_datastore_id,
        "restore_configuration": restore_configuration,
    }
    if datastore_name is not None:
        input_["datastore_name"] = datastore_name
    if sse_configuration is not None:
        input_["sse_configuration"] = sse_configuration
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags
    if identity_provider_configuration is not None:
        input_["identity_provider_configuration"] = identity_provider_configuration
    if analytics_configuration is not None:
        input_["analytics_configuration"] = analytics_configuration
    if nlp_configuration is not None:
        input_["nlp_configuration"] = nlp_configuration
    if profile_configuration is not None:
        input_["profile_configuration"] = profile_configuration

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output