Class: Google::Apis::DatamigrationV1::MigrationJob

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/datamigration_v1/classes.rb,
lib/google/apis/datamigration_v1/representations.rb,
lib/google/apis/datamigration_v1/representations.rb

Overview

Represents a Database Migration Service migration job object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MigrationJob

Returns a new instance of MigrationJob.



3178
3179
3180
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3178

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cmek_key_nameString

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] Corresponds to the JSON property cmekKeyName

Returns:

  • (String)


3010
3011
3012
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3010

def cmek_key_name
  @cmek_key_name
end

#conversion_workspaceGoogle::Apis::DatamigrationV1::ConversionWorkspaceInfo

A conversion workspace's version. Corresponds to the JSON property conversionWorkspace



3015
3016
3017
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3015

def conversion_workspace
  @conversion_workspace
end

#create_timeString

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". Corresponds to the JSON property createTime

Returns:

  • (String)


3022
3023
3024
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3022

def create_time
  @create_time
end

#destinationString

Required. The resource name (URI) of the destination connection profile. Corresponds to the JSON property destination

Returns:

  • (String)


3027
3028
3029
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3027

def destination
  @destination
end

#destination_databaseGoogle::Apis::DatamigrationV1::DatabaseType

A message defining the database engine and provider. Corresponds to the JSON property destinationDatabase



3032
3033
3034
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3032

def destination_database
  @destination_database
end

#display_nameString

The migration job display name. Corresponds to the JSON property displayName

Returns:

  • (String)


3037
3038
3039
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3037

def display_name
  @display_name
end

#dump_flagsGoogle::Apis::DatamigrationV1::DumpFlags

Dump flags definition. Corresponds to the JSON property dumpFlags



3042
3043
3044
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3042

def dump_flags
  @dump_flags
end

#dump_pathString

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. Corresponds to the JSON property dumpPath

Returns:

  • (String)


3049
3050
3051
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3049

def dump_path
  @dump_path
end

#dump_typeString

Optional. The type of the data dump. Supported for MySQL to CloudSQL for MySQL migrations only. Corresponds to the JSON property dumpType

Returns:

  • (String)


3055
3056
3057
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3055

def dump_type
  @dump_type
end

#durationString

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". Corresponds to the JSON property duration

Returns:

  • (String)


3061
3062
3063
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3061

def duration
  @duration
end

#end_timeString

Output only. If the migration job is completed, the time when it was completed. Corresponds to the JSON property endTime

Returns:

  • (String)


3066
3067
3068
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3066

def end_time
  @end_time
end

#errorGoogle::Apis::DatamigrationV1::Status

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. Corresponds to the JSON property error



3076
3077
3078
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3076

def error
  @error
end

#filterString

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. Corresponds to the JSON property filter

Returns:

  • (String)


3084
3085
3086
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3084

def filter
  @filter
end

#labelsHash<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". Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


3092
3093
3094
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3092

def labels
  @labels
end

#nameString

The name (URI) of this migration job resource, in the form of: projects/ project/locations/location/migrationJobs/migrationJob. Corresponds to the JSON property name

Returns:

  • (String)


3098
3099
3100
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3098

def name
  @name
end

#objects_configGoogle::Apis::DatamigrationV1::MigrationJobObjectsConfig

Configuration for the objects to be migrated. Corresponds to the JSON property objectsConfig



3103
3104
3105
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3103

def objects_config
  @objects_config
end

#oracle_to_postgres_configGoogle::Apis::DatamigrationV1::OracleToPostgresConfig

Configuration for heterogeneous Oracle to Cloud SQL for PostgreSQL and ** Oracle to AlloyDB for PostgreSQL** migrations. Corresponds to the JSON property oracleToPostgresConfig



3109
3110
3111
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3109

def oracle_to_postgres_config
  @oracle_to_postgres_config
end

#performance_configGoogle::Apis::DatamigrationV1::PerformanceConfig

Performance configuration definition. Corresponds to the JSON property performanceConfig



3114
3115
3116
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3114

def performance_config
  @performance_config
end

#phaseString

Output only. The current migration job phase. Corresponds to the JSON property phase

Returns:

  • (String)


3119
3120
3121
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3119

def phase
  @phase
end

#reverse_ssh_connectivityGoogle::Apis::DatamigrationV1::ReverseSshConnectivity

