0
0
GCPcloud~10 mins

Storage transfer service 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 specify the source bucket in a Storage Transfer Service job.

GCP
transferJob = {
  "transferSpec": {
    "gcsDataSource": {
      "bucketName": "[1]"
    },
    "gcsDataSink": {
      "bucketName": "destination-bucket"
    }
  }
}
Drag options to blanks, or click blank then click option'
Adestination-bucket-name
Bsource-bucket-name
Ctransfer-job-name
Dproject-id
Attempts:
3 left
💡 Hint
Common Mistakes
Using the destination bucket name as the source.
Using project ID instead of bucket name.
2fill in blank
medium

Complete the code to set the schedule for a daily Storage Transfer Service job.

GCP
transferJob = {
  "schedule": {
    "scheduleStartDate": {
      "year": 2024,
      "month": 6,
      "day": 1
    },
    "startTimeOfDay": {
      "hours": [1],
      "minutes": 0,
      "seconds": 0
    }
  }
}
Drag options to blanks, or click blank then click option'
A24
B-1
C2
D25
Attempts:
3 left
💡 Hint
Common Mistakes
Using 24 or higher for hours, which is invalid.
Using negative numbers for hours.
3fill in blank
hard

Fix the error in the transfer job configuration to enable object conditions.

GCP
transferJob = {
  "transferSpec": {
    "objectConditions": {
      "minTimeElapsedSinceLastModification": "[1]"
    },
    "gcsDataSource": {
      "bucketName": "source-bucket"
    },
    "gcsDataSink": {
      "bucketName": "destination-bucket"
    }
  }
}
Drag options to blanks, or click blank then click option'
A3600s
B3600
C1 hour
D3600 seconds
Attempts:
3 left
💡 Hint
Common Mistakes
Using plain numbers without units.
Using words like '1 hour' instead of duration format.
4fill in blank
hard

Fill both blanks to configure a Storage Transfer Service job with a filter and a schedule.

GCP
transferJob = {
  "transferSpec": {
    "gcsDataSource": {
      "bucketName": "source-bucket"
    },
    "objectConditions": {
      "includePrefixes": ["[1]"]
    }
  },
  "schedule": {
    "scheduleStartDate": {
      "year": 2024,
      "month": 6,
      "day": 10
    },
    "startTimeOfDay": {
      "hours": [2],
      "minutes": 30,
      "seconds": 0
    }
  }
}
Drag options to blanks, or click blank then click option'
Aimages/
Bvideos/
C3
D15
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid hour values like 24.
Using prefixes without trailing slash if filtering folders.
5fill in blank
hard

Fill all three blanks to create a Storage Transfer Service job with a description, schedule, and transfer spec.

GCP
transferJob = {
  "description": "[1]",
  "schedule": {
    "scheduleStartDate": {
      "year": 2024,
      "month": 7,
      "day": 1
    },
    "startTimeOfDay": {
      "hours": [2],
      "minutes": 0,
      "seconds": 0
    }
  },
  "transferSpec": {
    "gcsDataSource": {
      "bucketName": "[3]"
    },
    "gcsDataSink": {
      "bucketName": "backup-bucket"
    }
  }
}
Drag options to blanks, or click blank then click option'
ADaily backup job
B4
Cprimary-data-bucket
DWeekly backup job
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid hour values.
Mixing up source and destination bucket names.