Last active
May 29, 2017 07:34
-
-
Save sekky0905/128ca468af5d0dd34bda3782ed88f7bc to your computer and use it in GitHub Desktop.
GCSライフサイクル機能を使ってファイルを定期削除する ref: http://qiita.com/Sekky0905/items/65c60da94fe945a454fa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"lifecycle": { | |
"rule": [ | |
{ | |
"action": { | |
"type": "Delete" | |
}, | |
"condition": { | |
"age": 365, | |
"isLive": true | |
} | |
} | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsutil lifecycle set [jsonのファイル名] gs://[設定対象のGCSのバケット名] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsutil lifecycle get gs://[設定対象のGCSのバケット名] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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