Convert API Gateway configuration using CLI
Learn how to use the YAML configuration CLI to convert API Gateway configuration to YAML format.
2 minute read
The yamles
CLI tool is available in the apigateway/posix/bin
directory. It is installed with a standard server-side install or with client tooling, when the Package & Deploy Tools only option is selected during the installation.
You can run the yamles
script with --help
to see all the available options:
./yamles --help
The following lists the CLI options and their descriptions:
fed2yaml
: Convert an XML federated configuration to a YAML configuration.frag2yaml
: Convert an XML configuration fragment to a YAML configuration fragment.validate
: Validate a YAML configuration.export
: Export part of a YAML configuration to create another YAML configuration.import
: Import a YAML configuration or a YAML configuration fragment into another YAML configuration.encrypt
: Encrypt an unencrypted YAML configuration, a string, or a file. For more information.change-passphrase
: Change the passphrase of a YAML configuration.upgrade
: Upgrade a YAML configuration.To get help with a specific option, run:
./yamles <option> --help
All script parameters have shorthand parameter names. Check the relevant help for more information.
All script options generate a trace file in the current directory by default. You can use --tracedir
to write trace to another directory, or --tracelevel
to change the level of tracing.
The yamles
script returns the following exit codes:
0
for success2
for invalid parameters1
for all other failuresFor Windows systems, the CLI tool is located in the apigateway\Win32\bin
directory. You must replace all ./yamles ...
with yamles.bat ...
.
Also, all options with URLs must be set as follows:
--source federated:file:/C:\Users\...\configs.xml
or --source federated:file:/C:/Users/.../configs.xml
--source yaml:file:/C:\Users\...
or --source yaml:file:/C:/Users/...
Learn how to use the YAML configuration CLI to convert API Gateway configuration to YAML format.
Learn how to use the YAML configuration CLI to validate a YAML configuration.
Learn how to use the YAML configuration CLI to import and export YAML configuration.
Learn how to use the YAML configuration CLI to encrypt, decrypt, and re-encrypt a YAML configuration.
Learn how to use the YAML configuration CLI to upgrade a YAML configuration.