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

gcs_create_lifecycle

Create a lifecycle condition


Description

Use this to set rules for how long objects last in a bucket in gcs_create_bucket

Usage

gcs_create_lifecycle(
  age = NULL,
  createdBefore = NULL,
  numNewerVersions = NULL,
  isLive = NULL
)

Arguments

age

Age in days before objects are deleted

createdBefore

Deletes all objects before this date

numNewerVersions

Deletes all newer versions of this object

isLive

If TRUE deletes all live objects, if FALSE deletes all archived versions

numNewerVersions and isLive works only for buckets with object versioning

For multiple conditions, pass this object in as a list.

See Also

Examples

## Not run: 
  lifecycle <- gcs_create_lifecycle(age = 30)
  
  gcs_create_bucket("your-bucket-lifecycle",
                     projectId = "your-project",
                     location = "EUROPE-NORTH1",
                     storageClass = "REGIONAL",
                     lifecycle = list(lifecycle))



## 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.