Account$current() is the typical way of creating an Account
If the current request signer (CLI user or execution context) lacks permissions to fetch some information, the corresponding operations will act as if the information does not exist. Update operations will usually produce errors.
See also
Other Accounts APIs:
Account$current
Methods
Method print()
Print a human-readable representation of this account.
Method load()
(Re-)populate this account instance's cache.
Future calls to most getters will return immediately without making a network request.
Always makes a network request.
Method get_display_name()
Get the display name of this account.
This is an opaque string that can contain any valid Unicode data.
Display names are not unique and must never be used as identifiers.
Use id instead.
For users, this is the user's full name as reported by the authentication provider.
For teams, this is the team display name.
Arguments
load_if_missingLogical.
IfTRUE,load()the display name if not in cache. IfFALSE, returnNULLif not in cache.
Method list_registry_projects()
List Registry projects owned by this workspace.
Arguments
load_if_missingLogical.
IfTRUE,load()the project list if not in cache. IfFALSE, returnNULLif not in cache.
Returns
List of projects owned by this workspace.
Examples
Account$new("1")
#> <Account id=1>
## ------------------------------------------------
## Method `Account$print`
## ------------------------------------------------
if (FALSE) {
acc <- Account$current()
acc$print()
}
## ------------------------------------------------
## Method `Account$load`
## ------------------------------------------------
if (FALSE) {
acc <- Account$current()
acc$print()
acc$load()
acc$print()
}
## ------------------------------------------------
## Method `Account$get_display_name`
## ------------------------------------------------
if (FALSE) {
acc <- Account$current()
acc$get_display_name()
}
## ------------------------------------------------
## Method `Account$list_registry_projects`
## ------------------------------------------------
if (FALSE) {
acc <- Account$current()
acc$list_registry_projects()
}