CLI Documentation

The wcloud CLI is a command-line interface for interacting with the WaysCloud API. It allows you to manage various resources in your WaysCloud account, such as projects, virtual machines, disks, networks, and more.

Installation

To install the wcloud CLI, you need to have Python and pip installed on your system. Then, you can install the wcloud CLI using the following command:

pip install wcloud-cli

Authentication

Before you can use the wcloud CLI, you need to authenticate with your WaysCloud account. You can do this by running the wcloud login command. This will open a browser window where you can log in with your WaysCloud credentials.

Once you have logged in, the wcloud CLI will store an access token on your local machine. This token will be used to authenticate subsequent API requests.

Commands

Projects

wcloud projects list: List all projects.
wcloud projects get <project_uuid>: Get details about a project.
wcloud projects create <name> <description>: Create a new project.
wcloud projects update <project_uuid> <name> <description>: Update a project.
wcloud projects delete <project_uuid>: Delete a project.

Virtual Machines

wcloud vm list: List all virtual machines in a project.
wcloud vm create <name> <offering_uuid> <plan_uuid> <image_uuid> <subnet_uuid> [ssh_public_key]: Create a new virtual machine.
wcloud vm delete <resource_uuid>: Delete a virtual machine.
wcloud vm start <resource_uuid>: Start a virtual machine.
wcloud vm stop <resource_uuid>: Stop a virtual machine.
wcloud vm reboot <resource_uuid>: Reboot a virtual machine.
wcloud vm console <resource_uuid>: Get console URL for a virtual machine.

Disks

wcloud disk list: List all disks in a project.
wcloud disk create <name> <size> <offering_uuid> <plan_uuid> <project_uuid>: Create a new disk.
wcloud disk delete <resource_uuid>: Delete a disk.
wcloud disk attach <disk_resource_uuid> <vm_resource_uuid>: Attach a disk to a virtual machine.
wcloud disk detach <disk_resource_uuid>: Detach a disk from a virtual machine.

Networks

wcloud network list: List all networks in a project.
wcloud network create <name> <offering_uuid> <plan_uuid> <project_uuid>: Create a new network.
wcloud network delete <resource_uuid>: Delete a network.

Security Groups

wcloud security-group list: List all security groups in a project.
wcloud security-group create <name> <project_uuid>: Create a new security group.
wcloud security-group delete <resource_uuid>: Delete a security group.
wcloud security-group rule add <security_group_resource_uuid> <protocol> <port> <cidr>: Add a rule to a security group.
wcloud security-group rule remove <rule_resource_uuid>: Remove a rule from a security group.

DNS

wcloud dns list: List all DNS zones in a project.
wcloud dns create <name> <email> <offering_uuid> <plan_uuid> <project_uuid>: Create a new DNS zone.
wcloud dns delete <resource_uuid>: Delete a DNS zone.
wcloud dns record list <dns_zone_resource_uuid>: List all DNS records in a zone.
wcloud dns record create <dns_zone_resource_uuid> <name> <type> <data> [ttl]: Create a new DNS record.
wcloud dns record update <record_resource_uuid> <name> <type> <data> [ttl]: Update a DNS record.
wcloud dns record delete <record_resource_uuid>: Delete a DNS record.

Kubernetes

wcloud kubernetes list: List all Kubernetes clusters in a project.
wcloud kubernetes create <name> <offering_uuid> <plan_uuid> <project_uuid> [attributes]: Create a new Kubernetes cluster.
wcloud kubernetes delete <resource_uuid>: Delete a Kubernetes cluster.
wcloud kubernetes kubeconfig <resource_uuid>: Get kubeconfig for a Kubernetes cluster.

Usage

To use the wcloud CLI, simply run the wcloud command followed by the command you want to execute. For example, to list all projects, you would run the following command:

wcloud projects list

wcloud projects list To get help with a specific command, you can use the --help flag. For example:

wcloud projects list --help