Creates a new migration job in a given project and location.

Scopes

You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: datamigration1 --scope <scope> projects locations-migration-jobs-create ...

Required Scalar Argument

  • <parent> (string)
    • Required. The parent which owns this collection of migration jobs.

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

MigrationJob:
  cmek-key-name: string
  conversion-workspace:
    commit-id: string
    name: string
  create-time: string
  destination: string
  destination-database:
    engine: string
    provider: string
  display-name: string
  dump-path: string
  duration: string
  end-time: string
  error:
    code: integer
    message: string
  filter: string
  labels: { string: string }
  name: string
  performance-config:
    dump-parallel-level: string
  phase: string
  reverse-ssh-connectivity:
    vm: string
    vm-ip: string
    vm-port: integer
    vpc: string
  source: string
  source-database:
    engine: string
    provider: string
  state: string
  type: string
  update-time: string
  vpc-peering-connectivity:
    vpc: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . cmek-key-name=eos
    • The CMEK (customer-managed encryption key) fully qualified key name used for the migration job. This field supports all migration jobs types except for: * Mysql to Mysql (use the cmek field in the cloudsql connection profile instead). * PostrgeSQL to PostgreSQL (use the cmek field in the cloudsql connection profile instead). * PostgreSQL to AlloyDB (use the kms_key_name field in the alloydb connection profile instead). Each Cloud CMEK key has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]
  • conversion-workspace commit-id=duo
    • The commit ID of the conversion workspace.
  • name=elitr

    • The resource name (URI) of the conversion workspace.
  • .. create-time=consetetur

    • Output only. The timestamp when the migration job resource was created. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".
  • destination=et
    • Required. The resource name (URI) of the destination connection profile.
  • destination-database engine=clita
    • The database engine.
  • provider=sit

    • The database provider.
  • .. display-name=takimata

    • The migration job display name.
  • dump-path=erat
    • The path to the dump file in Google Cloud Storage, in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]). This field and the "dump_flags" field are mutually exclusive.
  • duration=diam
    • Output only. The duration of the migration job (in seconds). A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
  • end-time=nonumy
    • Output only. If the migration job is completed, the time when it was completed.
  • error code=95
    • The status code, which should be an enum value of google.rpc.Code.
  • message=at

    • A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  • .. filter=diam

    • This field can be used to select the entities to migrate as part of the migration job. It uses AIP-160 notation to select a subset of the entities configured on the associated conversion-workspace. This field should not be set on migration-jobs that are not associated with a conversion workspace.
  • labels=key=diam
    • The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of "key": "value" pairs. Example: { &#34;name&#34;: &#34;wrench&#34;, &#34;mass&#34;: &#34;1.3kg&#34;, &#34;count&#34;: &#34;3&#34; }.
    • the value will be associated with the given key
  • name=sed
    • The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
  • performance-config dump-parallel-level=et

    • Initial dump parallelism level.
  • .. phase=ea

    • Output only. The current migration job phase.
  • reverse-ssh-connectivity vm=dolore
    • The name of the virtual machine (Compute Engine) used as the bastion server for the SSH tunnel.
  • vm-ip=ipsum
    • Required. The IP of the virtual machine (Compute Engine) used as the bastion server for the SSH tunnel.
  • vm-port=34
    • Required. The forwarding port of the virtual machine (Compute Engine) used as the bastion server for the SSH tunnel.
  • vpc=at

    • The name of the VPC to peer with the Cloud SQL private network.
  • .. source=sit

    • Required. The resource name (URI) of the source connection profile.
  • source-database engine=sit
    • The database engine.
  • provider=lorem

    • The database provider.
  • .. state=stet

    • The current migration job state.
  • type=duo
    • Required. The migration job type.
  • update-time=elitr
    • Output only. The timestamp when the migration job resource was last updated. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".
  • vpc-peering-connectivity vpc=aliquyam
    • The name of the VPC network to peer with the Cloud SQL private network.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p migration-job-id=string

    • Required. The ID of the instance to create.
  • -p request-id=string

    • Optional. A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored. It is recommended to always set this value to a UUID. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").