I'm trying to create and manage a TransferJob for Google Storage Transfer service via Google Deployment Manager. The aim is to copy objects from one Cloud Storage bucket to another daily.
Since I can't find any example code, just the API, I'm trying to figure out how to describe the desired resource.
---
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
When I try to apply this resource via Deployment Manager I get an error:
ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation [operation-1606821546786-5b5654b838085-34014f33-1566b3e6]: errors:
- code: RESOURCE_NOT_FOUND message: The type [storagetransfer.v1.transferJobs] was not found.
I've tried many variations of the type
but none work. I've spent hours scouring the documentation.
What is the correct type
to use, and how could I have known?