credentials_gce: Get a token for Google Compute Engine

Description Usage Arguments Value See Also Examples

View source: R/credentials_gce.R

Description

Uses the metadata service available on GCE VMs to fetch an access token.

Usage

1
credentials_gce(scopes = NULL, service_account = "default", ...)

Arguments

scopes

A character vector of scopes to request. Pick from those listed at https://developers.google.com/identity/protocols/googlescopes.

For certain token flows, the "https://www.googleapis.com/auth/userinfo.email" scope is unconditionally included. This grants permission to retrieve the email address associated with a token; gargle uses this to index cached OAuth tokens. This grants no permission to view or send email. It is considered a low value scope and does not appear on the consent screen.

service_account

Name of the GCE service account to use.

...

Additional arguments passed to all credential functions.

Value

A GceToken() or NULL.

See Also

https://cloud.google.com/compute/docs/storing-retrieving-metadata

Other credential functions: credentials_app_default, credentials_byo_oauth2, credentials_service_account, credentials_user_oauth2, token_fetch

Examples

1
2
3
4
## Not run: 
credentials_gce()

## End(Not run)

r-pkgs/gargle documentation built on Aug. 20, 2019, 8:42 a.m.