Turn bucket versioning on or off, check status (default), or list archived versions of objects in the bucket and view their generation numbers.
gcs_version_bucket(bucket, action = c("status", "enable", "disable", "list"))
bucket | gcs bucket |
---|---|
action | "status", "enable", "disable", or "list" |
If action="list"
a versioned_objects dataframe
If action="status"
a boolean on if versioning is TRUE or FALSE
If action="enable" or "disable"
TRUE if operation is successful
if (FALSE) { buck <- gcs_get_global_bucket() gcs_version_bucket(buck, action = "disable") gcs_version_bucket(buck, action = "status") # Versioning is NOT ENABLED for "your-bucket" gcs_version_bucket(buck, action = "enable") # TRUE gcs_version_bucket(buck, action = "status") # Versioning is ENABLED for "your-bucket" gcs_version_bucket(buck, action = "list") }