# Cloud Database Migration Service V1 API - Class Google::Cloud::CloudDMS::V1::MigrationJob (v1.8.0)

1.8.0 (latest) 1.7.0 1.6.0 1.5.1 1.4.0 1.3.1 1.2.2 1.1.0 1.0.1 0.8.0 0.7.2 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.5 Reference documentation and code samples for the Cloud Database Migration Service V1 API class Google::Cloud::CloudDMS::V1::MigrationJob.

Represents a Database Migration Service migration job object.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #cmek_key_name

    def cmek_key_name() -> ::String

**Returns**

- (::String) --- 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\]

### #cmek_key_name=

    def cmek_key_name=(value) -> ::String

**Parameter**

- **value** (::String) ---

  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\]
**Returns**

- (::String) --- 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

    def conversion_workspace() -> ::Google::Cloud::CloudDMS::V1::ConversionWorkspaceInfo

**Returns**

- ([::Google::Cloud::CloudDMS::V1::ConversionWorkspaceInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-ConversionWorkspaceInfo)) --- The conversion workspace used by the migration.

### #conversion_workspace=

    def conversion_workspace=(value) -> ::Google::Cloud::CloudDMS::V1::ConversionWorkspaceInfo

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::ConversionWorkspaceInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-ConversionWorkspaceInfo)) --- The conversion workspace used by the migration.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::ConversionWorkspaceInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-ConversionWorkspaceInfo)) --- The conversion workspace used by the migration.

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Protobuf-Timestamp)) --- 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

    def destination() -> ::String

**Returns**

- (::String) --- Required. The resource name (URI) of the destination connection profile.

### #destination=

    def destination=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The resource name (URI) of the destination connection profile.
**Returns**

- (::String) --- Required. The resource name (URI) of the destination connection profile.

### #destination_database

    def destination_database() -> ::Google::Cloud::CloudDMS::V1::DatabaseType

**Returns**

- ([::Google::Cloud::CloudDMS::V1::DatabaseType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-DatabaseType)) --- The database engine type and provider of the destination.

### #destination_database=

    def destination_database=(value) -> ::Google::Cloud::CloudDMS::V1::DatabaseType

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::DatabaseType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-DatabaseType)) --- The database engine type and provider of the destination.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::DatabaseType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-DatabaseType)) --- The database engine type and provider of the destination.

### #display_name

    def display_name() -> ::String

**Returns**

- (::String) --- The migration job display name.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- The migration job display name.
**Returns**

- (::String) --- The migration job display name.

### #dump_flags

    def dump_flags() -> ::Google::Cloud::CloudDMS::V1::MigrationJob::DumpFlags

**Returns**

- ([::Google::Cloud::CloudDMS::V1::MigrationJob::DumpFlags](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-DumpFlags)) --- The initial dump flags. This field and the "dump_path" field are mutually exclusive.

### #dump_flags=

    def dump_flags=(value) -> ::Google::Cloud::CloudDMS::V1::MigrationJob::DumpFlags

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::MigrationJob::DumpFlags](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-DumpFlags)) --- The initial dump flags. This field and the "dump_path" field are mutually exclusive.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::MigrationJob::DumpFlags](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-DumpFlags)) --- The initial dump flags. This field and the "dump_path" field are mutually exclusive.

### #dump_path

    def dump_path() -> ::String

**Returns**

- (::String) --- 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.

### #dump_path=

    def dump_path=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.
**Returns**

- (::String) --- 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

    def duration() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Protobuf-Duration)) --- 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

    def end_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Protobuf-Timestamp)) --- Output only. If the migration job is completed, the time when it was completed.

### #error

    def error() -> ::Google::Rpc::Status

**Returns**

- ([::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Rpc-Status)) --- Output only. The error details in case of state FAILED.

### #filter

    def filter() -> ::String

**Returns**

- (::String) --- 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.

### #filter=

    def filter=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.
**Returns**

- (::String) --- 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

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- 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: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- 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: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- 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: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.

### #name

    def name() -> ::String

**Returns**

- (::String) --- The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
**Returns**

- (::String) --- The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.

### #performance_config

    def performance_config() -> ::Google::Cloud::CloudDMS::V1::MigrationJob::PerformanceConfig

**Returns**

- ([::Google::Cloud::CloudDMS::V1::MigrationJob::PerformanceConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-PerformanceConfig)) --- Optional. Data dump parallelism settings used by the migration. Currently applicable only for MySQL to Cloud SQL for MySQL migrations only.

### #performance_config=

    def performance_config=(value) -> ::Google::Cloud::CloudDMS::V1::MigrationJob::PerformanceConfig

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::MigrationJob::PerformanceConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-PerformanceConfig)) --- Optional. Data dump parallelism settings used by the migration. Currently applicable only for MySQL to Cloud SQL for MySQL migrations only.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::MigrationJob::PerformanceConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-PerformanceConfig)) --- Optional. Data dump parallelism settings used by the migration. Currently applicable only for MySQL to Cloud SQL for MySQL migrations only.

### #phase

    def phase() -> ::Google::Cloud::CloudDMS::V1::MigrationJob::Phase

**Returns**

- ([::Google::Cloud::CloudDMS::V1::MigrationJob::Phase](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-Phase)) --- Output only. The current migration job phase.

### #reverse_ssh_connectivity

    def reverse_ssh_connectivity() -> ::Google::Cloud::CloudDMS::V1::ReverseSshConnectivity

