Skip to content

create_human_task_ui

create_human_task_ui(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    human_task_ui_name: Optional[HumanTaskUiName] = None,
    ui_template: Optional[UiTemplate] = None,
    tags: Optional[TagList] = None,
) -> CreateHumanTaskUiResponse

Defines the settings you will use for the human review workflow user interface. Reviewers will see a three-panel interface with an instruction area, the item to review, and an input area.

Parameters:

  • human_task_ui_name (Optional[HumanTaskUiName], default: None ) –

    The name of the user interface you are creating.

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

    An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define.

Raises:

  • ResourceInUse –

    Resource being accessed is in use.

  • ResourceLimitExceeded –

    You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def create_human_task_ui(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    human_task_ui_name: Optional[
        "capo_sagemaker.types.human_task_ui_name.HumanTaskUiName"
    ] = None,
    ui_template: Optional["capo_sagemaker.types.ui_template.UiTemplate"] = None,
    tags: Optional["capo_sagemaker.types.tag_list.TagList"] = None,
) -> "capo_sagemaker.types.create_human_task_ui_response.CreateHumanTaskUiResponse":
    """<p>Defines the settings you will use for the human review workflow user interface. Reviewers will see a three-panel interface with an instruction area, the item to review, and an input area.</p>

    Args:
        human_task_ui_name: <p>The name of the user interface you are creating.</p>
        tags: <p>An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define.</p>

    Raises:
        capo_sagemaker.errors.resource_in_use.ResourceInUse: <p>Resource being accessed is in use.</p>
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.create_human_task_ui_request.CreateHumanTaskUiRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.create_human_task_ui_response.CreateHumanTaskUiResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.create_human_task_ui

        output, http_response = (
            capo_sagemaker._operations.sage_maker.create_human_task_ui.create_human_task_ui(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateHumanTaskUi")
    )
    input_: capo_sagemaker.types.create_human_task_ui_request.CreateHumanTaskUiRequest = {}
    if human_task_ui_name is not None:
        input_["human_task_ui_name"] = human_task_ui_name
    if ui_template is not None:
        input_["ui_template"] = ui_template
    if tags is not None:
        input_["tags"] = tags

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