The details needed to configure a reverse SSH tunnel between the source and destination databases. These details will be used when calling the generateSshScript method (see https://cloud.google.com/database-migration/docs/ reference/rest/v1/projects.locations.migrationJobs/generateSshScript) to produce the script that will help set up the reverse SSH tunnel, and to set up the VPC peering between the Cloud SQL private network and the VPC. Corresponds to the JSON property reverseSshConnectivity



3129
3130
3131
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3129

def reverse_ssh_connectivity
  @reverse_ssh_connectivity
end

#sourceString

Required. The resource name (URI) of the source connection profile. Corresponds to the JSON property source

Returns:

  • (String)


3134
3135
3136
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3134

def source
  @source
end

#source_databaseGoogle::Apis::DatamigrationV1::DatabaseType

A message defining the database engine and provider. Corresponds to the JSON property sourceDatabase



3139
3140
3141
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3139

def source_database
  @source_database
end

#sqlserver_homogeneous_migration_job_configGoogle::Apis::DatamigrationV1::SqlServerHomogeneousMigrationJobConfig

Configuration for homogeneous migration to Cloud SQL for SQL Server. Corresponds to the JSON property sqlserverHomogeneousMigrationJobConfig



3144
3145
3146
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3144

def sqlserver_homogeneous_migration_job_config
  @sqlserver_homogeneous_migration_job_config
end

#stateString

The current migration job state. Corresponds to the JSON property state

Returns:

  • (String)


3149
3150
3151
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3149

def state
  @state
end

#static_ip_connectivityGoogle::Apis::DatamigrationV1::StaticIpConnectivity

The source database will allow incoming connections from the public IP of the destination database. You can retrieve the public IP of the Cloud SQL instance from the Cloud SQL console or using Cloud SQL APIs. No additional configuration is required. Corresponds to the JSON property staticIpConnectivity



3157
3158
3159
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3157

def static_ip_connectivity
  @static_ip_connectivity
end

#typeString

Required. The migration job type. Corresponds to the JSON property type

Returns:

  • (String)


3162
3163
3164
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3162

def type
  @type
end

#update_timeString

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". Corresponds to the JSON property updateTime

Returns:

  • (String)


3169
3170
3171
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3169

def update_time
  @update_time
end

#vpc_peering_connectivityGoogle::Apis::DatamigrationV1::VpcPeeringConnectivity

The details of the VPC where the source database is located in Google Cloud. We will use this information to set up the VPC peering connection between Cloud SQL and this VPC. Corresponds to the JSON property vpcPeeringConnectivity



3176
3177
3178
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3176

def vpc_peering_connectivity
  @vpc_peering_connectivity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
# File 'lib/google/apis/datamigration_v1/classes.rb', line 3183

def update!(**args)
  @cmek_key_name = args[:cmek_key_name] if args.key?(:cmek_key_name)
  @conversion_workspace = args[:conversion_workspace] if args.key?(:conversion_workspace)
  @create_time = args[:create_time] if args.key?(:create_time)
  @destination = args[:destination] if args.key?(:destination)
  @destination_database = args[:destination_database] if args.key?(:destination_database)
  @display_name = args[:display_name] if args.key?(:display_name)
  @dump_flags = args[:dump_flags] if args.key?(:dump_flags)
  @dump_path = args[:dump_path] if args.key?(:dump_path)
  @dump_type = args[:dump_type] if args.key?(:dump_type)
  @duration = args[:duration] if args.key?(:duration)
  @end_time = args[:end_time] if args.key?(:end_time)
  @error = args[:error] if args.key?(:error)
  @filter = args[:filter] if args.key?(:filter)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @objects_config = args[:objects_config] if args.key?(:objects_config)
  @oracle_to_postgres_config = args[:oracle_to_postgres_config] if args.key?(:oracle_to_postgres_config)
  @performance_config = args[:performance_config] if args.key?(:performance_config)
  @phase = args[:phase] if args.key?(:phase)
  @reverse_ssh_connectivity = args[:reverse_ssh_connectivity] if args.key?(:reverse_ssh_connectivity)
  @source = args[:source] if args.key?(:source)
  @source_database = args[:source_database] if args.key?(:source_database)
  @sqlserver_homogeneous_migration_job_config = args[:sqlserver_homogeneous_migration_job_config] if args.key?(:sqlserver_homogeneous_migration_job_config)
  @state = args[:state] if args.key?(:state)
  @static_ip_connectivity = args[:static_ip_connectivity] if args.key?(:static_ip_connectivity)
  @type = args[:type] if args.key?(:type)
  @update_time = args[:update_time] if args.key?(:update_time)
  @vpc_peering_connectivity = args[:vpc_peering_connectivity] if args.key?(:vpc_peering_connectivity)
end