我们需要用谷歌dlp扫描文件。然而,谷歌dlp扫描仅在gcs中受支持。(https://cloud.google.com/blog/products/identity-security/take-charge-of-your-data-scan-for-sensitive-data-in-just-a-few-clicks)所以我需要将已知文件ID的文件导出到GCS,并在那里应用谷歌dlp扫描。这里有人知道如何在没有手动干预的情况下将文件从谷歌驱动器导出到GCS吗?
这可能会达到的效果
https://colab.research.google.com/drive/1Xc8E8mKC4MBvQ6Sw6akd_X5Z1cmHSNca
from google.colab import drive
drive.mount('/content/drive')
from google.colab import auth
auth.authenticate_user()
project_id = 'your-project-id'
!gcloud config set project {project_id}
!gsutil ls
bucket_name = 'medium_demo_bucket_190710'
!gsutil -m cp -r /content/drive/My Drive/Data/* gs://{bucket_name}/