Information for: DEVELOPERS   PARTNERS

Drush command reference for Cloud Platform API v1

The commands described on this page are compatible only with Cloud Platform API version 1 (v1) which will reach end-of-life on July 1, 2020. Acquia recommends upgrading your API calls to use Cloud Platform API v2 authentication to avoid any interruption of service. For a list of v2 equivalents, see Migrating from Cloud API v1 to v2.

Using Cloud Platform Drush commands, you can use all of the features of Cloud Platform API v1 on the command line or from shell scripts, using the Drush command-line tool. This reference describes only the Cloud Platform Drush commands for using the Cloud Platform API v1. For information about how to get started with the Cloud Platform Drush integration, see Developing with the Cloud Platform API.

Cloud Platform API commands

For a list of the Cloud Platform API v2 equivalents of these commands, see Migrating from Cloud API v1 to v2.

Type Command Description
API credentials ac-api-login Store Cloud Platform API credentials and configuration information.
Code deployment ac-code-deploy Deploy code from one site environment to another.
Code deployment ac-code-path-deploy Deploy a specific branch or tag in an environment.
Database commands ac-database-add Add a database.
Database commands ac-database-copy Copy a database from one site environment to another.
Database commands ac-database-delete Delete a database.
Database commands ac-database-info Show information about a site database.
Database commands ac-database-instance-backup Create a backup of a database instance.
Database commands ac-database-instance-backup-delete Delete a database instance backup.
Database commands ac-database-instance-backup-download Download a database instance backup of a site environment.
Database commands ac-database-instance-backup-info Show information about a site environment’s database instance backup.
Database commands ac-database-instance-backup-list List a site environment’s database instance backups.
Database commands ac-database-instance-backup-restore Restore a database instance from a backup.
Database commands ac-database-instance-info Show information about a site environment’s database instance.
Database commands ac-database-instance-list List a site environment’s database instances.
Database commands ac-database-list List a website’s databases.
Domains ac-domain-add Add a domain name to an environment.
Domains ac-domain-delete Delete a domain name from an environment.
Domains ac-domain-info Show information about a site domain.
Domains ac-domain-list List a website’s domains.
Domains ac-domain-move Move one or more domains from one site environment to another.
Domains ac-domain-purge Purge a domain from the Varnish® cache.
Environments ac-environment-info Show information about a site environment.
Environments ac-environment-install Install a Drupal distribution from a preselected list, URL, or Drush makefile.
Environments ac-environment-list List a website’s environments.
Environments ac-environment-livedev Enable or disable live development on a site environment.
Files ac-files-copy Copy files from one site environment to another.
Servers ac-server-info Show information about a server.
Servers ac-server-list List servers for a site and environment.
Sites ac-site-info Show information about a site.
SSH keys ac-sshkey-add Add an SSH key to a site.
SSH Keys ac-sshkey-delete Delete an SSH key from a site.
SSH Keys ac-sshkey-info Show information about a site SSH key.
SSH Keys ac-sshkey-list List a site’s SSH keys.
Tasks ac-task-info Show information about a site task.
Tasks ac-task-list List a website’s tasks.
API aliases acquia-update Retrieves and updates Drush aliases for all accessible Cloud Platform sites.

Common options

All Cloud Platform API commands have the following options:

Command Description
--cainfo= Path to a file containing the SSL certificates needed to verify the ac-api-endpoint.
--caller= Cloud Platform API caller name. Default is the current username.
--endpoint= Cloud Platform API endpoint URL
--format= Format to output the object. Use “var_export” for var_export, and “json” for JSON. If not provided, the output is printed in a human-readable format.
--email= Cloud Platform API email address. See Cloud Platform API v1 authentication
--key= Cloud Platform API key. See Cloud Platform API v1 authentication
--acapi-conf-path= By default, the ac-api-login command stores default option values for future Cloud Platform API commands in $HOME/.drush/.acapi.drushrc.php. Use this option to specify a different file location.

Command detail

API credentials

ac-api-login

Store Cloud Platform API credentials and configuration information.

This command stores default option values for future Cloud Platform API commands in $HOME/.drush/.acapi.drushrc.php. This is most useful for stashing your API email and key so you do not have to enter it every time. You can change the file location where this is stored using the acapi-conf-path option.

Arguments

  • None

Options

  • Common options
  • --reset - Discard any existing stored values from a previous call. Without this option, new values will be merged with existing values.

Code deployment

ac-code-deploy

Deploy code from one site environment to the target environment.

Arguments

  • target - The target environment.

Options

ac-code-path-deploy

Deploy a specific branch or tag in an environment.

