0
0
GCPcloud~10 mins

Object versioning in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable versioning on a Google Cloud Storage bucket.

GCP
gsutil versioning set [1] gs://my-bucket
Drag options to blanks, or click blank then click option'
Aenabled
Bon
Cactivate
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'enabled' or 'true' instead of 'on'
Using 'activate' which is not a valid option
2fill in blank
medium

Complete the command to list all versions of objects in a bucket.

GCP
gsutil ls -[1] gs://my-bucket
Drag options to blanks, or click blank then click option'
Ar
Ba
Cl
Dv
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-a' which lists all buckets, not versions
Using '-r' which lists recursively but not versions
3fill in blank
hard

Fix the error in the command to disable versioning on a bucket.

GCP
gsutil versioning set [1] gs://my-bucket
Drag options to blanks, or click blank then click option'
Aoff
Bdisabled
Cdisable
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'disable' or 'disabled' instead of 'off'
Using 'false' which is invalid
4fill in blank
hard

Fill both blanks to create a lifecycle rule that deletes noncurrent object versions when there are 30 newer versions.

GCP
{
  "rule": {
    "action": {"type": "[1]"},
    "condition": {"numNewerVersions": [2]
  }
}
Drag options to blanks, or click blank then click option'
ADelete
B30
CArchive
D7
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Archive' instead of 'Delete' for action
Using 7 instead of 30 for the number of newer versions
5fill in blank
hard

Fill all three blanks to create a lifecycle rule that deletes object versions older than 365 days.

GCP
{
  "rule": {
    "action": {"type": "[1]"},
    "condition": {
      "age": [2],
      "isLive": [3]
    }
  }
}
Drag options to blanks, or click blank then click option'
ADelete
B365
Cfalse
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Setting isLive to true which targets current versions
Using age less than 365 days
Using 'Archive' instead of 'Delete' for action