Skip to content

create_fhir_datastore async

create_fhir_datastore(
    datastore_type_version: FHIRVersion,
    *,
    config_overrides: Optional[AsyncHealthLakeClientConfig] = None,
    datastore_name: Optional[DatastoreName] = None,
    sse_configuration: Optional[SseConfiguration] = None,
    preload_data_config: Optional[PreloadDataConfig] = 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,
    backup_configuration: Optional[BackupConfiguration] = None,
) -> CreateFHIRDatastoreResponse

Create a FHIR-enabled data store.

Parameters:

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

    The data store name (user-generated).

  • datastore_type_version (FHIRVersion) –

    The FHIR release version supported by the data store. Current support is for version R4.

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

    The server-side encryption key configuration for a customer-provided encryption key specified for creating a data store.

  • preload_data_config (Optional[PreloadDataConfig], default: None ) –

    An optional parameter to preload (import) open source Synthea FHIR data upon creation of the data store.

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

    An optional user-provided token to ensure API idempotency.

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

    The resource tags applied to a data store when it is created.

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

    The identity provider configuration to use for the data store.

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

    The analytics configuration for the data store.

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

    The natural language processing (NLP) configuration for the data store.

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

    The profile configuration for the data store.

  • backup_configuration (Optional[BackupConfiguration], default: None ) –

    The backup configuration for the data store.

Raises:

Source code in docs_src/capo_healthlake/_services/async_health_lake.py
async def create_fhir_datastore(
    self,
    datastore_type_version: "capo_healthlake.types.fhir_version.FHIRVersion",
    *,
    config_overrides: Optional[AsyncHealthLakeClientConfig] = None,
    datastore_name: Optional[
        "capo_healthlake.types.datastore_name.DatastoreName"
    ] = None,
    sse_configuration: Optional[
        "capo_healthlake.types.sse_configuration.SseConfiguration"
    ] = None,
    preload_data_config: Optional[
        "capo_healthlake.types.preload_data_config.PreloadDataConfig"
    ] = 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,
    backup_configuration: Optional[
        "capo_healthlake.types.backup_configuration.BackupConfiguration"
    ] = None,
) -> "capo_healthlake.types.create_fhir_datastore_response.CreateFHIRDatastoreResponse":
    """<p>Create a FHIR-enabled data store.</p>

    Args:
        datastore_name: <p>The data store name (user-generated).</p>
        datastore_type_version: <p>The FHIR release version supported by the data store. Current support is for version <code>R4</code>.</p>
        sse_configuration: <p>The server-side encryption key configuration for a customer-provided encryption key specified for creating a data store. </p>
        preload_data_config: <p>An optional parameter to preload (import) open source Synthea FHIR data upon creation of the data store.</p>
        client_token: <p>An optional user-provided token to ensure API idempotency.</p>
        tags: <p>The resource tags applied to a data store when it is created.</p>
        identity_provider_configuration: <p>The identity provider configuration to use for the data store.</p>
        analytics_configuration: <p>The analytics configuration for the data store.</p>
        nlp_configuration: <p>The natural language processing (NLP) configuration for the data store.</p>
        profile_configuration: <p>The profile configuration for the data store.</p>
        backup_configuration: The backup configuration for the 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.internal_server_exception.InternalServerException: <p>An unknown internal error occurred in the service.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_healthlake.types.create_fhir_datastore_request.CreateFHIRDatastoreRequest]",
    ) -> AsyncOperationResponse[
        "capo_healthlake.types.create_fhir_datastore_response.CreateFHIRDatastoreResponse"
    ]:
        import capo_healthlake._operations.health_lake.create_fhir_datastore

        (
            output,
            http_response,
        ) = await capo_healthlake._operations.health_lake.create_fhir_datastore.async_create_fhir_datastore(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateFHIRDatastore")
    )
    input_: capo_healthlake.types.create_fhir_datastore_request.CreateFHIRDatastoreRequest = {
        "datastore_type_version": datastore_type_version
    }
    if datastore_name is not None:
        input_["datastore_name"] = datastore_name
    if sse_configuration is not None:
        input_["sse_configuration"] = sse_configuration
    if preload_data_config is not None:
        input_["preload_data_config"] = preload_data_config
    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
    if backup_configuration is not None:
        input_["backup_configuration"] = backup_configuration

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