Replacement Tokens are used to replace text with a variable that is unknown at the time of authoring the lab. The value of these variables may not be generated or created until the lab is launched by the student. These can include usernames, passwords, user first name, user last name, running lab instance ID number, cloud platform information, Virtual Machines, etc. Replacement Tokens use the syntax @lab.replacementTokenName.
Some replacement tokens may not be available in your lab, depending on the lab's configuration. I.E. Cloud related tokens are not available in labs that do not use cloud orchestration, and virtualization related tokens are not available in labs that only use a cloud-based configuration.
Using Replacement Tokens in Lab Instructions
You can see the list of all @lab replacement tokens available to your lab by editing the instructions, and clicking on the @lab button. Any replacement tokens that are applicable to your lab configuration, will be shown.
Alternatively, while editing the lab instructions, you can type @lab anywhere in the lab instructions, and all available replacement tokens will be displayed and selectable, with a description of each replacement token.
Using Replacement Tokens in a Cloud Resource Template
Each Cloud Resource Template is associated with a raw template document that defines the collection of resources that will be deployed in the cloud. Replacement tokens can be used inside of the raw templates itself, or as parameter values to the Cloud Resource Templates or in lab instructions, to provide some dynamic values that help keep resource names unique.
To use replacement tokens inside a Cloud Resource Template, insert the @lab replacement token(s) in to your raw template document where you want them to be used.
Using replacement tokens as Cloud Resource Template parameters is a best practice, and highly preferred over using replacement tokens directly inside of raw template documents. This helps help keep resource names unique.
Using Replacement Tokens as Cloud Resource Template Parameters
When you are assigning parameter values for a Cloud Resource template, you can provide specific values, or you can apply @lab replacement tokens. To apply a Replacement Token, in the parameter value field, enter @lab, and then press the period key. The moment you type the period you will be presented with all available replacement tokens for your lab, based on how the lab is configured.
Available Replacement tokens
The table below lists the replacement tokens that are available to use in Skillable Studio.
Some replacement tokens may not be available in your lab, depending on the lab's configuration. I.E. Cloud related tokens are not available in labs that do not use cloud orchestration, and virtualization related tokens are not available in labs that only use a cloud-based configuration.
Lab Replacement Token
Description
@lab.Activity(Automated1)Inserts activity Automated1 into the instructions.
@lab.Activity(Question1)Inserts activity Question1 into the instructions.
@lab.LabInstance.IdThe unique ID of the running lab instance.
@lab.LabInstance.GlobalIdThe globally unique ID of the running lab instance.
@lab.LabInstance.StartDateThe UTC start date of the running lab instance. Format: yyyyMMdd
@lab.LabProfile.IdThe unique ID of the lab profile.
@lab.User.IdThe unique ID of user running the lab.
@lab.User.FirstNameThe first name of the user running the lab.
@lab.User.LastNameThe last name of the user running the lab.
@lab.User.EmailThe e-mail address of the user running the lab.
@lab.User.ExternalIdThe external ID of the user running the lab (if launched via API).
@lab.User.Organization.IdThe ID of the organization the user belongs to.
@lab.User.Organization.NameThe name of the organization the user belongs to.
@lab.TagThe tag associated with the lab instance (if specified when launched via API).
@lab.CtrlAltDeleteSends Ctrl+Alt+Delete to the currently active virtual machine.
@lab.VirtualMachine(VirtualMachineName).SelectLinkA link to select the VirtualMachineName virtual machine.
@lab.VirtualMachine(VirtualMachineName).UsernameUsername for signing into the VirtualMachineName virtual machine.
@lab.VirtualMachine(VirtualMachineName).PasswordPassword for signing into the VirtualMachineName virtual machine.
@lab.VirtualMachine(VirtualMachineName).ConsoleInline console for the VirtualMachineName virtual machine.
@lab.OpticalMedia(1).LoadLinkA link to load optical media on the active virtual machine.
@lab.FloppyMedia(1).LoadLinkA link to load floppy media on the active virtual machine.
@lab.Container(containerName).InstanceNameThe instance name for container (containerName).
@lab.Container(containerName).TerminalTerminal for (containerName)
@lab.Container(containerName).ExposedPort(portValue).AddressThe address for the exposed port (portValue) on container (containerName).
@lab.Container(containerName).ExposedPort(portValue).HostNameThe host name for the exposed port (portValue) on container (containerName).
@lab.Container(containerName).ExposedPort(portValue).HostPortThe host port for the exposed port (portValue) on container (containerName).
@lab.Container(alias).WebDisplayUrlThe web display URL for container (alias).
@lab.Container(alias).WebDisplayPathThe web display path (folder portion of the URL) for container (alias).
@lab.CloudSubscription.IdThe unique ID of the subscription the lab is launched against.
@lab.CloudSubscription.NameThe name of the subscription the lab is launched against.
@lab.CloudSubscription.TenantNameThe tenant name of the subscription the lab is launched against.
@lab.CloudResourceGroup(1).NameThe instance name of the ResourceGroup1 resource group.
@lab.CloudResourceGroup(StackName).NameThe instance name of the (StackName) resource group. This applies to AWS only
@lab.CloudResourceGroup(StackName).LocationThe cloud platform region/location where (StackName) resources are deployed.
@lab.CloudResourceTemplate(Template1).NameThe instance name of the VNET resource.
@lab.CloudResourceTemplate(Template1).DeploymentLinkA deployment link for the VNET resource.
@lab.CloudResourceTemplate(Template1).DeploymentUrlA deployment URL for the VNET resource (rendered as text, not a link).
@lab.CloudResourceTemplate(Template1).Parameters[complex-VNETName]The value sent for the complex-VNETName parameter when creating the VNET resource.
@lab.CloudPortalCredential(User1).UsernameThe username of the User1 cloud portal user account.
@lab.CloudPortalCredential(User1).PasswordThe password of the User1 cloud portal user account.
@lab.CloudCredential(PoolName).UsernameThe Username assigned from the PoolName credential pool.
@lab.CloudCredential(PoolName).PasswordThe Password assigned from the PoolName credential pool.
@lab.CloudCredential(PoolName).TenantNameThe TenantName assigned from the PoolName credential pool.
@lab.CloudCredential(PoolName).TenantPrefixThe TenantPrefix assigned from the PoolName credential pool.
@lab.CloudPortal.LinkA link to the cloud portal.
@lab.CloudPortal.UrlThe cloud portal URL (rendered as text, not a link).
@lab.CloudPortal.SignInLinkA cloud portal sign-in link.
@lab.CloudPortal.SignInUrlThe cloud portal sign-in URL (rendered as text, not a link).
@lab.CloudPortal.SignOutLinkA cloud portal sign-out link.
@lab.CloudPortal.SignOutUrlThe cloud portal sign-out URL (rendered as text, not a link).
@lab.TextBox(name)A text box that allows the user to set the value of a named variable. This variable value can then be displayed elsewhere using @lab.Variable(name).
@lab.MaskedTextBox(name)A text box with hidden contents used for passwords.
@lab.DropDownList(name)[val1,val2]A dropdown list that allows the user to set the value of a named variable. This variable value can then be displayed elsewhere using @lab.Variable(name).
@lab.KeyCombo(label)[key combo]Generates a button that sends a combination of key codes to the active VM.
@lab.EssayTextBox(name)[height]A larger essay style text box that can hold up to 5000 characters. Height in number of lines declared by [height] is optional. This variable value can then be displayed elsewhere using
@lab.Variable(name).
@lab.LanguageNameThe name of the language used in the instruction set. Example: English.
@lab.LanguageCodeThe language code of the language used in the instruction set. Example: en.
@lab.LanguageRegionCodeThe region code of the language used in the instruction set. Example: en-US.