Difference between revisions of "GCS lifecycle"

From wikieduonline
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
https://cloud.google.com/storage/docs/lifecycle
 
https://cloud.google.com/storage/docs/lifecycle
 +
 +
 +
Official examples: https://cloud.google.com/storage/docs/lifecycle-configurations#gsutil_1
 +
<pre>
 +
{
 +
"lifecycle": {
 +
  "rule": [
 +
  {
 +
    "action": {"type": "Delete"},
 +
    "condition": {
 +
      "numNewerVersions": 2,
 +
      "isLive": false
 +
    }
 +
  },
 +
  {
 +
    "action": {"type": "Delete"},
 +
    "condition": {
 +
      "daysSinceNoncurrentTime": 7
 +
    }
 +
  }
 +
]
 +
}
 +
}
 +
</pre>
 +
 +
<pre>
 +
{
 +
  "lifecycle": {
 +
    "rule": [
 +
      {
 +
        "action": {
 +
          "type": "Delete"
 +
        },
 +
        "condition": {
 +
          "age": 40,
 +
          "isLive": true
 +
        }
 +
      }
 +
    ]
 +
  }
 +
}
 +
</pre>
  
 
== Related ==
 
== Related ==
Line 5: Line 47:
  
 
== See also ==
 
== See also ==
* {{GCP}}
+
* {{GCS}}
  
 
[[Category:GCP]]
 
[[Category:GCP]]

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: