Method: projects.locations.conversionWorkspaces.mappingRules.import

Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files.

HTTP request

POST https://datamigration.googleapis.com/v1/{parent}/mappingRules:import

Path parameters

Parameters
parent

string

Required. Name of the conversion workspace resource to import the rules to in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversionWorkspace}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "rulesFormat": enum (ImportRulesFileFormat),
  "rulesFiles": [
    {
      object (RulesFile)
    }
  ],
  "autoCommit": boolean
}
Fields
rulesFormat

enum (ImportRulesFileFormat)

Required. The format of the rules content file.

rulesFiles[]

object (RulesFile)

Required. One or more rules files.

autoCommit

boolean

Required. Should the conversion workspace be committed automatically after the import operation.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

RulesFile

Details of a single rules file.

JSON representation
{
  "rulesSourceFilename": string,
  "rulesContent": string
}
Fields
rulesSourceFilename

string

Required. The filename of the rules that needs to be converted. The filename is used mainly so that future logs of the import rules job contain it, and can therefore be searched by it.

rulesContent

string

Required. The text content of the rules that needs to be converted.