gcs_cloud_auth {GCSConnection} | R Documentation |
Authenticate with Google Cloud Storage. You can download the JSON credential file from Google Gloud Platform. The package will search for the credentials from evironment variables 'GOOGLE_APPLICATION_CREDENTIALS' or 'GCS_AUTH_FILE' when it is onloaded. To redo the credentials initialization process after the package is loaded. Simply call the 'gcs_cloud_auth' function with no argument.
gcs_cloud_auth(json_file, gcloud = FALSE, email = NULL) gcs_get_cloud_auth() ## S3 method for class 'auth' print(x, ...)
json_file |
character(1). A JSON file that can be used to authenticate with Google Cloud Storage. If the value is 'NULL', the current credential will be erased. |
gcloud |
logical. Whether use gcloud to authenticate with Google Cloud Storage. If the value is 'TRUE', the parameter 'json_file' will be ignored. |
email |
Character(1) or NULL. For gcloud only. Account to get the access token for. If not specified, the current active account in gcloud will be used. |
x |
Used for the S3 'print' function only |
... |
Used for the S3 'print' function only |
When the package is loaded, it first searches the credential file from the enviroment variable 'GOOGLE_APPLICATION_CREDENTIALS'. If the credentials is not found, the environment variable 'GCS_AUTH_FILE' will be used intead. If both variables are not specified. Users need to specify the credentials by calling 'gcs_cloud_auth' function.
gcs_cloud_auth : No return value
gcs_get_cloud_auth : An S3 'auth' class containing credentials information
## Default authentication process gcs_cloud_auth() gcs_get_cloud_auth()