- release_tracks: [ALPHA, GA]
  help_text:
    brief: List Database Migration Service migration jobs.
    description: List Database Migration Service migration jobs.
    examples: |
      To list all migration jobs in a project and region 'us-central1', run:

        $ {command} --region=us-central1

  request:
    collection: datamigration.projects.locations.migrationJobs
    GA:
      api_version: v1
    ALPHA:
      api_version: v1alpha2

  response:
    id_field: name

  arguments:
    resource:
      help_text: The location you want to list the migration jobs for.
      spec: !REF googlecloudsdk.command_lib.database_migration.resources:region

  output:
    format: |
      table(
        name.basename():label=MIGRATION_JOB_ID,
        displayName,
        name.scope('locations').segment(0):label=REGION,
        state:label=STATUS,
        source.scope("connectionProfiles"),
        destination.scope("connectionProfiles")
      )
