Class DataMigrationServiceClient (1.7.1)

DataMigrationServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.clouddms_v1.services.data_migration_service.transports.base.DataMigrationServiceTransport]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Database Migration service

Properties

transport

Returns the transport used by the client instance.

Returns
TypeDescription
DataMigrationServiceTransportThe transport used by the client instance.

Methods

DataMigrationServiceClient

DataMigrationServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.clouddms_v1.services.data_migration_service.transports.base.DataMigrationServiceTransport]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Instantiates the data migration service client.

Parameters
NameDescription
credentials Optional[google.auth.credentials.Credentials]

The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

transport Union[str, DataMigrationServiceTransport]

The transport to use. If set to None, a transport is chosen automatically.

client_options Optional[Union[google.api_core.client_options.ClientOptions, dict]]

Custom options for the client. It won't take effect if a transport instance is provided. (1) The api_endpoint property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT environment variable can also be used to override the endpoint: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto switch to the default mTLS endpoint if client certificate is present, this is the default value). However, the api_endpoint property takes precedence if provided. (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide client certificate for mutual TLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used.

client_info google.api_core.gapic_v1.client_info.ClientInfo

The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

Exceptions
TypeDescription
google.auth.exceptions.MutualTLSChannelErrorIf mutual TLS transport creation failed for any reason.

__exit__

__exit__(type, value, traceback)

Releases underlying transport's resources.

apply_conversion_workspace

