Azion CLI clone
Azion CLI command that copies an existing Application, with its rules, into a new application, with every flag, its type, and its default.
The Azion CLI clone command copies a resource under a new name. Its one subcommand, application, creates an Application with the configuration of an existing one, its Rules Engine rules included. The options every command accepts, such as --format, --out, and -y, are on Global options.
Usage
azion clone takes the type of the resource to copy as its subcommand:
The command takes no flags of its own. -h or --help prints the help of the command. The only subcommand is application.
Application
azion clone application creates an application from the configuration of the application whose ID you pass:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--application-id | — | int | — | ID of the application to copy. |
--name | — | string | — | Required. Name of the new application. Without it, the command asks for the name. |
The command prints the name of the new application, not its ID. To find the ID, run azion list application. Your account needs permission to clone applications.
Examples
Each example shows the command and the output it prints.
Clone an application
This command copies the application with ID 1234567892 into a new application named my-site-clone:
The command confirms the copy:
Find the ID of the clone
This command lists the applications whose name contains my-site:
The clone appears with an ID of its own, next to the application it was copied from:
Check the rules of the clone
This command lists the rules of the clone in the request phase:
The clone holds the rules of the application it was copied from: