templates
Creates, updates, deletes, gets or lists a templates resource.
Overview
| Name | templates |
| Type | Resource |
| Id | aws.migrationhuborchestrator.templates |
Fields
The following fields are returned by SELECT queries:
- get_template
- list_templates
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the template. |
name | string | The name of the template. |
creation_time | string (date-time) | The time at which the template was last created. |
description | string | The time at which the template was last created. |
inputs | array | The inputs provided for the creation of the migration workflow. |
owner | string | The owner of the migration workflow template. |
status | string | The status of the template. (CREATED, READY, PENDING_CREATION, CREATING, CREATION_FAILED) |
status_message | string | The status message of retrieving migration workflow templates. |
tags | object | The tags added to the migration workflow template. |
template_arn | string | >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_class | string | The class of the migration workflow template. The available template classes are: A2C MGN SAP_MULTI SQL_EC2 SQL_RDS VMIE |
tools | array | List of AWS services utilized in a migration workflow. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the template. |
name | string | The name of the template. |
arn | string | The Amazon Resource Name (ARN) of the template. |
description | string | The description of the template. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_template | select | id, region | Get the template you want to use for creating a migration workflow. | |
list_templates | select | region | maxResults, nextToken, name | List the templates available in Migration Hub Orchestrator to create a migration workflow. |
create_template | insert | region, templateName, templateSource | Creates a migration workflow template. | |
update_template | update | id, region | Updates a migration workflow template. | |
delete_template | delete | id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the request to delete a migration workflow template. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results that can be returned. |
name | string | The name of the template. |
nextToken | string | The pagination token. |
SELECT examples
- get_template
- list_templates
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
;
List the templates available in Migration Hub Orchestrator to create a migration workflow.
SELECT
id,
name,
arn,
description
FROM aws.migrationhuborchestrator.templates
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND name = '{{ name }}'
;
INSERT examples
- create_template
- Manifest
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
;
# Description fields are for documentation purposes
- name: templates
props:
- name: region
value: "{{ region }}"
description: Required parameter for the templates resource.
- name: templateName
value: "{{ templateName }}"
- name: templateDescription
value: "{{ templateDescription }}"
- name: templateSource
description: |
The migration workflow template used as the source for the new template.
value:
workflowId: "{{ workflowId }}"
- name: clientToken
value: "{{ clientToken }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_template
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
- delete_template
Deletes a migration workflow template.
DELETE FROM aws.migrationhuborchestrator.templates
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;