gcs_version_bucket {googleCloudStorageR}R Documentation

Change or fetch bucket version status

Description

Turn bucket versioning on or off, check status (default), or list archived versions of objects in the bucket and view their generation numbers.

Usage

gcs_version_bucket(bucket, action = c("status", "enable", "disable", "list"))

Arguments

bucket

gcs bucket

action

"status", "enable", "disable", or "list"

Value

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

Examples


## Not run: 
  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")



## End(Not run)


[Package googleCloudStorageR version 0.7.0 Index]