Skip to main content

template_actions

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

Overview

Nametemplate_actions
TypeResource
Idaws.mgn.template_actions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
action_idstringTemplate post migration custom action ID. (pattern: <code>.*[0-9a-zA-Z]</code>)
action_namestringTemplate post migration custom action name.
activebooleanTemplate post migration custom action active status.
categorystringTemplate post migration custom action category. (DISASTER_RECOVERY, OPERATING_SYSTEM, LICENSE_AND_SUBSCRIPTION, VALIDATION, OBSERVABILITY, REFACTORING, SECURITY, NETWORKING, CONFIGURATION, BACKUP, OTHER)
descriptionstringTemplate post migration custom action description. (pattern: <code>[0-9a-zA-Z ():/.,'-_#; ]</code>)
document_identifierstringTemplate post migration custom action document identifier.
document_versionstringTemplate post migration custom action document version. (pattern: <code>($DEFAULT|$LATEST|[0-9]+)</code>)
external_parametersobjectTemplate post migration custom action external parameters.
must_succeed_for_cutoverbooleanTemplate post migration custom action must succeed for cutover.
operating_systemstringOperating system eligible for this template post migration custom action. (pattern: <code>(linux|windows)</code>)
orderintegerTemplate post migration custom action order.
parametersobjectTemplate post migration custom action parameters.
timeout_secondsintegerTemplate post migration custom action timeout in seconds.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_template_actionsselectregionList template post migration custom actions.
remove_template_actionupdateregion, launchConfigurationTemplateID, actionIDRemove template post migration custom action.
put_template_actionreplaceregion, launchConfigurationTemplateID, actionName, documentIdentifier, order, actionIDPut template post migration custom action.

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
regionstringAWS region (default: us-east-1)

SELECT examples

List template post migration custom actions.

SELECT
action_id,
action_name,
active,
category,
description,
document_identifier,
document_version,
external_parameters,
must_succeed_for_cutover,
operating_system,
order,
parameters,
timeout_seconds
FROM aws.mgn.template_actions
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Remove template post migration custom action.

UPDATE aws.mgn.template_actions
SET
launchConfigurationTemplateID = '{{ launchConfigurationTemplateID }}',
actionID = '{{ actionID }}'
WHERE
region = '{{ region }}' --required
AND launchConfigurationTemplateID = '{{ launchConfigurationTemplateID }}' --required
AND actionID = '{{ actionID }}' --required;

REPLACE examples

Put template post migration custom action.

REPLACE aws.mgn.template_actions
SET
launchConfigurationTemplateID = '{{ launchConfigurationTemplateID }}',
actionName = '{{ actionName }}',
documentIdentifier = '{{ documentIdentifier }}',
order = {{ order }},
actionID = '{{ actionID }}',
documentVersion = '{{ documentVersion }}',
active = {{ active }},
timeoutSeconds = {{ timeoutSeconds }},
mustSucceedForCutover = {{ mustSucceedForCutover }},
parameters = '{{ parameters }}',
operatingSystem = '{{ operatingSystem }}',
externalParameters = '{{ externalParameters }}',
description = '{{ description }}',
category = '{{ category }}'
WHERE
region = '{{ region }}' --required
AND launchConfigurationTemplateID = '{{ launchConfigurationTemplateID }}' --required
AND actionName = '{{ actionName }}' --required
AND documentIdentifier = '{{ documentIdentifier }}' --required
AND order = '{{ order }}' --required
AND actionID = '{{ actionID }}' --required
RETURNING
action_id,
action_name,
active,
category,
description,
document_identifier,
document_version,
external_parameters,
must_succeed_for_cutover,
operating_system,
order,
parameters,
timeout_seconds;