**Returns**

- ([::Google::Cloud::CloudDMS::V1::ReverseSshConnectivity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-ReverseSshConnectivity)) --- The details needed to communicate to the source over Reverse SSH tunnel connectivity.


  Note: The following fields are mutually exclusive: `reverse_ssh_connectivity`, `vpc_peering_connectivity`, `static_ip_connectivity`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #reverse_ssh_connectivity=

    def reverse_ssh_connectivity=(value) -> ::Google::Cloud::CloudDMS::V1::ReverseSshConnectivity

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::ReverseSshConnectivity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-ReverseSshConnectivity)) --- The details needed to communicate to the source over Reverse SSH tunnel connectivity.


  Note: The following fields are mutually exclusive: `reverse_ssh_connectivity`, `vpc_peering_connectivity`, `static_ip_connectivity`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::ReverseSshConnectivity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-ReverseSshConnectivity)) --- The details needed to communicate to the source over Reverse SSH tunnel connectivity.


  Note: The following fields are mutually exclusive: `reverse_ssh_connectivity`, `vpc_peering_connectivity`, `static_ip_connectivity`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #source

    def source() -> ::String

**Returns**

- (::String) --- Required. The resource name (URI) of the source connection profile.

### #source=

    def source=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The resource name (URI) of the source connection profile.
**Returns**

- (::String) --- Required. The resource name (URI) of the source connection profile.

### #source_database

    def source_database() -> ::Google::Cloud::CloudDMS::V1::DatabaseType

**Returns**

- ([::Google::Cloud::CloudDMS::V1::DatabaseType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-DatabaseType)) --- The database engine type and provider of the source.

### #source_database=

    def source_database=(value) -> ::Google::Cloud::CloudDMS::V1::DatabaseType

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::DatabaseType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-DatabaseType)) --- The database engine type and provider of the source.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::DatabaseType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-DatabaseType)) --- The database engine type and provider of the source.

### #state

    def state() -> ::Google::Cloud::CloudDMS::V1::MigrationJob::State

**Returns**

- ([::Google::Cloud::CloudDMS::V1::MigrationJob::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-State)) --- The current migration job state.

### #state=

    def state=(value) -> ::Google::Cloud::CloudDMS::V1::MigrationJob::State

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::MigrationJob::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-State)) --- The current migration job state.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::MigrationJob::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-State)) --- The current migration job state.

### #static_ip_connectivity

    def static_ip_connectivity() -> ::Google::Cloud::CloudDMS::V1::StaticIpConnectivity

**Returns**

- ([::Google::Cloud::CloudDMS::V1::StaticIpConnectivity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-StaticIpConnectivity)) --- static ip connectivity data (default, no additional details needed).


  Note: The following fields are mutually exclusive: `static_ip_connectivity`, `reverse_ssh_connectivity`, `vpc_peering_connectivity`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #static_ip_connectivity=

    def static_ip_connectivity=(value) -> ::Google::Cloud::CloudDMS::V1::StaticIpConnectivity

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::StaticIpConnectivity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-StaticIpConnectivity)) --- static ip connectivity data (default, no additional details needed).


  Note: The following fields are mutually exclusive: `static_ip_connectivity`, `reverse_ssh_connectivity`, `vpc_peering_connectivity`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::StaticIpConnectivity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-StaticIpConnectivity)) --- static ip connectivity data (default, no additional details needed).


  Note: The following fields are mutually exclusive: `static_ip_connectivity`, `reverse_ssh_connectivity`, `vpc_peering_connectivity`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #type

    def type() -> ::Google::Cloud::CloudDMS::V1::MigrationJob::Type

**Returns**

- ([::Google::Cloud::CloudDMS::V1::MigrationJob::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-Type)) --- Required. The migration job type.

### #type=

    def type=(value) -> ::Google::Cloud::CloudDMS::V1::MigrationJob::Type

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::MigrationJob::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-Type)) --- Required. The migration job type.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::MigrationJob::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-MigrationJob-Type)) --- Required. The migration job type.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Protobuf-Timestamp)) --- 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

    def vpc_peering_connectivity() -> ::Google::Cloud::CloudDMS::V1::VpcPeeringConnectivity

**Returns**

- ([::Google::Cloud::CloudDMS::V1::VpcPeeringConnectivity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-VpcPeeringConnectivity)) --- The details of the VPC network that the source database is located in.


  Note: The following fields are mutually exclusive: `vpc_peering_connectivity`, `reverse_ssh_connectivity`, `static_ip_connectivity`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #vpc_peering_connectivity=

    def vpc_peering_connectivity=(value) -> ::Google::Cloud::CloudDMS::V1::VpcPeeringConnectivity

**Parameter**

- **value** ([::Google::Cloud::CloudDMS::V1::VpcPeeringConnectivity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-VpcPeeringConnectivity)) --- The details of the VPC network that the source database is located in.


  Note: The following fields are mutually exclusive: `vpc_peering_connectivity`, `reverse_ssh_connectivity`, `static_ip_connectivity`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::CloudDMS::V1::VpcPeeringConnectivity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest/Google-Cloud-CloudDMS-V1-VpcPeeringConnectivity)) --- The details of the VPC network that the source database is located in.


  Note: The following fields are mutually exclusive: `vpc_peering_connectivity`, `reverse_ssh_connectivity`, `static_ip_connectivity`. If a field in that set is populated, all other fields in the set will automatically be cleared.