Skip to content

publish_data_transformation_profile

publish_data_transformation_profile(
    profile_id: ProfileIdString,
    source_format: SourceFormat,
    *,
    config_overrides: Optional[HealthLakeClientConfig] = None,
    from_existing_version: Optional[ProfileVersion] = None,
    change_description: Optional[ChangeDescription] = None,
) -> PublishDataTransformationProfileResponse

Promotes the current DRAFT version of a data transformation profile to a new immutable published version. Also supports rollback by publishing from a previously published version.

Parameters:

  • profile_id (ProfileIdString) –

    The unique identifier of the profile to publish.

  • source_format (SourceFormat) –

    The source data format of the profile.

  • from_existing_version (Optional[ProfileVersion], default: None ) –

    The version number of a previously published version to republish as the new latest version. Use this parameter for rollback scenarios. If you omit this parameter, the service publishes the current DRAFT version.

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

    A description of what changed or why this version is being published.

Raises:

Source code in docs_src/capo_healthlake/_services/health_lake.py
def publish_data_transformation_profile(
    self,
    profile_id: "capo_healthlake.types.profile_id_string.ProfileIdString",
    source_format: "capo_healthlake.types.source_format.SourceFormat",
    *,
    config_overrides: Optional[HealthLakeClientConfig] = None,
    from_existing_version: Optional[
        "capo_healthlake.types.profile_version.ProfileVersion"
    ] = None,
    change_description: Optional[
        "capo_healthlake.types.change_description.ChangeDescription"
    ] = None,
) -> "capo_healthlake.types.publish_data_transformation_profile_response.PublishDataTransformationProfileResponse":
    """<p>Promotes the current DRAFT version of a data transformation profile to a new immutable published version. Also supports rollback by publishing from a previously published version.</p>

    Args:
        profile_id: <p>The unique identifier of the profile to publish.</p>
        source_format: <p>The source data format of the profile.</p>
        from_existing_version: <p>The version number of a previously published version to republish as the new latest version. Use this parameter for rollback scenarios. If you omit this parameter, the service publishes the current DRAFT version.</p>
        change_description: <p>A description of what changed or why this version is being published.</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.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.
    """

    def _handler(
        req: "OperationRequest[capo_healthlake.types.publish_data_transformation_profile_request.PublishDataTransformationProfileRequest]",
    ) -> OperationResponse[
        "capo_healthlake.types.publish_data_transformation_profile_response.PublishDataTransformationProfileResponse"
    ]:
        import capo_healthlake._operations.health_lake.publish_data_transformation_profile

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PublishDataTransformationProfile")
    )
    input_: capo_healthlake.types.publish_data_transformation_profile_request.PublishDataTransformationProfileRequest = {
        "profile_id": profile_id,
        "source_format": source_format,
    }
    if from_existing_version is not None:
        input_["from_existing_version"] = from_existing_version
    if change_description is not None:
        input_["change_description"] = change_description

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