Skip to content

GCP.StorageTransfer reference

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.

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" },
});

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" },
});

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();

Source: src/GCP/StorageTransfer/GetGoogleServiceAccountHttp.ts Kind: Layer · Provides: GCP.StorageTransfer.GetGoogleServiceAccount

HTTP implementation of GetGoogleServiceAccount.

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.

const runJob = yield* GCP.StorageTransfer.RunTransferJob(nightly);
const operation = yield* runJob();

Source: src/GCP/StorageTransfer/RunTransferJobHttp.ts Kind: Layer · Provides: GCP.StorageTransfer.RunTransferJob

HTTP implementation of RunTransferJob.

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.

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",
},
});

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" },
},
});