Skip to content

Instantly share code, notes, and snippets.

@sekky0905
Last active May 29, 2017 07:34
Show Gist options
  • Save sekky0905/128ca468af5d0dd34bda3782ed88f7bc to your computer and use it in GitHub Desktop.
Save sekky0905/128ca468af5d0dd34bda3782ed88f7bc to your computer and use it in GitHub Desktop.
GCSライフサイクル機能を使ってファイルを定期削除する ref: http://qiita.com/Sekky0905/items/65c60da94fe945a454fa
{
"lifecycle": {
"rule": [
{
"action": {
"type": "Delete"
},
"condition": {
"age": 365,
"isLive": true
}
}
]
}
}
gsutil lifecycle set [jsonのファイル名] gs://[設定対象のGCSのバケット名]
gsutil lifecycle get gs://[設定対象のGCSのバケット名]
{"rule": [{"action": {"type": "Delete"}, "condition": {"age": 365, "isLive": true}}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment