gcloud: Interact with the gcloud command line utility

Description Usage Arguments Value Examples

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

1
2
3
4
5
6
7
8
9

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

1
2
3
4
5
6
7

AnVIL documentation built on Nov. 8, 2020, 4:57 p.m.