Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: CC-BY-SA-4.0

RenderUiTemplate

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

{
   "[RoleArn](#SageMaker-RenderUiTemplate-request-RoleArn)": "string",
   "[Task](#SageMaker-RenderUiTemplate-request-Task)": { 
      "[Input](API_RenderableTask.md#SageMaker-Type-RenderableTask-Input)": "string"
   },
   "[UiTemplate](#SageMaker-RenderUiTemplate-request-UiTemplate)": { 
      "[Content](API_UiTemplate.md#SageMaker-Type-UiTemplate-Content)": "string"
   }
}

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

** RoleArn ** The Amazon Resource Name (ARN) that has access to the S3 objects that are used by the template.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern: ^arn:aws[a-z\-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$
Required: Yes

** Task ** A RenderableTask object containing a representative task to render.
Type: RenderableTask object
Required: Yes

** UiTemplate ** A Template object containing the worker UI template to render.
Type: UiTemplate object
Required: Yes

{
   "[Errors](#SageMaker-RenderUiTemplate-response-Errors)": [ 
      { 
         "[Code](API_RenderingError.md#SageMaker-Type-RenderingError-Code)": "string",
         "[Message](API_RenderingError.md#SageMaker-Type-RenderingError-Message)": "string"
      }
   ],
   "[RenderedContent](#SageMaker-RenderUiTemplate-response-RenderedContent)": "string"
}

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

** Errors ** 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.
Type: Array of RenderingError objects

** RenderedContent ** A Liquid template that renders the HTML for the worker UI.
Type: String

For information about the errors that are common to all actions, see Common Errors.

For more information about using this API in one of the language-specific AWS SDKs, see the following: + AWS Command Line Interface + AWS SDK for .NET + AWS SDK for C++ + AWS SDK for Go + AWS SDK for Go - Pilot + AWS SDK for Java + AWS SDK for JavaScript + AWS SDK for PHP V3 + AWS SDK for Python + AWS SDK for Ruby V2