
我正在嘗試建立和管理轉移工作對於谷歌儲存傳輸透過 Google 部署管理員提供服務。目的是每天將物件從一個 Cloud Storage 儲存桶複製到另一個 Cloud Storage 儲存桶。
由於我找不到任何範例程式碼,只有 API,所以我試圖弄清楚如何描述所需的資源。
---
resources:
- type: storagetransfers.v1.transferJobs
name: transferJobs/{{ properties['jobName'] }}
properties:
status: ENABLED
projectId: {{ properties['projectId'] }}
schedule:
scheduleStartDate:
day: 1
month: 12
year: 2020
startTimeOfDay:
hours: 1
minutes: 0
transferSpec:
gcsDataSource:
bucketName: {{ properties['sourceBucket'] }}
gcsDataSink:
bucketName: {{ properties['targetBucket'] }}
transferOptions:
overwriteObjectsAlreadyExistingInSink: TRUE
當我嘗試透過部署管理員應用此資源時,出現錯誤:
錯誤:(gcloud.deployment-manager.deployments.update)操作錯誤 [operation-1606821546786-5b5654b838085-34014f33-1566b3e6]:錯誤:
- 程式碼:RESOURCE_NOT_FOUND 訊息:找不到類型 [storagetransfer.v1.transferJobs]。
我嘗試過很多變體,type
但都不起作用。我花了幾個小時搜尋文件。
正確的使用方法是什麼type
?