Arguments

  • path - The branch or tag to deploy.

Options

Database commands

ac-database-add

Add a database.

Arguments

  • db - The name of the database.

Options

ac-database-copy

Copy a database from one site environment to the target environment.

Arguments

  • db - The database.
  • target - The target environment.

Options

ac-database-delete

Delete a database. By default, creates a backup of each instance of the database before deleting it.

Arguments

  • db - The database.

Options

  • Common options
  • --no-backup - Do not make a final backup of each instance of this database before deleting it.

ac-database-info

Show information about a site database.

Arguments

  • db - Database name.

Options

ac-database-instance-backup

Create a backup of a database instance.

Arguments

  • db - The database.

Options

ac-database-instance-backup-delete

Delete a database instance backup.

Arguments

  • db - The database.
  • backupid - The backup ID.

Options

ac-database-instance-backup-download

Download a database instance backup of a site environment.

Arguments

  • db - The database.
  • backupid - The backup ID.

Options

  • Common options
  • --result-file= - Save to a file; specify the full path in which to store the backup. If no path is provided, the backup is sent the standard output.

ac-database-instance-backup-info

Show information about a site environment’s database instance backup.

Arguments

  • db - Database name.
  • backup - The backup ID.

Options

ac-database-instance-backup-list

List a site environment’s database instance backups.

Arguments

  • db - Database name.

Options

ac-database-instance-backup-restore

Restore a database instance from a backup.

Arguments

  • db - The database.
  • backupid - The backup ID.

Options

ac-database-instance-info

Show information about a site environment’s database instance.

Arguments

  • db - The database name.

Options

ac-database-instance-list

List a site environment’s database instances.

Arguments

  • None

Options

ac-database-list

List a website’s databases.

Arguments

  • None

Options

Domains

ac-domain-add

Add a domain name to an environment.

Arguments

  • domain - The domain name.

Options

ac-domain-delete

Delete a domain name from an environment.

Arguments

  • domain - The domain name.

Options

ac-domain-info

Show information about a site domain.

Arguments

  • domain - The domain name.

Options

ac-domain-list

List a website’s domains. If a site has an Elastic Load Balancer (ELB), also returns the name of the ELB.

Arguments

  • None

Options

ac-domain-move

Move one or more domains from one site environment to the target environment.

Arguments

  • target - The target environment to which you are moving the domains.
  • domains - A comma-separated list of the domains to move, or * to move all domains in the source environment.

Options

ac-domain-purge

Purge a domain from the Varnish cache.

Arguments

  • domain - The domain name.

Options

Environments

ac-environment-info

Show information about a site environment.

Arguments

  • None

Options

ac-environment-install

Install a Drupal distribution into an environment from a URL or a Drush Make file.

Arguments

  • type - Type of distro source. One of distro_url or make_url.
  • source - Depending on type, one of:
    • distro_url - A publicly accessible URL to any Drupal distribution in standard format.
    • make_url - A publicly accessible URL to a Drush Make file.

Options

ac-environment-list

List a website’s environments.

Arguments

  • None

Options

ac-environment-livedev

Enable or disable live development on a site environment.

Arguments

  • action - The action to take: enable or disable live development on the environment.

Options

Files

ac-files-copy

Copy files from one site environment to the target environment.

Arguments

  • target - The target environment.

Options

Servers

ac-server-info

Show information about a server.

Arguments

  • server - The server name.

Options

ac-server-list

List servers for a site and environment.

Arguments

  • None

Options

Sites

ac-site-info

Show information about a website.

Arguments

  • None

Options

SSH keys

ac-sshkey-add

Add an SSH key to a website.

Arguments

  • ssh_pub_key - File containing the SSH public key.
  • nickname - The SSH key nickname.

Options

ac-sshkey-delete

Delete an SSH key from a site.

Arguments

  • sshkeyid - The ID of the SSH key to delete.

Options

ac-sshkey-info

Show information about a website SSH key.

Arguments

  • sshkeyid - The ID of the SSH key.

Options

ac-sshkey-list

List a website’s SSH keys.

Arguments

  • None

Options

Tasks

ac-task-info

Show information about a site task.

Arguments

  • task - The task ID.

Options

ac-task-list

List a website’s tasks. By default, returns only the last 7 days of tasks and no more than 50 tasks. You can modify this default behavior by using the limit or days arguments in the command.

Arguments

  • days - Return tasks from the past n days. Default is 7.
  • limit - Maximum number of tasks to return. Default is 50.

Options

API aliases

acquia-update

Retrieves and updates Drush aliases for all accessible Cloud Platform sites.

Arguments

  • None

Options