gcs_create_lifecycle {googleCloudStorageR} | R Documentation |
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
For multiple conditions, pass this object in as a list. |
See Also
Lifecycle documentation https://cloud.google.com/storage/docs/lifecycle
Other bucket functions:
gcs_create_bucket()
,
gcs_delete_bucket()
,
gcs_get_bucket()
,
gcs_get_global_bucket()
,
gcs_global_bucket()
,
gcs_list_buckets()
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)
[Package googleCloudStorageR version 0.7.0 Index]