Skip to content

GCP.MigrationCenter reference

Source: src/GCP/MigrationCenter/AssetsExportJob.ts

A Migration Center assets export job that writes inventory (and optional performance / network-dependency) data to signed-URI files.

The API has no patch method — changing format, filter, inventory flags, or labels replaces the job. Id and location are also immutable.

AssetsExportJob: Creating an Assets Export Job

Section titled “AssetsExportJob: Creating an Assets Export Job”

CSV inventory export

const job = yield* GCP.MigrationCenter.AssetsExportJob("Inventory", {
fileFormat: "CSV",
labels: { env: "test" },
});

XLSX with performance data

const job = yield* GCP.MigrationCenter.AssetsExportJob("Inventory", {
fileFormat: "XLSX",
performanceDataMaxDays: 40,
});

Source: src/GCP/MigrationCenter/DiscoveryClient.ts

A Migration Center discovery client that reports on-prem asset frames for a source.

discoveryClientId, location, and source are immutable. Display name, description, service account, expiration, and labels update in place.

DiscoveryClient: Creating a Discovery Client

Section titled “DiscoveryClient: Creating a Discovery Client”
const source = yield* GCP.MigrationCenter.Source("Scanner", {
type: "SOURCE_TYPE_DISCOVERY_CLIENT",
});
const client = yield* GCP.MigrationCenter.DiscoveryClient("Agent", {
source: source.name,
serviceAccount: "scanner@my-project.iam.gserviceaccount.com",
displayName: "on-prem-agent",
});

Source: src/GCP/MigrationCenter/Group.ts

A Migration Center asset group used to bundle related assets and generate reports.

Changing groupId or location replaces the group. Display name, description, and labels update in place.

Generated name

const group = yield* GCP.MigrationCenter.Group("Workloads", {
displayName: "workloads",
labels: { env: "test" },
});

Explicit id

const group = yield* GCP.MigrationCenter.Group("Workloads", {
groupId: "app-workloads",
description: "production vms",
});

Source: src/GCP/MigrationCenter/ImportJob.ts

A Migration Center import job that ingests asset frames from uploaded payload files into a source.

importJobId, location, and assetSource are immutable. Display name and labels update in place. Nested import data files are force- deleted with the job.

const source = yield* GCP.MigrationCenter.Source("Inventory", {
type: "SOURCE_TYPE_UPLOAD",
});
const job = yield* GCP.MigrationCenter.ImportJob("Rvtools", {
assetSource: source.name,
displayName: "rvtools-import",
});

Source: src/GCP/MigrationCenter/ImportJobsImportDataFile.ts

A payload file attached to a Migration Center import job. Creating the file returns a signed URI that the client uploads inventory CSV/XLSX into.

Import data files have no labels field — Alchemy stamps ownership into the display name so list / nuke can find them. The API has no patch method; changing format or display name replaces the file.

ImportJobsImportDataFile: Creating an Import Data File

Section titled “ImportJobsImportDataFile: Creating an Import Data File”
const job = yield* GCP.MigrationCenter.ImportJob("Rvtools", {
assetSource: source.name,
});
const file = yield* GCP.MigrationCenter.ImportJobsImportDataFile("Payload", {
importJob: job.name,
format: "IMPORT_JOB_FORMAT_RVTOOLS_CSV",
displayName: "inventory",
});

Source: src/GCP/MigrationCenter/PreferenceSet.ts

A Migration Center preference set capturing target-product, region, and sizing assumptions used when generating reports.

Preference sets have no labels field — Alchemy stamps ownership into the description so list / nuke can find them. Id and location are immutable. Display name, description, and VM preferences update in place.

Compute Engine defaults

const prefs = yield* GCP.MigrationCenter.PreferenceSet("Prod", {
displayName: "prod-gce",
});

Explicit VM preferences

const prefs = yield* GCP.MigrationCenter.PreferenceSet("Prod", {
virtualMachinePreferences: {
targetProduct: "COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE",
regionPreferences: { preferredRegions: ["us-central1"] },
sizingOptimizationStrategy: "SIZING_OPTIMIZATION_STRATEGY_MODERATE",
commitmentPlan: "COMMITMENT_PLAN_THREE_YEARS",
},
});

Source: src/GCP/MigrationCenter/ReportConfig.ts

A Migration Center report configuration that binds asset groups to preference sets for TCO reports.

Report configs have no labels field — Alchemy stamps ownership into the description so list / nuke can find them. The API has no patch method; changing assignments, display name, or description replaces the config. Nested reports are force-deleted with the config.

const group = yield* GCP.MigrationCenter.Group("Workloads", {});
const prefs = yield* GCP.MigrationCenter.PreferenceSet("Prod", {});
const config = yield* GCP.MigrationCenter.ReportConfig("Tco", {
displayName: "tco",
groupPreferencesetAssignments: [
{ group: group.name, preferenceSet: prefs.name },
],
});

Source: src/GCP/MigrationCenter/ReportConfigsReport.ts

A point-in-time Migration Center report rendered from a report config (typically a total cost of ownership view).

Reports have no labels field — Alchemy stamps ownership into the description so list / nuke can find them. The API has no patch method; changing type, display name, or description replaces the report.

const report = yield* GCP.MigrationCenter.ReportConfigsReport("Tco", {
reportConfig: config.name,
type: "TOTAL_COST_OF_OWNERSHIP",
displayName: "q1-tco",
});

Source: src/GCP/MigrationCenter/Source.ts

A Migration Center source that streams asset frames into a project.

Sources have no labels field — Alchemy stamps ownership into the description so list / nuke can find them. sourceId, location, and type are immutable. Display name, description, and priority update in place.

Upload source

const source = yield* GCP.MigrationCenter.Source("Inventory", {
type: "SOURCE_TYPE_UPLOAD",
displayName: "rvtools",
});

Discovery-client source

const source = yield* GCP.MigrationCenter.Source("Scanner", {
type: "SOURCE_TYPE_DISCOVERY_CLIENT",
description: "on-prem scanner",
});