:doc:`SageMaker <../../sagemaker>` / Client / render_ui_template

******************
render_ui_template
******************



.. py:method:: SageMaker.Client.render_ui_template(**kwargs)

  

  Renders the UI template so that you can preview the worker's experience.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RenderUiTemplate>`_  


  **Request Syntax**
  ::

    response = client.render_ui_template(
        UiTemplate={
            'Content': 'string'
        },
        Task={
            'Input': 'string'
        },
        RoleArn='string',
        HumanTaskUiArn='string'
    )
    
  :type UiTemplate: dict
  :param UiTemplate: 

    A ``Template`` object containing the worker UI template to render.

    

  
    - **Content** *(string) --* **[REQUIRED]** 

      The content of the Liquid template for the worker user interface.

      

    
  
  :type Task: dict
  :param Task: **[REQUIRED]** 

    A ``RenderableTask`` object containing a representative task to render.

    

  
    - **Input** *(string) --* **[REQUIRED]** 

      A JSON object that contains values for the variables defined in the template. It is made available to the template under the substitution variable ``task.input``. For example, if you define a variable ``task.input.text`` in your template, you can supply the variable in the JSON object as ``"text": "sample text"``.

      

    
  
  :type RoleArn: string
  :param RoleArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) that has access to the S3 objects that are used by the template.

    

  
  :type HumanTaskUiArn: string
  :param HumanTaskUiArn: 

    The ``HumanTaskUiArn`` of the worker UI that you want to render. Do not provide a ``HumanTaskUiArn`` if you use the ``UiTemplate`` parameter.

     

    See a list of available Human Ui Amazon Resource Names (ARNs) in `UiConfig <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UiConfig.html>`__.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'RenderedContent': 'string',
          'Errors': [
              {
                  'Code': 'string',
                  'Message': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RenderedContent** *(string) --* 

        A Liquid template that renders the HTML for the worker UI.

        
      

      - **Errors** *(list) --* 

        A list of one or more ``RenderingError`` objects if any were encountered while rendering the template. If there were no errors, the list is empty.

        
        

        - *(dict) --* 

          A description of an error that occurred while rendering the template.

          
          

          - **Code** *(string) --* 

            A unique identifier for a specific class of errors.

            
          

          - **Message** *(string) --* 

            A human-readable message describing the error.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`SageMaker.Client.exceptions.ResourceNotFound`

  