Description Usage Arguments Details See Also Examples
Add a notification configuration that sends notifications for all supported events.
1 2 3 4 5 6 | gcs_create_pubsub(
topic,
project,
bucket = gcs_get_global_bucket(),
event_types = NULL
)
|
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 |
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.
https://cloud.google.com/storage/docs/reporting-changes
Other pubsub functions:
gcs_delete_pubsub()
,
gcs_get_service_email()
,
gcs_list_pubsub()
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.