Skip to content

update_data_transformation_profile async

update_data_transformation_profile(
    profile_id: ProfileIdString,
    profile_mapping: ProfileMapping,
    *,
    config_overrides: Optional[AsyncHealthLakeClientConfig] = None,
    change_description: Optional[ChangeDescription] = None,
) -> UpdateDataTransformationProfileResponse

Updates the DRAFT version (version 0) of a data transformation profile with new profile content. The update replaces all existing DRAFT content.

Parameters:

  • profile_id (ProfileIdString) –

    The unique identifier of the profile to update.

  • profile_mapping (ProfileMapping) –

    The new profile content for the DRAFT version. This is a full replacement of all profile files.

  • change_description (Optional[ChangeDescription], default: None ) –

    A description of what changed in this update.

Raises:

Source code in docs_src/capo_healthlake/_services/async_health_lake.py
async def update_data_transformation_profile(
    self,
    profile_id: "capo_healthlake.types.profile_id_string.ProfileIdString",
    profile_mapping: "capo_healthlake.types.profile_mapping.ProfileMapping",
    *,
    config_overrides: Optional[AsyncHealthLakeClientConfig] = None,
    change_description: Optional[
        "capo_healthlake.types.change_description.ChangeDescription"
    ] = None,
) -> "capo_healthlake.types.update_data_transformation_profile_response.UpdateDataTransformationProfileResponse":
    """<p>Updates the DRAFT version (version 0) of a data transformation profile with new profile content. The update replaces all existing DRAFT content.</p>

    Args:
        profile_id: <p>The unique identifier of the profile to update.</p>
        profile_mapping: <p>The new profile content for the DRAFT version. This is a full replacement of all profile files.</p>
        change_description: <p>A description of what changed in this update.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_healthlake.types.update_data_transformation_profile_request.UpdateDataTransformationProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_healthlake.types.update_data_transformation_profile_response.UpdateDataTransformationProfileResponse"
    ]:
        import capo_healthlake._operations.health_lake.update_data_transformation_profile

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

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

        return capo_healthlake.types.update_data_transformation_profile_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateDataTransformationProfile", redact_input=_redact_input
        ),
    )
    input_: capo_healthlake.types.update_data_transformation_profile_request.UpdateDataTransformationProfileRequest = {
        "profile_id": profile_id,
        "profile_mapping": profile_mapping,
    }
    if change_description is not None:
        input_["change_description"] = change_description

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