Complete the code to specify the source bucket in a Storage Transfer Service job.
transferJob = {
"transferSpec": {
"gcsDataSource": {
"bucketName": "[1]"
},
"gcsDataSink": {
"bucketName": "destination-bucket"
}
}
}The source bucket name must be specified under gcsDataSource.bucketName to tell the Storage Transfer Service where to copy data from.
Complete the code to set the schedule for a daily Storage Transfer Service job.
transferJob = {
"schedule": {
"scheduleStartDate": {
"year": 2024,
"month": 6,
"day": 1
},
"startTimeOfDay": {
"hours": [1],
"minutes": 0,
"seconds": 0
}
}
}The hours field must be between 0 and 23. Setting it to 2 means the job starts at 2 AM.
Fix the error in the transfer job configuration to enable object conditions.
transferJob = {
"transferSpec": {
"objectConditions": {
"minTimeElapsedSinceLastModification": "[1]"
},
"gcsDataSource": {
"bucketName": "source-bucket"
},
"gcsDataSink": {
"bucketName": "destination-bucket"
}
}
}The time duration must be specified as a string with a suffix like 's' for seconds. '3600s' means 3600 seconds (1 hour).
Fill both blanks to configure a Storage Transfer Service job with a filter and a schedule.
transferJob = {
"transferSpec": {
"gcsDataSource": {
"bucketName": "source-bucket"
},
"objectConditions": {
"includePrefixes": ["[1]"]
}
},
"schedule": {
"scheduleStartDate": {
"year": 2024,
"month": 6,
"day": 10
},
"startTimeOfDay": {
"hours": [2],
"minutes": 30,
"seconds": 0
}
}
}The includePrefixes filters objects starting with 'images/'. The schedule starts at 3:30 AM.
Fill all three blanks to create a Storage Transfer Service job with a description, schedule, and transfer spec.
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"
}
}
}The description is 'Daily backup job'. The job starts at 4 AM. The source bucket is 'primary-data-bucket'.