apply_conversion_workspace(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.ApplyConversionWorkspaceRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Applies draft tree onto a specific destination database.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_apply_conversion_workspace():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.ApplyConversionWorkspaceRequest(
        connection_profile="connection_profile_value",
        name="name_value",
    )

    # Make the request
    operation = client.apply_conversion_workspace(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.ApplyConversionWorkspaceRequest, dict]

The request object. Request message for 'ApplyConversionWorkspace' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConversionWorkspace The main conversion workspace resource entity.

cancel_operation

cancel_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.CancelOperationRequest
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
request .operations_pb2.CancelOperationRequest

The request object. Request message for CancelOperation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

commit_conversion_workspace

commit_conversion_workspace(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.CommitConversionWorkspaceRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Marks all the data in the conversion workspace as committed.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_commit_conversion_workspace():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.CommitConversionWorkspaceRequest(
        name="name_value",
    )

    # Make the request
    operation = client.commit_conversion_workspace(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.CommitConversionWorkspaceRequest, dict]

The request object. Request message for 'CommitConversionWorkspace' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConversionWorkspace The main conversion workspace resource entity.

common_billing_account_path

common_billing_account_path(billing_account: str) -> str

Returns a fully-qualified billing_account string.

common_folder_path

common_folder_path(folder: str) -> str

Returns a fully-qualified folder string.

common_location_path

common_location_path(project: str, location: str) -> str

Returns a fully-qualified location string.

common_organization_path

common_organization_path(organization: str) -> str

Returns a fully-qualified organization string.

common_project_path

common_project_path(project: str) -> str

Returns a fully-qualified project string.

connection_profile_path

connection_profile_path(
    project: str, location: str, connection_profile: str
) -> str

Returns a fully-qualified connection_profile string.

conversion_workspace_path

conversion_workspace_path(
    project: str, location: str, conversion_workspace: str
) -> str

Returns a fully-qualified conversion_workspace string.

convert_conversion_workspace

convert_conversion_workspace(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.ConvertConversionWorkspaceRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Creates a draft tree schema for the destination database.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_convert_conversion_workspace():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.ConvertConversionWorkspaceRequest(
    )

    # Make the request
    operation = client.convert_conversion_workspace(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.ConvertConversionWorkspaceRequest, dict]

The request object. Request message for 'ConvertConversionWorkspace' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConversionWorkspace The main conversion workspace resource entity.

create_connection_profile

create_connection_profile(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.CreateConnectionProfileRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    connection_profile: typing.Optional[
        google.cloud.clouddms_v1.types.clouddms_resources.ConnectionProfile
    ] = None,
    connection_profile_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Creates a new connection profile in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_create_connection_profile():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    connection_profile = clouddms_v1.ConnectionProfile()
    connection_profile.mysql.host = "host_value"
    connection_profile.mysql.port = 453
    connection_profile.mysql.username = "username_value"
    connection_profile.mysql.password = "password_value"

    request = clouddms_v1.CreateConnectionProfileRequest(
        parent="parent_value",
        connection_profile_id="connection_profile_id_value",
        connection_profile=connection_profile,
    )

    # Make the request
    operation = client.create_connection_profile(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.CreateConnectionProfileRequest, dict]

The request object. Request message for 'CreateConnectionProfile' request.

parent str

Required. The parent which owns this collection of connection profiles. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

connection_profile google.cloud.clouddms_v1.types.ConnectionProfile

Required. The create request body including the connection profile data This corresponds to the connection_profile field on the request instance; if request is provided, this should not be set.

connection_profile_id str

Required. The connection profile identifier. This corresponds to the connection_profile_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConnectionProfile A connection profile definition.

create_conversion_workspace

create_conversion_workspace(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.CreateConversionWorkspaceRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    conversion_workspace: typing.Optional[
        google.cloud.clouddms_v1.types.conversionworkspace_resources.ConversionWorkspace
    ] = None,
    conversion_workspace_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Creates a new conversion workspace in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_create_conversion_workspace():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    conversion_workspace = clouddms_v1.ConversionWorkspace()
    conversion_workspace.source.engine = "ORACLE"
    conversion_workspace.source.version = "version_value"
    conversion_workspace.destination.engine = "ORACLE"
    conversion_workspace.destination.version = "version_value"

    request = clouddms_v1.CreateConversionWorkspaceRequest(
        parent="parent_value",
        conversion_workspace_id="conversion_workspace_id_value",
        conversion_workspace=conversion_workspace,
    )

    # Make the request
    operation = client.create_conversion_workspace(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.CreateConversionWorkspaceRequest, dict]

The request object. Request message to create a new Conversion Workspace in the specified project and region.

parent str

Required. The parent which owns this collection of conversion workspaces. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

conversion_workspace google.cloud.clouddms_v1.types.ConversionWorkspace

Required. Represents a conversion workspace object. This corresponds to the conversion_workspace field on the request instance; if request is provided, this should not be set.

conversion_workspace_id str

Required. The ID of the conversion workspace to create. This corresponds to the conversion_workspace_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConversionWorkspace The main conversion workspace resource entity.

create_migration_job

create_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.CreateMigrationJobRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    migration_job: typing.Optional[
        google.cloud.clouddms_v1.types.clouddms_resources.MigrationJob
    ] = None,
    migration_job_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

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

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_create_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    migration_job = clouddms_v1.MigrationJob()
    migration_job.reverse_ssh_connectivity.vm_ip = "vm_ip_value"
    migration_job.reverse_ssh_connectivity.vm_port = 775
    migration_job.type_ = "CONTINUOUS"
    migration_job.source = "source_value"
    migration_job.destination = "destination_value"

    request = clouddms_v1.CreateMigrationJobRequest(
        parent="parent_value",
        migration_job_id="migration_job_id_value",
        migration_job=migration_job,
    )

    # Make the request
    operation = client.create_migration_job(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.CreateMigrationJobRequest, dict]

The request object. Request message to create a new Database Migration Service migration job in the specified project and region.

parent str

Required. The parent which owns this collection of migration jobs. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

migration_job google.cloud.clouddms_v1.types.MigrationJob

Required. Represents a migration job https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs__ object. This corresponds to the migration_job field on the request instance; if request is provided, this should not be set.

migration_job_id str

Required. The ID of the instance to create. This corresponds to the migration_job_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be MigrationJob Represents a Database Migration Service migration job object.

create_private_connection

create_private_connection(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.CreatePrivateConnectionRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    private_connection: typing.Optional[
        google.cloud.clouddms_v1.types.clouddms_resources.PrivateConnection
    ] = None,
    private_connection_id: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Creates a new private connection in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_create_private_connection():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    private_connection = clouddms_v1.PrivateConnection()
    private_connection.vpc_peering_config.vpc_name = "vpc_name_value"
    private_connection.vpc_peering_config.subnet = "subnet_value"

    request = clouddms_v1.CreatePrivateConnectionRequest(
        parent="parent_value",
        private_connection_id="private_connection_id_value",
        private_connection=private_connection,
    )

    # Make the request
    operation = client.create_private_connection(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.CreatePrivateConnectionRequest, dict]

The request object. Request message to create a new private connection in the specified project and region.

parent str

Required. The parent that owns the collection of PrivateConnections. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

private_connection google.cloud.clouddms_v1.types.PrivateConnection

Required. The private connection resource to create. This corresponds to the private_connection field on the request instance; if request is provided, this should not be set.

private_connection_id str

Required. The private connection identifier. This corresponds to the private_connection_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be PrivateConnection The PrivateConnection resource is used to establish private connectivity with the customer's network.

delete_connection_profile

delete_connection_profile(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.DeleteConnectionProfileRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_delete_connection_profile():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.DeleteConnectionProfileRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_connection_profile(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.DeleteConnectionProfileRequest, dict]

The request object. Request message for 'DeleteConnectionProfile' request.

name str

Required. Name of the connection profile resource to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_conversion_workspace

delete_conversion_workspace(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.DeleteConversionWorkspaceRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Deletes a single conversion workspace.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_delete_conversion_workspace():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.DeleteConversionWorkspaceRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_conversion_workspace(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.DeleteConversionWorkspaceRequest, dict]

The request object. Request message for 'DeleteConversionWorkspace' request.

name str

Required. Name of the conversion workspace resource to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_migration_job

delete_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.DeleteMigrationJobRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Deletes a single migration job.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_delete_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.DeleteMigrationJobRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_migration_job(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.DeleteMigrationJobRequest, dict]

The request object. Request message for 'DeleteMigrationJob' request.

name str

Required. Name of the migration job resource to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_operation

delete_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.DeleteOperationRequest
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
request .operations_pb2.DeleteOperationRequest

The request object. Request message for DeleteOperation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

delete_private_connection

delete_private_connection(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.DeletePrivateConnectionRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Deletes a single Database Migration Service private connection.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_delete_private_connection():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.DeletePrivateConnectionRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_private_connection(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.DeletePrivateConnectionRequest, dict]

The request object. Request message to delete a private connection.

name str

Required. The name of the private connection to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

describe_conversion_workspace_revisions

describe_conversion_workspace_revisions(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.DescribeConversionWorkspaceRevisionsRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.clouddms_v1.types.clouddms.DescribeConversionWorkspaceRevisionsResponse
)

Retrieves a list of committed revisions of a specific conversion workspace.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_describe_conversion_workspace_revisions():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.DescribeConversionWorkspaceRevisionsRequest(
        conversion_workspace="conversion_workspace_value",
    )

    # Make the request
    response = client.describe_conversion_workspace_revisions(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.DescribeConversionWorkspaceRevisionsRequest, dict]

The request object. Request message for 'DescribeConversionWorkspaceRevisions' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.types.DescribeConversionWorkspaceRevisionsResponseResponse message for 'DescribeConversionWorkspaceRevisions' request.

describe_database_entities

describe_database_entities(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.DescribeDatabaseEntitiesRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.clouddms_v1.services.data_migration_service.pagers.DescribeDatabaseEntitiesPager
)

Describes the database entities tree for a specific conversion workspace and a specific tree type.

Database entities are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are simple data objects describing the structure of the client database.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_describe_database_entities():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.DescribeDatabaseEntitiesRequest(
        conversion_workspace="conversion_workspace_value",
    )

    # Make the request
    page_result = client.describe_database_entities(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.DescribeDatabaseEntitiesRequest, dict]

The request object. Request message for 'DescribeDatabaseEntities' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.services.data_migration_service.pagers.DescribeDatabaseEntitiesPagerResponse message for 'DescribeDatabaseEntities' request. Iterating over this object will yield results and resolve additional pages automatically.

fetch_static_ips

fetch_static_ips(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.FetchStaticIpsRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.clouddms_v1.services.data_migration_service.pagers.FetchStaticIpsPager
)

Fetches a set of static IP addresses that need to be allowlisted by the customer when using the static-IP connectivity method.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_fetch_static_ips():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.FetchStaticIpsRequest(
        name="name_value",
    )

    # Make the request
    page_result = client.fetch_static_ips(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.FetchStaticIpsRequest, dict]

The request object. Request message for 'FetchStaticIps' request.

name str

Required. The resource name for the location for which static IPs should be returned. Must be in the format projects//locations/. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.services.data_migration_service.pagers.FetchStaticIpsPagerResponse message for a 'FetchStaticIps' request. Iterating over this object will yield results and resolve additional pages automatically.

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
DataMigrationServiceClientThe constructed client.

from_service_account_info

from_service_account_info(info: dict, *args, **kwargs)

Creates an instance of this client using the provided credentials info.

Parameter
NameDescription
info dict

The service account private key info.

Returns
TypeDescription
DataMigrationServiceClientThe constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
DataMigrationServiceClientThe constructed client.

generate_ssh_script

generate_ssh_script(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.GenerateSshScriptRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.clouddms_v1.types.clouddms.SshScript

Generate a SSH configuration script to configure the reverse SSH connectivity.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_generate_ssh_script():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    vm_creation_config = clouddms_v1.VmCreationConfig()
    vm_creation_config.vm_machine_type = "vm_machine_type_value"

    request = clouddms_v1.GenerateSshScriptRequest(
        vm_creation_config=vm_creation_config,
        vm="vm_value",
    )

    # Make the request
    response = client.generate_ssh_script(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.GenerateSshScriptRequest, dict]

The request object. Request message for 'GenerateSshScript' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.types.SshScriptResponse message for 'GenerateSshScript' request.

get_connection_profile

get_connection_profile(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.GetConnectionProfileRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.clouddms_v1.types.clouddms_resources.ConnectionProfile

Gets details of a single connection profile.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_get_connection_profile():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.GetConnectionProfileRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_connection_profile(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.GetConnectionProfileRequest, dict]

The request object. Request message for 'GetConnectionProfile' request.

name str

Required. Name of the connection profile resource to get. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.types.ConnectionProfileA connection profile definition.

get_conversion_workspace

get_conversion_workspace(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.GetConversionWorkspaceRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.clouddms_v1.types.conversionworkspace_resources.ConversionWorkspace

Gets details of a single conversion workspace.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_get_conversion_workspace():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.GetConversionWorkspaceRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_conversion_workspace(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.GetConversionWorkspaceRequest, dict]

The request object. Request message for 'GetConversionWorkspace' request.

name str

Required. Name of the conversion workspace resource to get. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.types.ConversionWorkspaceThe main conversion workspace resource entity.

get_iam_policy

get_iam_policy(
    request: typing.Optional[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.policy_pb2.Policy

Gets the IAM access control policy for a function.

Returns an empty policy if the function exists and does not have a policy set.

Parameters
NameDescription
request .iam_policy_pb2.GetIamPolicyRequest

The request object. Request message for GetIamPolicy method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.policy_pb2.PolicyDefines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:mike@example.com="" -="" group:admins@example.com="" -="" domain:google.com="" -="" serviceaccount:my-project-id@appspot.gserviceaccount.com="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:eve@example.com="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __.

get_location

get_location(
    request: typing.Optional[
        google.cloud.location.locations_pb2.GetLocationRequest
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.Location

Gets information about a location.

Parameters
NameDescription
request .location_pb2.GetLocationRequest

The request object. Request message for GetLocation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.location_pb2.LocationLocation object.

get_migration_job

get_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.GetMigrationJobRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.clouddms_v1.types.clouddms_resources.MigrationJob

Gets details of a single migration job.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_get_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.GetMigrationJobRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_migration_job(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.GetMigrationJobRequest, dict]

The request object. Request message for 'GetMigrationJob' request.

name str

Required. Name of the migration job resource to get. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.types.MigrationJobRepresents a Database Migration Service migration job object.

get_mtls_endpoint_and_cert_source

get_mtls_endpoint_and_cert_source(
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
)

Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameter
NameDescription
client_options google.api_core.client_options.ClientOptions

Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Exceptions
TypeDescription
google.auth.exceptions.MutualTLSChannelErrorIf any errors happen.
Returns
TypeDescription
Tuple[str, Callable[[], Tuple[bytes, bytes]]]returns the API endpoint and the client cert source to use.

get_operation

get_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.GetOperationRequest
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.longrunning.operations_pb2.Operation

Gets the latest state of a long-running operation.

Parameters
NameDescription
request .operations_pb2.GetOperationRequest

The request object. Request message for GetOperation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.operations_pb2.OperationAn Operation object.

get_private_connection

get_private_connection(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.GetPrivateConnectionRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.clouddms_v1.types.clouddms_resources.PrivateConnection

Gets details of a single private connection.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_get_private_connection():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.GetPrivateConnectionRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_private_connection(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.GetPrivateConnectionRequest, dict]

The request object. Request message to get a private connection resource.

name str

Required. The name of the private connection to get. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.types.PrivateConnectionThe PrivateConnection resource is used to establish private connectivity with the customer's network.

import_mapping_rules

import_mapping_rules(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.ImportMappingRulesRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_import_mapping_rules():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.ImportMappingRulesRequest(
        parent="parent_value",
    )

    # Make the request
    operation = client.import_mapping_rules(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.ImportMappingRulesRequest, dict]

The request object. Request message for 'ImportMappingRules' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConversionWorkspace The main conversion workspace resource entity.

list_connection_profiles

list_connection_profiles(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.ListConnectionProfilesRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConnectionProfilesPager
)

Retrieves a list of all connection profiles in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_list_connection_profiles():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.ListConnectionProfilesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_connection_profiles(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.ListConnectionProfilesRequest, dict]

The request object. Request message for 'ListConnectionProfiles' request.

parent str

Required. The parent which owns this collection of connection profiles. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConnectionProfilesPagerResponse message for 'ListConnectionProfiles' request. Iterating over this object will yield results and resolve additional pages automatically.

list_conversion_workspaces

list_conversion_workspaces(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.ListConversionWorkspacesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConversionWorkspacesPager
)

Lists conversion workspaces in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_list_conversion_workspaces():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.ListConversionWorkspacesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_conversion_workspaces(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.ListConversionWorkspacesRequest, dict]

The request object. Retrieve a list of all conversion workspaces in a given project and location.

parent str

Required. The parent which owns this collection of conversion workspaces. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConversionWorkspacesPagerResponse message for 'ListConversionWorkspaces' request. Iterating over this object will yield results and resolve additional pages automatically.

list_locations

list_locations(
    request: typing.Optional[
        google.cloud.location.locations_pb2.ListLocationsRequest
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse

Lists information about the supported locations for this service.

Parameters
NameDescription
request .location_pb2.ListLocationsRequest

The request object. Request message for ListLocations method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.location_pb2.ListLocationsResponseResponse message for ListLocations method.

list_migration_jobs

list_migration_jobs(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.ListMigrationJobsRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMigrationJobsPager
)

Lists migration jobs in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_list_migration_jobs():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.ListMigrationJobsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_migration_jobs(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.ListMigrationJobsRequest, dict]

The request object. Retrieves a list of all migration jobs in a given project and location.

parent str

Required. The parent which owns this collection of migrationJobs. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMigrationJobsPagerResponse message for 'ListMigrationJobs' request. Iterating over this object will yield results and resolve additional pages automatically.

list_operations

list_operations(
    request: typing.Optional[
        google.longrunning.operations_pb2.ListOperationsRequest
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponse

Lists operations that match the specified filter in the request.

Parameters
NameDescription
request .operations_pb2.ListOperationsRequest

The request object. Request message for ListOperations method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.operations_pb2.ListOperationsResponseResponse message for ListOperations method.

list_private_connections

list_private_connections(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.ListPrivateConnectionsRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.clouddms_v1.services.data_migration_service.pagers.ListPrivateConnectionsPager
)

Retrieves a list of private connections in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_list_private_connections():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.ListPrivateConnectionsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_private_connections(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.ListPrivateConnectionsRequest, dict]

The request object. Request message to retrieve a list of private connections in a given project and location.

parent str

Required. The parent that owns the collection of private connections. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.services.data_migration_service.pagers.ListPrivateConnectionsPagerResponse message for 'ListPrivateConnections' request. Iterating over this object will yield results and resolve additional pages automatically.

migration_job_path

migration_job_path(project: str, location: str, migration_job: str) -> str

Returns a fully-qualified migration_job string.

networks_path

networks_path(project: str, network: str) -> str

Returns a fully-qualified networks string.

parse_common_billing_account_path

parse_common_billing_account_path(path: str) -> typing.Dict[str, str]

Parse a billing_account path into its component segments.

parse_common_folder_path

parse_common_folder_path(path: str) -> typing.Dict[str, str]

Parse a folder path into its component segments.

parse_common_location_path

parse_common_location_path(path: str) -> typing.Dict[str, str]

Parse a location path into its component segments.

parse_common_organization_path

parse_common_organization_path(path: str) -> typing.Dict[str, str]

Parse a organization path into its component segments.

parse_common_project_path

parse_common_project_path(path: str) -> typing.Dict[str, str]

Parse a project path into its component segments.

parse_connection_profile_path

parse_connection_profile_path(path: str) -> typing.Dict[str, str]

Parses a connection_profile path into its component segments.

parse_conversion_workspace_path

parse_conversion_workspace_path(path: str) -> typing.Dict[str, str]

Parses a conversion_workspace path into its component segments.

parse_migration_job_path

parse_migration_job_path(path: str) -> typing.Dict[str, str]

Parses a migration_job path into its component segments.

parse_networks_path

parse_networks_path(path: str) -> typing.Dict[str, str]

Parses a networks path into its component segments.

parse_private_connection_path

parse_private_connection_path(path: str) -> typing.Dict[str, str]

Parses a private_connection path into its component segments.

private_connection_path

private_connection_path(
    project: str, location: str, private_connection: str
) -> str

Returns a fully-qualified private_connection string.

promote_migration_job

promote_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.PromoteMigrationJobRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

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

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_promote_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.PromoteMigrationJobRequest(
    )

    # Make the request
    operation = client.promote_migration_job(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.PromoteMigrationJobRequest, dict]

The request object. Request message for 'PromoteMigrationJob' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be MigrationJob Represents a Database Migration Service migration job object.

restart_migration_job

restart_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.RestartMigrationJobRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

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

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_restart_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.RestartMigrationJobRequest(
    )

    # Make the request
    operation = client.restart_migration_job(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.RestartMigrationJobRequest, dict]

The request object. Request message for 'RestartMigrationJob' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be MigrationJob Represents a Database Migration Service migration job object.

resume_migration_job

resume_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.ResumeMigrationJobRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

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

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_resume_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.ResumeMigrationJobRequest(
    )

    # Make the request
    operation = client.resume_migration_job(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.ResumeMigrationJobRequest, dict]

The request object. Request message for 'ResumeMigrationJob' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be MigrationJob Represents a Database Migration Service migration job object.

rollback_conversion_workspace

rollback_conversion_workspace(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.RollbackConversionWorkspaceRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Rolls back a conversion workspace to the last committed snapshot.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_rollback_conversion_workspace():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.RollbackConversionWorkspaceRequest(
        name="name_value",
    )

    # Make the request
    operation = client.rollback_conversion_workspace(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.RollbackConversionWorkspaceRequest, dict]

The request object. Request message for 'RollbackConversionWorkspace' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConversionWorkspace The main conversion workspace resource entity.

search_background_jobs

search_background_jobs(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.SearchBackgroundJobsRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.clouddms_v1.types.clouddms.SearchBackgroundJobsResponse

Searches/lists the background jobs for a specific conversion workspace.

The background jobs are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are a way to expose the data plane jobs log.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_search_background_jobs():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.SearchBackgroundJobsRequest(
        conversion_workspace="conversion_workspace_value",
    )

    # Make the request
    response = client.search_background_jobs(request=request)

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.SearchBackgroundJobsRequest, dict]

The request object. Request message for 'SearchBackgroundJobs' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.cloud.clouddms_v1.types.SearchBackgroundJobsResponseResponse message for 'SearchBackgroundJobs' request.

seed_conversion_workspace

seed_conversion_workspace(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.SeedConversionWorkspaceRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Imports a snapshot of the source database into the conversion workspace.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_seed_conversion_workspace():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.SeedConversionWorkspaceRequest(
        source_connection_profile="source_connection_profile_value",
    )

    # Make the request
    operation = client.seed_conversion_workspace(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.SeedConversionWorkspaceRequest, dict]

The request object. Request message for 'SeedConversionWorkspace' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConversionWorkspace The main conversion workspace resource entity.

set_iam_policy

set_iam_policy(
    request: typing.Optional[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.policy_pb2.Policy

Sets the IAM access control policy on the specified function.

Replaces any existing policy.

Parameters
NameDescription
request .iam_policy_pb2.SetIamPolicyRequest

The request object. Request message for SetIamPolicy method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.policy_pb2.PolicyDefines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:mike@example.com="" -="" group:admins@example.com="" -="" domain:google.com="" -="" serviceaccount:my-project-id@appspot.gserviceaccount.com="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:eve@example.com="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __.

start_migration_job

start_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.StartMigrationJobRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Start an already created migration job.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_start_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.StartMigrationJobRequest(
    )

    # Make the request
    operation = client.start_migration_job(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.StartMigrationJobRequest, dict]

The request object. Request message for 'StartMigrationJob' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be MigrationJob Represents a Database Migration Service migration job object.

stop_migration_job

stop_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.StopMigrationJobRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Stops a running migration job.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_stop_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.StopMigrationJobRequest(
    )

    # Make the request
    operation = client.stop_migration_job(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.StopMigrationJobRequest, dict]

The request object. Request message for 'StopMigrationJob' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be MigrationJob Represents a Database Migration Service migration job object.

test_iam_permissions

test_iam_permissions(
    request: typing.Optional[
        google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse

Tests the specified IAM permissions against the IAM access control policy for a function.

If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Parameters
NameDescription
request .iam_policy_pb2.TestIamPermissionsRequest

The request object. Request message for TestIamPermissions method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.iam_policy_pb2.TestIamPermissionsResponseResponse message for TestIamPermissions method.

update_connection_profile

update_connection_profile(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.UpdateConnectionProfileRequest, dict
        ]
    ] = None,
    *,
    connection_profile: typing.Optional[
        google.cloud.clouddms_v1.types.clouddms_resources.ConnectionProfile
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Update the configuration of a single connection profile.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_update_connection_profile():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    connection_profile = clouddms_v1.ConnectionProfile()
    connection_profile.mysql.host = "host_value"
    connection_profile.mysql.port = 453
    connection_profile.mysql.username = "username_value"
    connection_profile.mysql.password = "password_value"

    request = clouddms_v1.UpdateConnectionProfileRequest(
        connection_profile=connection_profile,
    )

    # Make the request
    operation = client.update_connection_profile(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.UpdateConnectionProfileRequest, dict]

The request object. Request message for 'UpdateConnectionProfile' request.

connection_profile google.cloud.clouddms_v1.types.ConnectionProfile

Required. The connection profile parameters to update. This corresponds to the connection_profile field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConnectionProfile A connection profile definition.

update_conversion_workspace

update_conversion_workspace(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.UpdateConversionWorkspaceRequest,
            dict,
        ]
    ] = None,
    *,
    conversion_workspace: typing.Optional[
        google.cloud.clouddms_v1.types.conversionworkspace_resources.ConversionWorkspace
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Updates the parameters of a single conversion workspace.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_update_conversion_workspace():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    conversion_workspace = clouddms_v1.ConversionWorkspace()
    conversion_workspace.source.engine = "ORACLE"
    conversion_workspace.source.version = "version_value"
    conversion_workspace.destination.engine = "ORACLE"
    conversion_workspace.destination.version = "version_value"

    request = clouddms_v1.UpdateConversionWorkspaceRequest(
        conversion_workspace=conversion_workspace,
    )

    # Make the request
    operation = client.update_conversion_workspace(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.UpdateConversionWorkspaceRequest, dict]

The request object. Request message for 'UpdateConversionWorkspace' request.

conversion_workspace google.cloud.clouddms_v1.types.ConversionWorkspace

Required. The conversion workspace parameters to update. This corresponds to the conversion_workspace field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be ConversionWorkspace The main conversion workspace resource entity.

update_migration_job

update_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.UpdateMigrationJobRequest, dict
        ]
    ] = None,
    *,
    migration_job: typing.Optional[
        google.cloud.clouddms_v1.types.clouddms_resources.MigrationJob
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Updates the parameters of a single migration job.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_update_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    migration_job = clouddms_v1.MigrationJob()
    migration_job.reverse_ssh_connectivity.vm_ip = "vm_ip_value"
    migration_job.reverse_ssh_connectivity.vm_port = 775
    migration_job.type_ = "CONTINUOUS"
    migration_job.source = "source_value"
    migration_job.destination = "destination_value"

    request = clouddms_v1.UpdateMigrationJobRequest(
        migration_job=migration_job,
    )

    # Make the request
    operation = client.update_migration_job(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.UpdateMigrationJobRequest, dict]

The request object. Request message for 'UpdateMigrationJob' request.

migration_job google.cloud.clouddms_v1.types.MigrationJob

Required. The migration job parameters to update. This corresponds to the migration_job field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be MigrationJob Represents a Database Migration Service migration job object.

verify_migration_job

verify_migration_job(
    request: typing.Optional[
        typing.Union[
            google.cloud.clouddms_v1.types.clouddms.VerifyMigrationJobRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Union[
        google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

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

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import clouddms_v1

def sample_verify_migration_job():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.VerifyMigrationJobRequest(
    )

    # Make the request
    operation = client.verify_migration_job(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
NameDescription
request Union[google.cloud.clouddms_v1.types.VerifyMigrationJobRequest, dict]

The request object. Request message for 'VerifyMigrationJob' request.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be MigrationJob Represents a Database Migration Service migration job object.