Azion CLI workload-deployment
Azion CLI commands that create, list, and describe workload deployments, with every flag, its type, and its default.
The Azion CLI workload-deployment commands create, list, and describe the deployment of a workload in Workloads. A deployment names the application, the firewall, and the custom page set that serve the traffic of a workload, and a workload holds one deployment. The CLI has no command that updates or deletes a deployment. To change one, refer to Workload settings. The options every command accepts, such as --format, --out, and -y, are on Global options.
Create
azion create workload-deployment creates a deployment in a workload with the settings you pass:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--active | — | string | — | Turns the deployment on (true) or off (false). |
--application-id | — | int | — | ID of the application that serves the traffic of the workload. |
--current | — | string | — | Takes true or false. With true, this deployment is the one the workload runs. |
--custom-page | — | string | — | ID of the custom page set that replaces error responses for the workload. |
--file | — | string | — | Path to a JSON file with the attributes of the deployment. Use - to read the JSON from standard input. |
--firewall-id | — | int | — | ID of the firewall that runs its rules on requests before the application. |
--name | — | string | — | Name of the deployment. |
--strategy-type | — | string | — | Type of the deployment strategy, such as default. |
--workload-id | — | int | — | ID of the workload that holds the deployment. |
This command creates a deployment named my-deployment in the workload with ID 1234567900. The deployment sends the traffic to the application with ID 1234567890 and uses the custom page set with ID 123:
The command prints the ID of the deployment:
List
azion list workload-deployment lists the deployments of one workload, 50 to a page:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--details | — | — | — | Adds a column with the ID of the application and a column with the ID of the firewall to the ID and CURRENT columns. |
--filter | — | string | — | Name to filter the list by. |
--order-by | — | string | — | Field to sort the list by. |
--page | — | int | 1 | Number of the page to return. |
--page-size | — | int | 50 | Number of deployments on each page. |
--workload-id | — | int | — | Required. ID of the workload whose deployments the command lists. Without it, the command asks ? Enter the Workload ID to list its Deployments. |
This command lists the deployments of the workload with ID 1234567900, with the application and firewall columns:
The command prints one row per deployment. A deployment without a firewall shows 0 in the firewall column:
Describe
azion describe workload-deployment prints the settings of one deployment:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--deployment-id | — | int | — | ID of the deployment to describe. |
--workload-id | — | int | — | ID of the workload that holds the deployment. |
Use a JSON file
azion create workload-deployment reads the attributes of the deployment from a JSON file with --file.
This file creates an active deployment named my-deployment-file that sends the traffic to the application with ID 1234567890. The command reads name, active, current, and strategy from it:
The file holds no workload ID, so pass --workload-id on the command line with the file:
The command prints the ID of the deployment:
A workload holds one deployment. Passed for a workload that already holds a deployment, the same file fails with this error: