class ProjectsLocationsMigrationJobs extends Resource (View source)

The "migrationJobs" collection of methods.

Typical usage is:

 $datamigrationService = new Google\Service\DatabaseMigrationService(...);
 $migrationJobs = $datamigrationService->projects_locations_migrationJobs;

Methods

create(string $parent, MigrationJob $postBody, array $optParams = [])

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

delete(string $name, array $optParams = [])

Deletes a single migration job. (migrationJobs.delete)

demoteDestination(string $name, DemoteDestinationRequest $postBody, array $optParams = [])

Demotes the destination database to become a read replica of the source. This is applicable for the following migrations: 1. MySQL to Cloud SQL for MySQL

  1. PostgreSQL to Cloud SQL for PostgreSQL 3. PostgreSQL to AlloyDB for PostgreSQL. (migrationJobs.demoteDestination)

generateSshScript(string $migrationJob, GenerateSshScriptRequest $postBody, array $optParams = [])

Generate a SSH configuration script to configure the reverse SSH connectivity. (migrationJobs.generateSshScript)

generateTcpProxyScript(string $migrationJob, GenerateTcpProxyScriptRequest $postBody, array $optParams = [])

Generate a TCP Proxy configuration script to configure a cloud-hosted VM running a TCP Proxy. (migrationJobs.generateTcpProxyScript)

get(string $name, array $optParams = [])

Gets details of a single migration job. (migrationJobs.get)

getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (migrationJobs.getIamPolicy)

listProjectsLocationsMigrationJobs(string $parent, array $optParams = [])

Lists migration jobs in a given project and location.

patch(string $name, MigrationJob $postBody, array $optParams = [])

Updates the parameters of a single migration job. (migrationJobs.patch)

promote(string $name, PromoteMigrationJobRequest $postBody, array $optParams = [])

Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.

restart(string $name, RestartMigrationJobRequest $postBody, array $optParams = [])

Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.

resume(string $name, ResumeMigrationJobRequest $postBody, array $optParams = [])

Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase). (migrationJobs.resume)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (migrationJobs.setIamPolicy)

start(string $name, StartMigrationJobRequest $postBody, array $optParams = [])

Start an already created migration job. (migrationJobs.start)

stop(string $name, StopMigrationJobRequest $postBody, array $optParams = [])

Stops a running migration job. (migrationJobs.stop)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

verify(string $name, VerifyMigrationJobRequest $postBody, array $optParams = [])

Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met. (migrationJobs.verify)

Details

Operation create(string $parent, MigrationJob $postBody, array $optParams = [])

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

(migrationJobs.create)

Parameters

string $parent

Required. The parent which owns this collection of migration jobs.

MigrationJob $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $name, array $optParams = [])

Deletes a single migration job. (migrationJobs.delete)

Parameters

string $name

Required. Name of the migration job resource to delete.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation demoteDestination(string $name, DemoteDestinationRequest $postBody, array $optParams = [])

Demotes the destination database to become a read replica of the source. This is applicable for the following migrations: 1. MySQL to Cloud SQL for MySQL

  1. PostgreSQL to Cloud SQL for PostgreSQL 3. PostgreSQL to AlloyDB for PostgreSQL. (migrationJobs.demoteDestination)

Parameters

string $name

Name of the migration job resource to demote its destination.

DemoteDestinationRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

SshScript generateSshScript(string $migrationJob, GenerateSshScriptRequest $postBody, array $optParams = [])

Generate a SSH configuration script to configure the reverse SSH connectivity. (migrationJobs.generateSshScript)

Parameters

string $migrationJob

Name of the migration job resource to generate the SSH script.

GenerateSshScriptRequest $postBody
array $optParams

Optional parameters.

Return Value

SshScript

Exceptions

Exception

TcpProxyScript generateTcpProxyScript(string $migrationJob, GenerateTcpProxyScriptRequest $postBody, array $optParams = [])

Generate a TCP Proxy configuration script to configure a cloud-hosted VM running a TCP Proxy. (migrationJobs.generateTcpProxyScript)

Parameters

string $migrationJob

Name of the migration job resource to generate the TCP Proxy script.

GenerateTcpProxyScriptRequest $postBody
array $optParams

Optional parameters.

Return Value

TcpProxyScript

Exceptions

Exception

MigrationJob get(string $name, array $optParams = [])

Gets details of a single migration job. (migrationJobs.get)

Parameters

string $name

Required. Name of the migration job resource to get.

array $optParams

Optional parameters.

Return Value

MigrationJob

Exceptions

Exception

Policy getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (migrationJobs.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListMigrationJobsResponse listProjectsLocationsMigrationJobs(string $parent, array $optParams = [])

Lists migration jobs in a given project and location.

(migrationJobs.listProjectsLocationsMigrationJobs)

Parameters

string $parent

Required. The parent which owns this collection of migrationJobs.

array $optParams

Optional parameters.

Return Value

ListMigrationJobsResponse

Exceptions

Exception

Operation patch(string $name, MigrationJob $postBody, array $optParams = [])

Updates the parameters of a single migration job. (migrationJobs.patch)

Parameters

string $name

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

MigrationJob $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation promote(string $name, PromoteMigrationJobRequest $postBody, array $optParams = [])

Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.

(migrationJobs.promote)

Parameters

string $name

Name of the migration job resource to promote.

PromoteMigrationJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation restart(string $name, RestartMigrationJobRequest $postBody, array $optParams = [])

Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.

(migrationJobs.restart)

Parameters

string $name

Name of the migration job resource to restart.

RestartMigrationJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation resume(string $name, ResumeMigrationJobRequest $postBody, array $optParams = [])

Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase). (migrationJobs.resume)

Parameters

string $name

Name of the migration job resource to resume.

ResumeMigrationJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (migrationJobs.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Operation start(string $name, StartMigrationJobRequest $postBody, array $optParams = [])

Start an already created migration job. (migrationJobs.start)

Parameters

string $name

Name of the migration job resource to start.

StartMigrationJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation stop(string $name, StopMigrationJobRequest $postBody, array $optParams = [])

Stops a running migration job. (migrationJobs.stop)

Parameters

string $name

Name of the migration job resource to stop.

StopMigrationJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

This operation may "fail open" without warning. (migrationJobs.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception

Operation verify(string $name, VerifyMigrationJobRequest $postBody, array $optParams = [])

Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met. (migrationJobs.verify)

Parameters

string $name

Name of the migration job resource to verify.

VerifyMigrationJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception