Generate a SSH configuration script to configure the reverse SSH connectivity.
HTTP request
POST https://datamigration.googleapis.com/v1/{migrationJob}:generateSshScript
Path parameters
Parameters
migrationJob
string
Name of the migration job resource to generate the SSH script.
Authorization requires the following IAM permission on the specified resource migrationJob:
datamigration.migrationjobs.generateSshScript
Request body
The request body contains data with the following structure:
JSON representation
{"vm": string,"vmPort": integer,// Union field vm_config can be only one of the following:"vmCreationConfig": {object (VmCreationConfig)},"vmSelectionConfig": {object (VmSelectionConfig)}// End of list of possible types for union field vm_config.}
Fields
vm
string
Required. Bastion VM Instance name to use or to create.
vmPort
integer
The port that will be open on the bastion host.
Union field vm_config. The VM configuration vm_config can be only one of the following:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003eThis endpoint generates an SSH configuration script for reverse SSH connectivity to a specified migration job, requiring the \u003ccode\u003edatamigration.migrationjobs.generateSshScript\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003ePOST\u003c/code\u003e HTTP method to the URL \u003ccode\u003ehttps://datamigration.googleapis.com/v1/{migrationJob}:generateSshScript\u003c/code\u003e, with \u003ccode\u003emigrationJob\u003c/code\u003e as a required path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must specify either a \u003ccode\u003evmCreationConfig\u003c/code\u003e for creating a new VM or a \u003ccode\u003evmSelectionConfig\u003c/code\u003e for selecting an existing VM, along with a required bastion VM instance name and port.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests return a JSON response containing a \u003ccode\u003escript\u003c/code\u003e field with the SSH configuration script.\u003c/p\u003e\n"],["\u003cp\u003eThe operation requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.migrationJobs.generateSshScript\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SshScript.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [VmCreationConfig](#VmCreationConfig)\n - [JSON representation](#VmCreationConfig.SCHEMA_REPRESENTATION)\n- [VmSelectionConfig](#VmSelectionConfig)\n - [JSON representation](#VmSelectionConfig.SCHEMA_REPRESENTATION)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nGenerate a SSH configuration script to configure the reverse SSH connectivity.\n\n### HTTP request\n\n`POST https://datamigration.googleapis.com/v1/{migrationJob}:generateSshScript`\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nResponse message for 'migrationJobs.generateSshScript' request.\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\nVmCreationConfig\n----------------\n\nVM creation configuration message\n\nVmSelectionConfig\n-----------------\n\nVM selection configuration message"]]