Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gcs_create_pubsub

Create a pub/sub notification for a bucket


Description

Add a notification configuration that sends notifications for all supported events.

Usage

gcs_create_pubsub(
  topic,
  project,
  bucket = gcs_get_global_bucket(),
  event_types = NULL
)

Arguments

topic

The pub/sub topic name

project

The project-id that has the pub/sub topic

bucket

The bucket for notifications

event_types

What events to activate, leave at default for all

Details

Cloud Pub/Sub notifications allow you to track changes to your Cloud Storage objects. As a minimum you wil need: the Cloud Pub/Sub API activated for the project; sufficient permissions on the bucket you wish to monitor; sufficient permissions on the project to receive notifications; an existing pub/sub topic; have given your service account at least pubsub.publisher permission.

See Also

Examples

## Not run: 

project <- "myproject"
bucket <- "mybucket"

# get the email to give access
gcs_get_service_email(project)

# once email has access, create a new pub/sub topic for your bucket
gcs_create_pubsub("gcs_r", project, bucket)


## End(Not run)

googleCloudStorageR

Interface with Google Cloud Storage API

v0.6.0
MIT + file LICENSE
Authors
Mark Edmondson [aut, cre] (<https://orcid.org/0000-0002-8434-3881>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.