gcloud: gcloud command line utility interface

gcloudR Documentation

gcloud command line utility interface

Description

These functions invoke the gcloud command line utility. See gsutil for details on how gcloud is located.

gcloud_exists() tests whether the gcloud() command can be found on this system. See 'Details' section of gsutil for where the application is searched.

gcloud_account(): report the current gcloud account via gcloud config get-value account.

gcloud_project(): report the current gcloud project via gcloud config get-value project.

gcloud_help(): queries gcloud for help for a command or sub-comand via gcloud help ....

gcloud_cmd() allows arbitrary gcloud command execution via gcloud .... Use pre-defined functions in preference to this.

Usage

gcloud_exists()

gcloud_account(account = NULL)

gcloud_project(project = NULL)

gcloud_help(...)

gcloud_cmd(cmd, ...)

Arguments

account

character(1) Google account (e.g., user@gmail.com) to use for authentication.

project

character(1) billing project name.

...

Additional arguments appended to gcloud commands.

cmd

character(1) representing a command used to evaluate gcloud cmd ....

Value

gcloud_exists() returns TRUE when the gcloud application can be found, FALSE otherwise.

gcloud_account() returns a character(1) vector containing the active gcloud account, typically a gmail email address.

gcloud_project() returns a character(1) vector containing the active gcloud project.

gcloud_help() returns an unquoted character() vector representing the text of the help manual page returned by gcloud help ....

gcloud_cmd() returns a character() vector representing the text of the output of gcloud cmd ...

Examples

gcloud_exists()

if (gcloud_exists())
    gcloud_account()

if (gcloud_exists())
    gcloud_help()


Bioconductor/AnVIL documentation built on June 25, 2022, 9:42 p.m.