Complete the code to specify the action type in a lifecycle rule.
{
"rule": {
"action": {
"type": "[1]"
},
"condition": {
"age": 30
}
}
}The Delete action is used to remove objects after the condition is met.
Complete the code to set the condition for object age in days.
{
"rule": {
"action": {
"type": "Delete"
},
"condition": {
"[1]": 60
}
}
}The age condition specifies the minimum age in days before the action applies.
Fix the error in the lifecycle rule by completing the missing field for storage class transition.
{
"rule": {
"action": {
"type": "SetStorageClass",
"storageClass": "[1]"
},
"condition": {
"age": 90
}
}
}The COLDLINE storage class is used for infrequently accessed data and is a common transition target.
Fill both blanks to create a lifecycle rule that deletes noncurrent versions older than 30 days.
{
"rule": {
"action": {
"type": "[1]"
},
"condition": {
"age": 30,
"[2]": false
}
}
}The action Delete removes objects. The condition isLive set to false targets noncurrent versions.
Fill all three blanks to create a lifecycle rule that transitions objects with prefix 'logs/' to NEARLINE storage after 45 days.
{
"rule": {
"action": {
"type": "[1]",
"storageClass": "[2]"
},
"condition": {
"age": [3],
"matchesPrefix": ["logs/"]
}
}
}The action SetStorageClass changes storage class. NEARLINE is a cheaper storage class for infrequent access. The age condition is set to 45 days.