GCP.StorageTransfer reference
AgentPool
Section titled “AgentPool”Source:
src/GCP/StorageTransfer/AgentPool.ts
A Storage Transfer Service agent pool for on-premises (POSIX) agents.
Agent pools have no labels field, so Alchemy stamps ownership into
displayName for list / nuke. Name is identity — changing
agentPoolId replaces the pool. displayName and bandwidthLimit
update in place.
AgentPool: Creating an Agent Pool
Section titled “AgentPool: Creating an Agent Pool”Generated id
const pool = yield* GCP.StorageTransfer.AgentPool("OnPrem", { displayName: "warehouse scanners",});Named pool with a bandwidth cap
const pool = yield* GCP.StorageTransfer.AgentPool("OnPrem", { agentPoolId: "warehouse-scanners", displayName: "warehouse scanners", bandwidthLimit: { limitMbps: "120" },});AgentPool: Updating an Agent Pool
Section titled “AgentPool: Updating an Agent Pool”Change props on the same logical id; the engine keeps the physical id.
const pool = yield* GCP.StorageTransfer.AgentPool("OnPrem", { displayName: "warehouse scanners", bandwidthLimit: { limitMbps: "250" },});GetGoogleServiceAccount
Section titled “GetGoogleServiceAccount”Source:
src/GCP/StorageTransfer/GetGoogleServiceAccount.ts
Runtime binding for Storage Transfer googleServiceAccounts.get.
Returns the Google-managed service account Storage Transfer uses to
read source buckets and write sink buckets. Grant this identity
roles/storage.objectViewer (source) and roles/storage.objectAdmin
(sink). Bind this operation to a TransferJob in a
Function/Action init phase. Provide GetGoogleServiceAccountHttp.
Grants the host roles/storagetransfer.viewer on the project because
Storage Transfer has no resource-level IAM.
GetGoogleServiceAccount: Looking up the Transfer Service Account
Section titled “GetGoogleServiceAccount: Looking up the Transfer Service Account”const getAccount = yield* GCP.StorageTransfer.GetGoogleServiceAccount( nightly,);const account = yield* getAccount();GetGoogleServiceAccountHttp
Section titled “GetGoogleServiceAccountHttp”Source:
src/GCP/StorageTransfer/GetGoogleServiceAccountHttp.tsKind: Layer · Provides:GCP.StorageTransfer.GetGoogleServiceAccount
HTTP implementation of GetGoogleServiceAccount.
RunTransferJob
Section titled “RunTransferJob”Source:
src/GCP/StorageTransfer/RunTransferJob.ts
Runtime binding for Storage Transfer transferJobs.run.
Starts a transfer operation immediately, even when the job has no
schedule. Bind this operation to a TransferJob in a
Function/Action init phase. Provide RunTransferJobHttp.
Grants roles/storagetransfer.user on the project because Storage
Transfer has no resource-level IAM.
RunTransferJob: Running Transfer Jobs
Section titled “RunTransferJob: Running Transfer Jobs”const runJob = yield* GCP.StorageTransfer.RunTransferJob(nightly);const operation = yield* runJob();RunTransferJobHttp
Section titled “RunTransferJobHttp”Source:
src/GCP/StorageTransfer/RunTransferJobHttp.tsKind: Layer · Provides:GCP.StorageTransfer.RunTransferJob
HTTP implementation of RunTransferJob.
TransferJob
Section titled “TransferJob”Source:
src/GCP/StorageTransfer/TransferJob.ts
A Storage Transfer Service job that copies objects between Cloud Storage, S3, Azure, POSIX, or HTTP sources and sinks.
Transfer jobs have no labels field, so Alchemy stamps ownership into
description for list / nuke. Name is identity. description,
transferSpec, notificationConfig, loggingConfig, and status
update in place. schedule, eventStream, serviceAccount, and
replicationSpec are immutable after create.
TransferJob: Creating a Transfer Job
Section titled “TransferJob: Creating a Transfer Job”One-shot GCS-to-GCS copy (disabled until RunTransferJob)
const job = yield* GCP.StorageTransfer.TransferJob("Nightly", { status: "DISABLED", description: "copy uploads into the archive bucket", transferSpec: { gcsDataSource: { bucketName: source.bucketName }, gcsDataSink: { bucketName: archive.bucketName }, },});Recurring copy with a daily schedule
const job = yield* GCP.StorageTransfer.TransferJob("Nightly", { description: "daily archive", transferSpec: { gcsDataSource: { bucketName: "src-bucket", path: "uploads/" }, gcsDataSink: { bucketName: "dst-bucket" }, }, schedule: { scheduleStartDate: { year: 2026, month: 1, day: 1 }, startTimeOfDay: { hours: 3, minutes: 0 }, repeatInterval: "86400s", },});TransferJob: Updating a Transfer Job
Section titled “TransferJob: Updating a Transfer Job”Change props on the same logical id; the engine keeps the physical id.
const job = yield* GCP.StorageTransfer.TransferJob("Nightly", { status: "ENABLED", description: "daily archive", transferSpec: { gcsDataSource: { bucketName: "src-bucket", path: "inbox/" }, gcsDataSink: { bucketName: "dst-bucket" }, },});