RenderUiTemplate - Amazon SageMaker
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

RenderUiTemplate

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

Request Syntax

{ "HumanTaskUiArn": "string", "RoleArn": "string", "Task": { "Input": "string" }, "UiTemplate": { "Content": "string" } }

Request Parameters

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

The request accepts the following data in JSON format.

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.

Type: String

Length Constraints: Maximum length of 1024.

Pattern: arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]+:[0-9]{12}:human-task-ui/.*

Required: No

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: No

Response Syntax

{ "Errors": [ { "Code": "string", "Message": "string" } ], "RenderedContent": "string" }

Response Elements

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

Errors

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

ResourceNotFound

Resource being access is not found.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: