template_actions
Creates, updates, deletes, gets or lists a template_actions resource.
Overview
| Name | template_actions |
| Type | Resource |
| Id | aws.mgn.template_actions |
Fields
The following fields are returned by SELECT queries:
- list_template_actions
| Name | Datatype | Description |
|---|---|---|
action_id | string | Template post migration custom action ID. (pattern: <code>.*[0-9a-zA-Z]</code>) |
action_name | string | Template post migration custom action name. |
active | boolean | Template post migration custom action active status. |
category | string | Template post migration custom action category. (DISASTER_RECOVERY, OPERATING_SYSTEM, LICENSE_AND_SUBSCRIPTION, VALIDATION, OBSERVABILITY, REFACTORING, SECURITY, NETWORKING, CONFIGURATION, BACKUP, OTHER) |
description | string | Template post migration custom action description. (pattern: <code>[0-9a-zA-Z ():/.,'-_#; ]</code>) |
document_identifier | string | Template post migration custom action document identifier. |
document_version | string | Template post migration custom action document version. (pattern: <code>($DEFAULT|$LATEST|[0-9]+)</code>) |
external_parameters | object | Template post migration custom action external parameters. |
must_succeed_for_cutover | boolean | Template post migration custom action must succeed for cutover. |
operating_system | string | Operating system eligible for this template post migration custom action. (pattern: <code>(linux|windows)</code>) |
order | integer | Template post migration custom action order. |
parameters | object | Template post migration custom action parameters. |
timeout_seconds | integer | Template post migration custom action timeout in seconds. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_template_actions | select | region | List template post migration custom actions. | |
remove_template_action | update | region, launchConfigurationTemplateID, actionID | Remove template post migration custom action. | |
put_template_action | replace | region, launchConfigurationTemplateID, actionName, documentIdentifier, order, actionID | Put 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_template_actions
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_action
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_action
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;