| Author: | aegiap@gandi.net |
|---|---|
| Date: | 2019-04-03 |
| Copyright: | GPL-3 |
| Version: | 1.6 |
| Manual section: | 1 |
gandi [-v] [--version] gandi api|config|datacenters|deploy|domain|oper|paas|setup|vm ...
gandi is a command line client to manage, create and delete product for a specific account on Gandi.net platform.
Run gandi setup or create $HOME/.config/gandi/config.yaml file.
| -v | Enable or disable verbose mode, can be used multiple times to increase verbose level. |
| --version | Display version. |
- account info Display information about hosting account.
- api Display information about API used.
- certificate change-dcv Change the DCV for a pending certificate.
- certificate create Create a new certificate.
- certificate delete Revoke the certificate.
- certificate follow Follow the certificate operation run.
- certificate export Write the certificate to <output> or <fqdn>.
- certificate info Display information about a certificate.
- certificate list List certificates.
- certificate packages List certificate packages (deprecated).
- certificate plans List certificate plans (replace packages).
- certificate resend-dcv Resend the DCV mail for a pending certificate.
- certificate update Update a certificate CSR.
- certstore create Create an hosted certificate.
- certstore delete Delete an hosted certificate.
- certstore info Display information about an hosted certificate.
- certstore list List hosted certificates.
- config delete Delete a key/value pair from loaded configuration and save.
- config edit Open configuration file in preferred editor.
- config get Get value of a given key from loaded configuration.
- config list List content of loaded configuration.
- config set Set a key/value pair in loaded configuration and save.
- contact create Create a new contact in interactive mode.
- datacenters List available datacenters.
- deploy Deploy code on a remote vhost.
- disk attach Attach a disk to a vm.
- disk create Create a new disk.
- disk delete Delete a disk.
- disk detach Detach a disk from a vm.
- disk info Display information about a disk.
- disk list List disks.
- disk migrate Migrate a disk to another datacenter.
- disk rollback Rollback a disk from a snapshot.
- disk update Update a disk.
- dns create Create new record entry for a domain.
- dns delete Delete record entry for a domain.
- dns domain.list List domains manageable by REST API.
- dns keys create Create key for a domain.
- dns keys delete Delete a key for a domain.
- dns keys info Display information about a domain key.
- dns keys list List domain keys.
- dns keys recover Recover deleted key for a domain.
- dns list Display records for a domain.
- dns update Update record entry for a domain.
- dnssec create Create DNSSEC key.
- dnssec delete Delete DNSSEC key.
- dnssec list List DNSSEC keys.
- docker Manage docker instances.
- domain create Buy a domain.
- domain renew Renew a domain.
- domain info Display information about a domain.
- domain list List domains.
- forward create Create a domain mail forward.
- forward delete Delete a domain mail forward.
- forward list List mail forwards for a domain.
- forward update Update a domain mail forward.
- help Display help for a command.
- ip list List all ips.
- ip info Display information about an ip.
- ip create Create a new ip.
- ip attach Attach an ip to a vm.
- ip detach Detach an ip from a vm.
- ip delete Delete an ip.
- ip update Update an ip.
- mail create Create a mailbox.
- mail delete Delete a mailbox.
- mail info Display information about a mailbox.
- mail list List mailboxes created on a domain.
- mail purge Purge a mailbox.
- mail update Update a mailbox.
- oper info Display information about an operation.
- oper list List operations.
- paas attach Add an instance vhost's git remote to local git repository.
- paas clone Clone a remote vhost in a local git repository.
- paas console Open a console on a PaaS.
- paas create Create a new PaaS instance and initialize associated git repository.
- paas delete Delete a PaaS instance.
- paas info Display information about a PaaS instance.
- paas list List PaaS instances.
- paas restart Restart a PaaS instance.
- paas types List types PaaS instances.
- paas update Update a PaaS instance.
- record create Create new DNS zone record entry for a domain.
- record delete Delete a record entry for a domain.
- record list List DNS zone records for a domain.
- record update Update records entries for a domain.
- setup Initialize Gandi CLI configuration.
- snapshotprofile info Display information about a snapshot profile.
- snapshotprofile list List possible snapshot profiles.
- sshkey create Create a new SSH key.
- sshkey delete Delete SSH keys.
- sshkey info Display information about an SSH key.
- sshkey list List SSH keys.
- status Display current status from status.gandi.net.
- vhost create Create a new vhost.
- vhost delete Delete a vhost.
- vhost info Display information about a vhost.
- vhost list List vhosts.
- vhost update Update a vhost.
- vlan create Create a new vlan
- vlan delete Delete a vlan.
- vlan info Display information about a vlan.
- vlan list List vlans.
- vlan update Update a vlan
- vm console Open a console to virtual machine.
- vm create Create a new virtual machine.
- vm delete Delete a virtual machine.
- vm images List available system images for virtual machines.
- vm info Display information about a virtual machine.
- vm kernels List available kernels for virtual machines.
- vm list List virtual machines.
- vm migrate Migrate a virtual machine to another datacenter.
- vm reboot Reboot a virtual machine.
- vm ssh Spawn an SSH session to virtual machine.
- vm start Start a virtual machine.
- vm stop Stop a virtual machine.
- vm update Update a virtual machine.
- webacc add Add a backend or a vhost on a webaccelerator
- webacc create Create a webaccelerator
- webacc delete Delete a webaccelerator, a vhost or a backend
- webacc disable Disable a backend or a probe on a webaccelerator
- webacc enable Enable a backend or a prove on a webaccelerator
- webacc info Display information about a webaccelerator
- webacc list List webaccelerators
- webacc probe Manage a probe for a webaccelerator
- webacc update Update a webaccelerator
Details:
gandi account infodisplay information about the hosting account currently in use.gandi apidisplay information about the Gandi.net API.gandi certificate change-dcv resource: Change the domain validation process for a specific certificate request. Mandatory option is--dcv-method TEXTwhere the method could be email, dns, file or auto.gandi certificate create: Request the creation of a certificate. If a private key is present as--private-keyand not a CSR, the CSR will be generated. If no CSR or private key are present in the parameters, both are generated. Possible options are--csr TEXTand--private-key TEXTwhich could be the content of a certificate request and a private key or path to the files,--country TEXT,--state TEXT,--city TEXT,-organisation TEXT,--branch TEXTto specify new administrative information,--duration INTEGERhow many years of validity (up to 5 years),--package TEXTis the type of certificate as listed bygandi certificate package,--packageis now deprecated and should be replaced by--type,--max-altnameand--warranty,--typeis the certificate type in std (standard), bus (business) and pro,--max-altnameis the maximum number of altnames that this multi domain certificate will be able to have (by default it's calculated on the number of--altnamesparam you have, but you can override it with a bigger value),--warrantyis the value of the financial transaction under warranty (only appliable with Pro certificates),--altnames LISTis a list of all alternative names and--dcv-method TEXTwhere the method could be email, dns, file or auto.gandi certificate delete resourcedelete a certificate. Possible option is--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting. The operation can be done as background process using the option--background(or--bg). Note that a resource can be a cn entry or an integer id.gandi certificate follow resourcedisplay the current status of a certificate operation. Resource is an operation id.gandi certificate export resourcewrite the selected certificate to a file. Possible option is--output TEXTfor the path of the output file,--forceoverwrite any existing file,--intermediatewill retrieve the needed intermediate certificates. Note that a resource can be a cn entry or an integer id.gandi certificate info resourceshow detailed view of a specific certificate. Possible options are--id,--altnames,--csr,--certwhich show the integer id, the alternative names, the certificate request and the full certificate,--all-statusshow the certificate without regard for its status. Note that a resource can be a cn entry or an integer id.gandi certificate listPossible options are--id,--altnames,--csr,--certwhich show the integer id, the alternative names, the certificate request and the full certificate for each element of the list,--all-statusshow certificates without regards to their status,--status,--datesshow the status of the certificate and the creation and expiration dates,--limit INTEGERshow a subset of the list.gandi certificate packagesshow a full list of all available certificate types, this is deprecated, replace it bycertificate plans.gandi certificate plansshow a full list of all available certificate plans.gandi certificate resend-dcv resourcesend the validation email again (only for the 'email' DCV method). Note that a resource can be a cn entry or an integer id.gandi certificate update resourcemodify the options of a certificate. Possible options are--csr TEXT,--private-key TEXTcould be either the content of a certificate request and a private key or a path to the files,--country TEXT,--state TEXT,--city TEXT,--organisation TEXT,--branch TEXTto specify new administrative information,--altnames LISTto change all the alternative names (comma separated text without space),--dcv-method TEXTwith domain validation process method in email, dns, file, auto. Note that a resource can be a CN entry or an integer id.gandi certstore createcreate a new hosted certificate that will be associated to paas vhost or webaccs. Possible options are--private-key PK(or--pk) to give the private key and--certificate CERT(or--crt) to give the certificate (the certificate can also be given by its id with--certificate-id ID.gandi certstore delete resourcedelete all hosted certificate corresponding to the resource (/!if you give an FQDN, it will delete all hosted certificate that correspond). Possible option is--force(or-f) to continue deleting without asking.gandi certstore info resourceshow detailed view of hosted certificates corresponding to the resource.gandi certstore listlist all the hosted certificates for this account. Possible options are--idto show the id,--vhoststo show the associated vhosts,--fqdnsto show the fqdns contained in that certificate,--datesto show the create and expire dates and--limitto limit the number of elements in the list.gandi config key valueconfigure value in the configuration file. With no option, configuration setting is stored in the local directory, which makes it suitable for code repositories. Using the-gflag, the change is stored in the global configuration file.gandi contact createcreate a new contact in interactive mode.gandi datacenterslist all the datacenters of the Gandi.net platform. Possible option is--idto obtain the id of the datacenter. Most of the time you will be able to use the dc_code as parameter to the methods.gandi deploydeploy the remote git repository to the virtualhost setup on a Gandi Simple Hosting instance. Available options are--remoteto specify the git remote to extract deploy url from, and--branchto specify the branch to deploy. By default, the command uses thegandiremote to extract deploy url, and deploys themasterbranch. In case the supplied remote is not a valid Simple Hosting git remote, the command will fallback to guessing the Simple Hosting remote from git configuration of the branch to deploy. Requires a Simple Hosting git remote attached to the current directory.gandi disk createcreate a new virtual disk. Possible options are--name TEXTfor the label of the virtual disk (if not present, will be autogenerated),--size SIZE[M|G|T]for the new size of the disk,--datacenter FR-SD2|LU-BI1|FR-SD3for the geographical datacenter as listed bygandi datacenters,--vm TEXTto attach the newly create virtual disk to an existing virtual machine instance,--snapshotprofile 1|2|3|7to select a profile of snapshot to apply to the disk for keeping multiple version of data in a timeline.--source TEXTto create a disk from another existing source e.g a disk, snapshot or from a public image as listed bygandi vm images. The operation can be done as background process using the option--background(or--bg).gandi disk delete resourcedelete a virtual disk identified as resource. Possible option is--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting. The operation can be done as background process using the option--background(or--bg).gandi disk info resourceshow a detailed view of a specific virtual disk identified as resource.gandi disk listshow a list of virtual disk. Possible options to filter the list are :--only-dataand--only-snapshotwhich limit the list to regular disk and to snapshots,--attachedwhich limit the list to only attached disks,--detachedwhich limit the list to only detached disks,``--type`` add the type of the virtual disk,--idadd the integer id of each virtual disk,--vmshow the virtual machines by which the disk are used,--snapshotprofileshow the profile of data retention associated,--datacenterwhich filter the output according to disk datacenter location and--limit INTEGERshow only a limit amount of disks.gandi disk update resourcemodify the options of a virtual disk. Possible options are--kernel KERNELto setup or update disk kernel,--cmdline TEXTto change kernel cmdline,--name TEXTfor the label of the virtual disk,--size [+]SIZE[M|G|T]for the new size of the disk, if optional + prefix is provided, size value will be added to current disk size, a size suffix (M for megabytes up to T for terabytes) is optional, megabytes is the default if no suffix is present,--snapshotprofile TEXTto select a profile of snapshot to apply to the disk for keeping multiple version of data in a timeline,--delete-snapshotprofileto remove snapshot profile associated to this virtual disk. All these modification can be done as background process using the option--background(or--bg).gandi disk attach disk vmattach the given disk to the given vm, if the disk is currently attached, it will start by detaching it. Possible options:--forceto skip all questions about detaching and attaching;--position INTEGER(or-p) to specify the position at which the disk should be attached (0 for system disk);--read-only(or-r) to attach the disk in read-only mode. All these modification can be done as background process using the option--background(or--bg).gandi disk detach diskdetach the disk from the vm it is currently attached. Possible option is--forceto skip all questions about detaching. All these modification can be done as background process using the option--background(or--bg).gandi disk rollback resourcewill rollback a disk from a snapshot. This modification can be done as background process using the option--background(or--bg).gandi disk migrate resourcewill migrate a disk from current disk datacenter to a new one. If multiple datacenters are available, the user will be prompted to select one. This modification can be done as background process using the option--background(or--bg). Possible option is--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting.gandi disk snapshot resourcewill create a snapshot on the fly from a disk. Possible option is--name TEXTfor the name of the snapshot (if not present, will be autogenerated). The operation can be done as background process using the option--background(or--bg).gandi dnssec createwill create a DNSSEC key for the domaindomain.tld. It taks 4 parameters,fqdnwhich is the domain for which we want to create the key andflagwhich is the flag to use for creation (ZSK or KSK) andalgorithmfor the choice of the algorithm for the key and thepublic_keyin a base64 encoded form.gandi dnssec delete resourcewill remove a DNSSEC key identified by a resource identificator.gandi dnssec list domain.tldwill list DNSSEC keys for domaindomain.tld.gandi dockerwill setup ssh forwarding towards a gandi VM, remotely feeding a docker unix socket. This, for example, can be used for zeroconf access to scripted temporary build VMs. The--vmoption alters thedockervmconfiguration parameter and can be used to set the VM used for future docker connections.dockervmcan also be set locally for per-project vms (Seegandi config). NOTE: passing option parameters to docker require the usage of the POSIX argument parsing--separator. NOTE: a local docker client is required for this command to operate.gandi dns createwill creating a new DNS record entry for specific domaindomain.tld. It takes 4 parameters,FQDNwhich is the domain on which to add the record,NAMEwhich is the record relative name,TYPEwhich is the record type,VALUEwhich is the record value. Multiple values can be provided forVALUEparameter. Possible options are--ttl INTEGERto set record time to live value in seconds.gandi dns deletewill delete a DNS record entry. It takes 3 parameters,FQDNwhich is the domain on which to delete the record,NAMEwhich is the record relative name to delete,TYPEwhich is the record type to delete.NAMEandTYPEparameters are both optional to allow deletion of multiple record entries at once, you can either delete allNAMErecords or all records for aFQDN. Possible option is--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting.gandi dns domain.listwill list all domains registered in LiveDNS, and manageable by thegandi dnscommands through Gandi REST API.gandi dns list domain.tldwill display all records for domaindomain.tld. Possible parameters areNAMEto filter records by name,RRSET_TYPEto filter records by type. Possible options are--sort [name|ttl|type|values]to sort results (does not work with--textoption),--type [A|AAAA|CAA|CDS|CNAME|DNAME|DS|LOC|MX|NS|PTR|SPF|SRV|SSHFP|TLSA|TXT|WKS]to filter results by type (does not work with--textoption),--textto output result in text format.gandi dns update domain.tldwill update record entry for domaindomain.tld. It takes 4 parameters,FQDNwhich is the domain on which to add the record,NAMEwhich is the record relative name,TYPEwhich is the record type,VALUEwhich is the record value. Multiple values can be provided forVALUEparameter. Possible options are--ttl INTEGERto set record time to live value in seconds and--filewhich will ignore other parameters and overwrite current zone content with provided file content.gandi dns keys createwill create a new DNSKEY for a domain and have LiveDNS sign the zone for you. It takes 2 parameters,FQDNwhich is the domain for which we want to create the key andFLAGwhich is the flag value to use for creation.gandi dns keys deletewill delete a DNSKEY of a domain. It takes 2 parameters,FQDNwhich is the domain using the key,KEYwhich the key uuid, retrieved by usinggandi dns key listcommand. Possible option is--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting.gandi dns keys infowill display information about a DNSKEY, includingDSvalue for the key. It takes 2 parameters,FQDNwhich is the domain using the key,KEYwhich the key uuid, retrieved by usinggandi dns keys listcommand.gandi dns keys list domain.tldwill list all DNSKEY for domaindomain.tld.gandi dns keys recoverwill recover a deleted key for a domain. If you mistakenly delete a key and the DS if present at the registry, or still present in the caches, you can recover it. It takes 2 parameters,FQDNwhich is the domain using the key,KEYwhich the key uuid, retrieved by usinggandi dns keys listcommand.gandi domain create domain.tldhelps register a domain. Options are--domain domain.tldfor the domain you want to get (/!this option is deprecated and will be removed upon next release),--duration INTEGER RANGEfor the registration period,--owner TEXT,--admin TEXT,--tech TEXT,--bill TEXTfor the four contacts to pass to the creation process,--nameserver TEXTfor adding custom nameservers,--extra_parameter XTRANAME XTRAVALUEfor adding extra parameters (see http://doc.rpc.gandi.net/domain/reference.html#DomainExtraParameters). All these modification can be done as background process using the option--background(or--bg).gandi domain renew domain.tldwill renew a domain. Available option is--duration INTEGER RANGEfor the registration period. All these modification can be done as background process using the option--background(or--bg).gandi domain info domain.tldshow information about the specific domaindomain.tld: owner, admin, billing and technical contacts, fully qualified domain name, nameservers, associated zone, associated tags and more.gandi domain listshow all the domains in the Gandi account. Possible option is--limit INTEGERwhich will show a subset of the list.gandi forward create address@domain.tldcreate a new mail forward. Mandatory option is-d, --destination TEXTto define a forward destination for this domain mail, this option can be used multiple times.gandi forward delete address@domain.tlddelete mail forwardaddress@domain.tld. Possible option is--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting.gandi forward list domain.tldshow all existing mail forwards for specific domaindomain.tld. Possible option to filter the list:--limit INTEGERshow only a limited amount of mail forwards.gandi forward update address@domain.tldupdate mail forwardaddress@domain.tld. Possible options are-a, --dest-add TEXTto add a forward destination for this mail forward, can be used multiple times,-d, --dest-del TEXTto delete a forward destination for this mail forward, can be used multiple times.gandi help commanddisplay help for command, if command is a namespace it will display list of available commands for this namespace.gandi ip listshow all the ip created in Gandi hosting for the account. Possible options to filter the list are :--attachedto only show attached ips,--detachedto only show detached ips,--vlanto filter by vlan name, and--type(being inpublicorprivate) to only show public or private ips. Possible options to get more details are :--versionto get the ip version,--reverseto get the ip reverse, and--vmto get the attached vm if any,--idto add the integer id of each ip.gandi ip infoshow information about specific ip.gandi ip createcreate new ip. Possible options are--datacenter FR-SD2|LU-BI1|FR-SD3for the geographical datacenter as listed bygandi datacentersif--attachis specified this option is useless,--ip-version 4|6for version of created IP,--bandwidth INTEGERto set network bandwidth in bits/s on first network interface created,--vlanto specify which private vlan should be used,--ipto specify an ip in the vlan,--attachto attach this new ip to a vm, and--background(or--bg) to process in background.gandi ip attachattach an ip to a vm. It takes two parameters,ipthe wanted ip, andvmthe vm to attach,ipthe ip to attach. If the ip is already attached, it will be detached from the previous vm before being attached to the given one. Possible options are--forceto bypass the validation question; useful in non-interactive mode when scripting, and--background(or--bg) to process in background.gandi ip detachdetach an ip from a vm. It only takes one parameter, theip. Possible options are--forceto bypass the validation question; useful in non-interactive mode when scripting, and--background(or--bg) to process in background.gandi ip deletedelete one or more ips. If the ip is still attached, it will detach it before deleting it. Possible options are--forceto bypass the validation question; useful in non-interactive mode when scripting, and--background(or--bg) to process in background.gandi ip updateupdate an ip. The only available parameter is now--reverse, to specify a reverse (PTR record) name for this ip address.gandi mail create login@domain.tldcreate a new mailbox. Possible options are-q, --quota INTEGERto define a quota for this mailbox,-f, --fallback TEXTto define a fallback addresse,-a, --alias TEXTto add an alias for this mailbox, this option can be used multiple times,-p, --password TEXTto provide a password for this mailbox.gandi mail delete login@domain.tlddelete mailboxlogin@domain.tld. Possible option is--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting.gandi mail info login@domain.tldshow information about mailboxlogin@domain.tld.gandi mail list domain.tldshow all existing mailboxes for specific domaindomain.tld.gandi mail purge login@domain.tldpurge mailboxlogin@domain.tld. Possible options are-a, --aliasto purge all aliases on this mailbox,--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting. The operation can be done as background process using the option--background(or--bg).gandi mail update login@domain.tldupdate mailboxlogin@domain.tld. Possible options are-p, --passwordwill prompt for a new password for this mailbox,-q, --quota INTEGERto define a quota for this mailbox,-f, --fallback TEXTto define a fallback addresse,-a, --alias-add TEXTto add an alias for this mailbox, can be used multiple times,-d, --alias-del TEXTto delete an alias for this mailbox, can be used multiple times.gandi oper info idshow information about the operationid.gandi oper listshow all the running operation on your product at Gandi (for example Simple Hosting, domain, hosting). Possible option is--limit INTEGERwhich list only a subset of the full list of running operations (default is 100),--stepto filter on specific step possible values are: BILL, WAIT, RUN, ERROR (default to BILL, WAIT, RUN).gandi paas attach instanceAdd the Simple Hosting instance's vhost git remote to a local git repository. By default, the git remote's name is gandi; it can be overridden by using the--remote TEXToption.gandi paas clone instanceclone all files of a remote virtual host, for a given Simple Hosting instance, to a local git repository. Override the default vhost by passing--vhost TEXT. The destination directory to clone to can be overridden by using the--directoryoption. By default the origin name is set to gandi, it can be overridden with the--origin TEXToption.gandi paas console resourceopen a console to the SimpleHosting. Note that resource could be a full qualified domain name or an integer id.gandi paas create: Create a Simple Hosting instance. Mandatory option is--password TEXTfor the password of the instance. Possible option are--name TEXTfor the name of the instance (if not present, will be autogenerated),--size s|s+|m|x|xl|xxlfor the size (amount of RAM and processes),--type TYPEfor the type as listed by thegandi paas typescommand,--quantity INTEGERfor the additional disk space,--duration TEXTfor the number of month suffixed with 'm',--datacenter FR-SD2|LU-BI1|FR-SD3for the geographical datacenter as listed bygandi datacenters,--vhosts TEXTfor a list of virtual hosts to link to this instance,--sslto activate SSL on all vhosts,--pkto give the private key used to generate the certificate if it's linked to the same account in certificate section, and--poll-certto wait for certificate generation in case you want to get one with Gandi (certificate create can take some time to achieve),--snapshotprofile INTEGERfor the snapshot profile for the disk of the instance,--delete-snapshotprofileto remove the snapshotprofile on the instance ,--sshkey TEXTto specify a name of a SSH key. The operation can be done as background process using the option--background(or--bg).gandi paas delete resourcedelete a Simple Hosting instance. Possible option is--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting. The operation can be done as background process using the option--background(or--bg).gandi paas info resourceshow details about a specific Simple Hosting instance. Possible option is--statin order to get statistic of the cached pages (it's based on the last 24 hours).gandi paas listshow all the Simple Hosting instances. Possible options are--state TEXTfor filtering the output by a specific state,--idwhich display the integer identificator,--vhostswhich show all the virtual hosts associated with each instances,--typewhich display the type of Simple Hosting and--limit INTEGERwhich show only a subset of the full Simple Hosting list (default is 100).gandi paas restart resource: Restart a Simple Hosting instance. Possible option is--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting. The operation can be done as background process using the option--background(or--bg).gandi paas typesshow all the Simple Hosting type available. For example: phpmysql which provides PHP and MySQL or pythonmongodb which provides Python and MongoDB.gandi paas updates resourcemodify the options of a Simple Hosting. Possible options are--name TEXTwhich renames a instance,--size s|s+|m|x|xl|xxlto change the size of the instance,--quantity INTEGERto add disk space,--passwordto change the password of the instance,--sshkey TEXTto specify a name of a SSH key,--upgradeflag to upgrade the instance to the latest system image,--console TEXTto enable or disable the console,--snapshotprofile TEXTto set the snapshot profile for the disk of the instance,--reset-mysql-password TEXTto reset the root password of MySQLd running on the instance. All these modification can be done as background process using the option--background(or--bg).gandi record create domain.tldwill create new DNS zone record entry for specific domaindomain.tldin a new zone version and activate it. Mandatory options are--zone-id INTEGERto specify a zone id to use, if not provided default zone will be used,--name TEXTto set record relative name, may contains leading wildcard, use @ for empty name,--type A|AAAA|CNAME|MX|NS|TXT|WKS|SRV|LOC|SPFto set record type,--value TEXTto set record value, may contains up to 1024 ascii characters. Possible options are--ttl INTEGERto set record time to live value.gandi record delete domain.tldwill delete DNS zone record entries for a specific domaindomain.tldfrom a zone, and use a new zone version which will be activated after deletion. Mandatory options are--zone-id INTEGERto specify a zone id to use, if not provided default zone will be used,--name TEXTto specify relative name of record to delete, may contains leading wildcard, use @ for empty name,--type A|AAAA|CNAME|MX|NS|TXT|WKS|SRV|LOC|SPFto specify record type,--value TEXTfor record to delete value, may contains up to 1024 ascii characters.gandi record list domain.tldshow the list of DNS zone records for specific domaindomain.tld. Possible options are--zone-id INTEGERto specify a zone id to use, if not provided default zone will be used,--limit INTEGERshow a subset of the list.gandi record update domain.tldwill update DNS zone record entries for a specific domaindomain.tld. Mandatory options are--zone-id INTEGERto specify a zone id to use, if not provided default zone will be used. You can update an individual record using--recordand--new-recordparameters which both use the same format 'name TTL IN TYPE [A, AAAA, MX, TXT, SPF] value'. Or you can use a plaintext file using--file FILENAMEparameter to update all records of a DNS zone. Note that if you want to update an individual record and fail to provide all fields for--recordparameter, it will try to retrieve the record entry using only the name, but if there are several records entries with the same name, only the first one will be updated.gandi setupinitialize the configuration for the tool.gandi snapshotprofile info resourcedetail the information about a profile : frequency of snapshot and retention period.gandi snapshotprofile listshow the list of all profile for virtual disk snapshot. Possible options are--only-paasand--only-vmto filter the output and show only the subset of profile for the Simple Hosting or the Gandi Hosting.gandi sshkey create --name labeladd a SSH key identified bylabelwhich could be used for authentication. Possible option are--value TEXTwith the content of the SSH public key or--filename FILENAMEwith the path to a file containing the SSH public key.gandi sshkey delete resourceremove a SSH key. Resource can be a name or the specific id.gandi sshkey info resourceshow details of an SSH key: name and fingeprint in MD5 hash. Possible option are--idwhich also show the id of theSSH key and--valuewhich show the content of the SSH key.gandi sshkey listshow all the SSH keys registered. Possible option are--idwhich add numeric identificator and--limit INTEGERwhich show only a subset of the SSH keys.gandi statusshows the current status for all services as seen on status.gandi.net. Possible option is to provide a service name to the command to retrieve only the status of this service.gandi vhost create virtualhost.domain.tldadds a virtual host. Use the mandatory option--paas TEXTto specify the Simple Hosting instance on which it will create the virtual host,--alter-zonewill update the domain zone,--sslto activate SSL on that host,--pkto give the private key used to generate the certificate if it's linked to the same account in certificate section, and--poll-certto wait for certificate generation in case you want to get one with Gandi (certificate create can take some time to achieve). Creation can be done as background process using the option--background(or--bg) it will have no effet on the certificate creation process.gandi vhost delete host.domain.tlddelete a virtual host after asking for user validation. Possible option is--forceto bypass the validation question; useful in non-interactive mode when scripting. Deletion can be done as background process using the option--background(or--bg).gandi vhost info host.domain.tldshow details about a specific virtual host. Possible option is--idswhich show the integer identificator.gandi vhost listshow all the virtual host defined in Simple Hosting. Possible option are--nameswhich add the name of the Simple Hosting instance on which the virtual host is setup,--idswhich show the integer identificator and--limit INTEGERwhich show a subset of the full list of virtual host.gandi vhost update host.domain.tld: Activate SSL on this host. Possible options are--sslto activate SSL on that host,--pkto give the private key used to generate the certificate if it's linked to the same account in certificate section, and--poll-certto wait for certificate generation in case you want to get one with Gandi (certificate create can take some time to achieve).gandi vlan createadd a new vlan. Mandatory options are--name TEXTfor the label of the vlan,--datacenter FR-SD2|US-BA1|LU-SD1for the geographical datacenter as listed bygandi datacenters. Possible options are--subnetto set a subnet and--gatewayto set the gateway. The operation can be done as background process using the option--background(or--bg).gandi vlan delete resourcedelete a vlan after asking for user validation. Possible option is--forceto bypass the validation question; useful in non-interactive mode when scripting. Deletion can be done as background process using the option--background(or--bg).gandi vlan info resourceshow details of a specific vlan.gandi vlan listshow all the vlan created in Gandi hosting for the account. Possible options are--idto obtain the id of each vlan,--datacenter FR-SD2|LU-BI1|FR-SD3which filter by geograhical datacenter.gandi vlan updateupdate a vlan. Mandatory options are--name TEXTfor the label of the vlan.gandi vm console resourceopen a console on the virtual machine and give you a shell access.gandi vm createcreate a new virtual machine. Possible options are--hostname TEXTfor the hostname of the machine (if not present, will be autogenerated),--datacenter FR-SD2|US-BA1|LU-SD1for the geographical datacenter as listed bygandi datacenters,--memory INTEGERfor quantity of memory,--cores INTEGERfor number of virtual CPU,--ip-version 4|6for version of created IP, it can be omitted if--vlanis given,--vlanto set the vm on the specified vlan and--ipto set the ip in that vlan,--bandwidth INTEGERto set network bandwidth in bits/s on first network interface created,--login TEXTto define login to created on virtual machine,--image TEXTfor the disk image to be used to boot the virtual machine as listed bygandi vm images,--sshkey TEXTto specify name of a SSH key,--passwordwill prompt for a password to set for the created login,--run TEXTto specify shell command that will run at the first boot of virtual machine. The operation can be done as background process using the option--background(or--bg). You can specify the virtual machine system disk size with the--sizeparameter (unit MiB). If not run in background, this command will spawn an ssh session to the created virtual machine. You can use the--scriptoption to upload, then run a script on the VM after creation. Be sure to provide an executable file as an argument to the--scriptoption. The--script-args TEXToptional argument allows you to complete script invocation with arguments. You can open a ssh session to the virtual machine after creation by using--sshparameter. The--gen-passwordoptional argument will generate a random password to be set for the root account, and the created login if needed, the password will be displayed during the creation.gandi vm delete resourcedestroy a virtual machine, its main disk and its first virtual network interface. This operation can be done as background process using the option--background(or--bg). Another possible parameter is--forceto bypass the validation question; useful in non-interactive mode when scripting.gandi vm images patternlist all the available images of system whose name contains the pattern. Possible option is--datacenter FR-SD2|LU-BI1|FR-SD3which filter by geograhical datacenter.gandi vm kernel patternlist all the available kernels whos name contains the pattern. Possible options are--flavor TEXTto filter given kernel flavors,--vm TEXTto only show kernels available for a given vm,--datacenter FR-SD2|LU-BI1|FR-SD3to specify a given datacenter.gandi vm listshow all the virtual machine created in Gandi hosting for the account. Possible options are--statewhich filter the output according to define virtual machine state,--datacenterwhich filter the output according to virtual machine datacenter,--idto obtain the id of each virtual machine,--limit INTEGERwhich list only a subset of the full list of virtual machines.gandi vm migrate resourcewill migrate a virtual machine from current datacenter to a new one. This modification can be done as background process using the option--background(or--bg). Possible option is--finalizeto finalize migration when migration process requires this action,--force(or-f) to bypass the validation question; useful in non-interactive mode when scripting.gandi vm info resourceshow details of a specific operation. Use--statin order to get general statistics of the VM's resources.gandi vm ssh resource [args]open a ssh connection on the virtual machine and give you a shell access. The-i TEXToption (or--identity TEXT) refers to a local ssh key, as used in the ssh command. The-l TEXT,--login TEXToruser@hostform specifies remote username in the same way. Using--wipe-key, previous entry for that host is discarded from the known_hosts file first. Using--waitparameter, the command will wait for sshd to spin up on virtual machine before trying to open a ssh connection. You can add arguments (be sure to prefix options with the POSIX argument parsing--separator) and commands to ssh, as used in the ssh command.gandi vm start resource: Start a virtual machine (a resource can either be a hostname as defined in the creation process or the id of the virtual machine). This operation can be done as background process using the option--background(or--bg).gandi vm stop resource, same parameter as start but instead stops the virtual machine. Obviously.gandi vm reboot resource, same parameter as start but instead reboots a virtual machine.gandi vm update resource: Change the quantity of memory (using--memory INTEGER), the number of virtual CPU (using--cores INTEGER), enable the virtual console which gets a shell to the virtual machine even without network interfaces on the virtual machine (using--console) or change the root password (using--password). All these modification can be done as background process using the option--background(or--bg). NOTE: Because of the cost of page table setup, a maximum memory limit has to be given for some kernels, limiting dynamic updates. You cannot online resize a VM memory crossing this value, and the--rebootoption allows you to acknowledge the required reboot.gandi webacc add resourceadd a backend or a vhost on a webaccelerator. Possible options are--vhost TEXTto add the fully qualified domain name (FQDN like host.domain.tld) to the webaccelerator, can be used multiple times,--backend TEXTto specify an IP address, can be used multiple times, using format ip[:port],--port INTEGERto set a default port value for backend parameters if not specified in backend format,--sslto activate ssl for vhost,--private-key TEXTto provide the private key used to generate the ssl certificate,--zone-alterto alter and activate zone file if Gandi DNS are used for the domain,--poll-certwill wait for the certificate creation to be finished, be warned that this can take a long time.gandi webacc create NAMEcreate a new webaccelerator. Mandatory options are--datacenter FR-SD2|LU-BI1|FR-SD3for the geographical datacenter as listed bygandi datacenterswhere the webaccelerator will be created. Possible options are--backend TEXTto specify an IP address, can be used multiple times, using format ip[:port],--port INTEGERto set a default port value for backend parameters if not specified in backend format,--vhost TEXTto add the fully qualified domain name (FQDN like host.domain.tld) to the webaccelerator, can be used multiple times,--sslto activate ssl for vhost,--private-key TEXTto provide the private key used to generate the ssl certificate,--zone-alterto alter and activate zone file if Gandi DNS are used for the domain,--poll-certwill wait for the certificate creation to be finished, be warned that this can take a long time,--ssl-enableto activate SSL support on the webaccelerator,--algorithm [client-ip, round-robin]to choose the loadbalancer algorithm defaulting toclient-ip.gandi webacc deletedelete a webaccelerator, a vhost or a backend. Possible options are--webacc TEXTto specify the webaccelerator name to be deleted,--backend TEXTto specify an IP address to be deleted, can be used multiple times, using format ip[:port],--port INTEGERto set a default port value for backend parameters if not specified in backend format,--vhost TEXTto remove the fully qualified domain name (FQDN like host.domain.tld) from the webaccelerator, can be used multiple times.gandi webacc disabledisable a backend or a probe on a webaccelerator. Possible options are--backend TEXTto specify an IP address to be disabled, can be used multiple times, using format ip[:port],--port INTEGERto set a default port value for backend parameters if not specified in backend format,--probeto disable probe for the webaccelerator, requires the webaccelerator name to be passed to the command.gandi webacc enableenable a backend or a probe on a webaccelerator. Possible options are--backend TEXTto specify an IP address to be enabled, can be used multiple times, using format ip[:port],--port INTEGERto set a default port value for backend parameters if not specified in backend format,--probeto enable probe for the webaccelerator, requires the webaccelerator name to be passed to the command.gandi webacc info resourcedisplay information about a webaccelerator. Possible options are--format [json, pretty-json]to specify output format to be used.gandi webacc listshow all the webaccelerators. Possible options are--limit INTEGERwhich shows only a subset of the webaccelerators list,--format [json, pretty-json]to specify output format to be used.gandi webacc probe resourcemanage a probe for a webaccelerator. Possible options are--enableto enable the probe on the webaccelerator,--disableto disable the probe on the webaccelerator,--host TEXTto set the host value for testing the probe,--testto test the probe on the webaccelerator,--interval INTEGERto set interval for the probe to be checked,--url TEXTto set the probe url in the virtual host,--window INTEGERto set total number of probes to consider health decision,--threshold INTEGERto set number of probes to consider in the window,--timeout INTEGERto set the timeout in seconds,--http-method [GET, POST, PUT, DELETE, OPTIONS]to set HTTP method used for the probe check,--http-response INTEGERto set HTTP response code expected by the probegandi webacc update resourceupdate a webaccelerator. Possible options are--name TEXTto change the name of the webaccelerator,--algorithm [client-ip, round-robin]to change the loadbalancer algorithm,--ssl-enableto activate SSL support on the webaccelerator,--ssl-disableto deactivate SSL support on the webaccelerator.
- API_ENV
Switch between environment: the production API and the OT&E one.
Example:
API_ENV=production gandi domain list
- API_HOST
- Specify a HTTP URL to connect and to send the API commands.
- API_KEY
- Specify an API key for the chosen environment. This option is useful when you work with multiple account.
- APIREST_KEY
- Specify a REST API key for the chosen environment. This option is useful when you work with multiple account.
- GANDI_CONFIG
- Override the global configuration file.
- $HOME/.config/gandi/config.yaml
- Configuration file, overridden by the GANDI_CONFIG environment variable as described above.
Originaly created by Dejan Filipovic for Gandi S.A.S. Copyright (c) 2014-2018 - Gandi S.A.S
- Alexandre Solleiro <alexandre.solleiro@gandi.net>
- Ben Finney <ben+gandi@benfinney.id.au>
- Dejan Filipovic <sayoun@gandi.net>
- Guillaume Gauvrit <guillaume.gauvrit@gandi.net>
- Nicolas Chipaux <aegiap@gandi.net>
- Olivier Roussy <olivier@gandi.net>
This is Gandi-cli version 1.6.
See CHANGES.rst in the project directory or in the documentation directory of your system. For Debian, the CHANGES file will be in /usr/share/doc/gandicli/.
Add missing Gandi product like virtual network interface or private vlan.
Please report any bugs or issue on https://github.com/Gandi/gandi.cli by opening an issue using this form https://github.com/Gandi/gandi.cli/issues/new. You can send patches by email to feedback@gandi.net.