Difference between revisions of "GCS lifecycle"

From wikieduonline
Jump to navigation Jump to search
m (Thomas moved page GCP lifecycle to GCS lifecycle)
 
Line 22: Line 22:
 
]
 
]
 
}
 
}
 +
}
 +
</pre>
 +
 +
<pre>
 +
{
 +
  "lifecycle": {
 +
    "rule": [
 +
      {
 +
        "action": {
 +
          "type": "Delete"
 +
        },
 +
        "condition": {
 +
          "age": 40,
 +
          "isLive": true
 +
        }
 +
      }
 +
    ]
 +
  }
 
}
 
}
 
</pre>
 
</pre>

Latest revision as of 06:44, 2 August 2022

https://cloud.google.com/storage/docs/lifecycle


Official examples: https://cloud.google.com/storage/docs/lifecycle-configurations#gsutil_1

{
"lifecycle": {
  "rule": [
  {
    "action": {"type": "Delete"},
    "condition": {
      "numNewerVersions": 2,
      "isLive": false
    }
  },
  {
    "action": {"type": "Delete"},
    "condition": {
      "daysSinceNoncurrentTime": 7
    }
  }
]
}
}
{
  "lifecycle": {
    "rule": [
      {
        "action": {
          "type": "Delete"
        },
        "condition": {
          "age": 40,
          "isLive": true
        }
      }
    ]
  }
}

Related[edit]

See also[edit]

Advertising: