Skip to main content

templates

Creates, updates, deletes, gets or lists a templates resource.

Overview

Nametemplates
TypeResource
Idaws.migrationhuborchestrator.templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the template.
namestringThe name of the template.
creation_timestring (date-time)The time at which the template was last created.
descriptionstringThe time at which the template was last created.
inputsarrayThe inputs provided for the creation of the migration workflow.
ownerstringThe owner of the migration workflow template.
statusstringThe status of the template. (CREATED, READY, PENDING_CREATION, CREATING, CREATION_FAILED)
status_messagestringThe status message of retrieving migration workflow templates.
tagsobjectThe tags added to the migration workflow template.
template_arnstring>The Amazon Resource Name (ARN) of the migration workflow template. The format for an Migration Hub Orchestrator template ARN is arn:aws:migrationhub-orchestrator:region:account:template/template-abcd1234. For more information about ARNs, see Amazon Resource Names (ARNs) in the AWS General Reference.
template_classstringThe class of the migration workflow template. The available template classes are: A2C MGN SAP_MULTI SQL_EC2 SQL_RDS VMIE
toolsarrayList of AWS services utilized in a migration workflow.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_templateselectid, regionGet the template you want to use for creating a migration workflow.
list_templatesselectregionmaxResults, nextToken, nameList the templates available in Migration Hub Orchestrator to create a migration workflow.
create_templateinsertregion, templateName, templateSourceCreates a migration workflow template.
update_templateupdateid, regionUpdates a migration workflow template.
delete_templatedeleteid, regionDeletes a migration workflow template.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringThe ID of the request to delete a migration workflow template.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results that can be returned.
namestringThe name of the template.
nextTokenstringThe pagination token.

SELECT examples

Get the template you want to use for creating a migration workflow.

SELECT
id,
name,
creation_time,
description,
inputs,
owner,
status,
status_message,
tags,
template_arn,
template_class,
tools
FROM aws.migrationhuborchestrator.templates
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a migration workflow template.

INSERT INTO aws.migrationhuborchestrator.templates (
templateName,
templateDescription,
templateSource,
clientToken,
tags,
region
)
SELECT
'{{ templateName }}' /* required */,
'{{ templateDescription }}',
'{{ templateSource }}' /* required */,
'{{ clientToken }}',
'{{ tags }}',
'{{ region }}'
RETURNING
tags,
template_arn,
template_id
;

UPDATE examples

Updates a migration workflow template.

UPDATE aws.migrationhuborchestrator.templates
SET
templateName = '{{ templateName }}',
templateDescription = '{{ templateDescription }}',
clientToken = '{{ clientToken }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
RETURNING
tags,
template_arn,
template_id;

DELETE examples

Deletes a migration workflow template.

DELETE FROM aws.migrationhuborchestrator.templates
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;