def main(project_id, job_name):
"""Review the transfer operations associated with a transfer job."""
credentials = GoogleCredentials.get_application_default()
storagetransfer = discovery.build(
'storagetransfer', 'v1', credentials=credentials)
filterString = (
'{{"project_id": "{project_id}", '
'"job_names": ["{job_name}"]}}'
).format(project_id=project_id, job_name=job_name)
result = storagetransfer.transferOperations().list(
name="transferOperations",
filter=filterString).execute()
print('Result of transferOperations/list: {}'.format(
json.dumps(result, indent=4, sort_keys=True)))
# [END main]
评论列表
文章目录