Variables and environments
Variables give values to a request when it runs. Write ${name} to use one. See Variables and expressions.
Environments and request variables work in request tabs, which are included in the trial and in Professional and Enterprise.
Scopes and precedence
If more than one source defines a name, the last source in this list wins:
- Global environment: for all collections.
- Collection environment: for one collection.
- CLI input: a
--inputvalue, when the CLI runs the request. - Request variables: in the request file.
- Results of operations that already ran.
Dynomate uses only the selected environments and their enabled variables. See Precedence.
Configure environments
A request tab shows the Global and Collection environment selectors in the title bar.
- In the title bar, select Global or Collection.
- Select Configure Environments....
- Enter a name in New Environment Name.
- Select +.
- Select Add Variable.
- Enter the variable name and value.
- Select Save Changes.
- Select Close.
- Select the environment in the title bar.
- Select None to use no environment from that scope.
- Clear Enabled to keep a variable but not use it.
- Bulk Edit takes one
NAME=VALUEon each line. You can also import a.envfile. - The copy button on a row copies the
${name}reference. - Mark as secret masks a value. See Storage and secrets.
- A change of environment after a run makes the results out of date.
Request variables
- Select Request settings at the bottom of the rail.
- Under Variables, enter a name.
- Select Add field.
- Select the type of the value.
- Enter the value.
- Select Save.
A request variable can have any type. Dynomate saves it in the [variables] table:
[variables]accountId = "account#42"pageSize = "1"
Dynomate does not expand templates in [variables], for example "${other}".
Use a variable
A template can be a full value or part of a string:
${accountId} arn:aws:dynamodb:${region}:123456789012:table/Orders-${stage} - In text fields, type the template. In Table ARN and AWS profile, type
${to see suggestions. - In number, Yes/No, list, and map fields, select Use expression first. See Values and expressions.
- In a DynamoDB expression, set a
:valuealias to the template. See Placeholders and aliases.
If no selected source defines a name, Dynomate shows an error before the run.
Casts
Environment values are text. To use one as a number or a boolean, cast it:
${cast(pageSize, 'integer')} For the supported types, see Casts.
Storage and secrets
- Request variables: in the
.dnmlfile. - Collection environments: in
environments/<name>.jsonin the collection folder. - Global environments: in the local app data.
A collection environment file is a JSON list:
[ { "name": "accountId", "value": "account#42", "enabled": true, "isSecret": false }]
Dynomate shows secret values as [REDACTED] in results, messages, endpoint summaries, and the confirmation dialog. The file still contains the plain value.