Appendix E: Tag and parameter placeholders - Ops Automator

Appendix E: Tag and parameter placeholders

Placeholders can be used in parameters such as names, prefixes, and descriptions, and tag names and values set by Ops Automator actions. Placeholders have the format {name}. When tasks are implemented, placeholders are replaced with dynamic values. This allows the solution to give created resources dynamic names and descriptions, and to set dynamic tag names and values on created or affected resources.

The following table contains a list of common placeholders.

Placeholder Description
{account} The account in which the task is run.
{stack} The name of the Ops Automator stack.
{date} The date in YYYYMMDD format.
{datetime} The date in YYYYMMDDHHMMSS format.
{day} The day in DD format.
{hour} The hour in HH format.
{iso-date} The date in ISO format.
{iso-datetime} The date and time in ISO format.
{iso-time} The time in ISO format.
{iso-weekday} The weekday in ISO format.
{minute} The minute in MM format.
{month} The month in MM format.
{monthname} The abbreviated name of the month. For example, Jan.
{monthname-long} The full name of the month. For example, January.
{region} The Region in which the task is run.
{second} The seconds in SS format.
{task} The name of the implemented task.
{task-id} The unique ID of the implemented task.
{task-group} The unique ID of the task group. A task group is a collection of tasks that are the result of a task started by the scheduler. One task can have multiple task executions depending on the aggregation level of the task. Each task will have its own task ID, but the tasks will share a group ID.
{time} The time in HHMMSS format.
{timezone} The time zone configured for the task.
{weekday} The abbreviated name of the weekday. For example, Mon.
{weekday-long} The full name of the weekday. For example, Monday.
{year} The year in YYYY format.

Ops Automator actions can have action-specific placeholders for tags.

The following table contains placeholders that are specific to the Ec2ReplaceInstance and Ec2ResizeInstance actions

Placeholder Description
{instance-id} The instance ID of the volume from which the snapshot was taken
{volume-id} The volume ID of the volume from which the snapshot was taken
{device} The device of the volume from which the snapshot was taken
{snapshot-ids} The snapshot IDs for snapshots taken for all volumes of an instance
{snapshot-id} The snapshot ID for a snapshot taken from a volume

The following table contains a list of special placeholders.

Placeholder Description
{task-tag} Expands to the value of the tag used to specify the list of tasks for the Ops Automator stack. You can use this placeholder to set follow-up actions for resources affected or created by a task. For example, {task-tag}=NameoftheFollowUpAction
{delete} Use this placeholder for tags in tag parameters. Setting a tag to this value will delete the tag. For example, TagName={delete} will delete the TagName tag.
{ssm:name} Expands to the value of a parameter in the AWS Systems Manager Parameter Store for the account with the Ops Automator stack. Parameters of the types string and string list are supported. This placeholder allows you to share parameters between tasks and manage then centrally.