if (FALSE) {
# all roles
projectId <- gar_set_client(
json = Sys.getenv("GAR_CLIENT_JSON"),
scopes = "https://www.googleapis.com/auth/cloud-platform")
gar_service_get_roles(projectId)
# roles for one accountId
gar_service_get_roles(
projectId,
accountId = "1080525199262@cloudbuild.gserviceaccount.com")
}
if (FALSE) {
library(googleAuthR)
gar_set_client(scopes = "https://www.googleapis.com/auth/cloud-platform")
gar_auth()
gar_service_create("test12345678", "my-project")
gar_service_get("test12345678@my-project.iam.gserviceaccount.com",
projectId = "my-project")
gar_service_grant_roles("test12345678@my-project.iam.gserviceaccount.com",
role = "roles/editor",
projectId = "my-project")
gar_service_key("test12345678", "my-project", "my-auth.json")
gar_service_list("my-project")
gar_service_key_list("test12345678", "my-project")
}
Run the code above in your browser using DataLab