Skip to content

create_data_transformation_profile async

create_data_transformation_profile(
    source_format: SourceFormat,
    source: CreateDataTransformationProfileSource,
    profile_name: ProfileNameString,
    *,
    config_overrides: Optional[AsyncHealthLakeClientConfig] = None,
    kms_key_id: Optional[KmsKeyId] = None,
    profile_description: Optional[ProfileDescription] = None,
    tags: Optional[TagMap] = None,
    client_token: Optional[ClientToken] = None,
) -> CreateDataTransformationProfileResponse

Creates a data transformation profile in DRAFT state. Specify a built-in starter profile, an existing profile version, raw profile content, or a sample data file as the source.

Parameters:

  • source_format (SourceFormat) –

    The source data format that this profile converts from (Consolidated Clinical Document Architecture (C-CDA) or Comma-separated values (CSV)).

  • source (CreateDataTransformationProfileSource) –

    The source for the initial profile content. Specify a built-in starter profile, an existing profile version to clone, raw profile content for CI/CD workflows, or a sample data file in Amazon S3.

  • kms_key_id (Optional[KmsKeyId], default: None ) –

    The Amazon Web Services Key Management Service (Amazon Web Services KMS) key identifier used to encrypt the profile content at rest.

  • profile_description (Optional[ProfileDescription], default: None ) –

    A human-readable description of the profile's purpose.

  • profile_name (ProfileNameString) –

    A name for the data transformation profile.

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

    The tags to associate with the profile at creation time.

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

    A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

Raises:

Source code in docs_src/capo_healthlake/_services/async_health_lake.py
async def create_data_transformation_profile(
    self,
    source_format: "capo_healthlake.types.source_format.SourceFormat",
    source: "capo_healthlake.types.create_data_transformation_profile_source.CreateDataTransformationProfileSource",
    profile_name: "capo_healthlake.types.profile_name_string.ProfileNameString",
    *,
    config_overrides: Optional[AsyncHealthLakeClientConfig] = None,
    kms_key_id: Optional["capo_healthlake.types.kms_key_id.KmsKeyId"] = None,
    profile_description: Optional[
        "capo_healthlake.types.profile_description.ProfileDescription"
    ] = None,
    tags: Optional["capo_healthlake.types.tag_map.TagMap"] = None,
    client_token: Optional["capo_healthlake.types.client_token.ClientToken"] = None,
) -> "capo_healthlake.types.create_data_transformation_profile_response.CreateDataTransformationProfileResponse":
    """<p>Creates a data transformation profile in DRAFT state. Specify a built-in starter profile, an existing profile version, raw profile content, or a sample data file as the source.</p>

    Args:
        source_format: <p>The source data format that this profile converts from (Consolidated Clinical Document Architecture (C-CDA) or Comma-separated values (CSV)).</p>
        source: <p>The source for the initial profile content. Specify a built-in starter profile, an existing profile version to clone, raw profile content for CI/CD workflows, or a sample data file in Amazon S3.</p>
        kms_key_id: <p>The Amazon Web Services Key Management Service (Amazon Web Services KMS) key identifier used to encrypt the profile content at rest.</p>
        profile_description: <p>A human-readable description of the profile's purpose.</p>
        profile_name: <p>A name for the data transformation profile.</p>
        tags: <p>The tags to associate with the profile at creation time.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.</p>

    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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds the service quota.</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_data_transformation_profile_request.CreateDataTransformationProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_healthlake.types.create_data_transformation_profile_response.CreateDataTransformationProfileResponse"
    ]:
        import capo_healthlake._operations.health_lake.create_data_transformation_profile

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

    def _redact_input(
        input_: "capo_healthlake.types.create_data_transformation_profile_request.CreateDataTransformationProfileRequest",
    ) -> dict[str, Any]:
        import capo_healthlake.types.create_data_transformation_profile_request

        return capo_healthlake.types.create_data_transformation_profile_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateDataTransformationProfile", redact_input=_redact_input
        ),
    )
    input_: capo_healthlake.types.create_data_transformation_profile_request.CreateDataTransformationProfileRequest = {
        "source_format": source_format,
        "source": source,
        "profile_name": profile_name,
    }
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if profile_description is not None:
        input_["profile_description"] = profile_description
    if tags is not None:
        input_["tags"] = tags
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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