As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

DataMigrationService

class google.cloud.clouddms_v1.services.data_migration_service.DataMigrationServiceAsyncClient(*, 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, typing.Callable[[...], google.cloud.clouddms_v1.services.data_migration_service.transports.base.DataMigrationServiceTransport]]] = 'grpc_asyncio', client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

Database Migration service

Instantiates the data migration service async client.

Parameters
  • 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 (Optional[Union[str,DataMigrationServiceTransport,Callable[..., DataMigrationServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the DataMigrationServiceTransport constructor. 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.

    1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “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).

    2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide a client certificate for mTLS 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.

    3. The universe_domain property can be used to override the default “googleapis.com” universe. Note that api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

  • 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.

Raises

google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.

property api_endpoint

Return the API endpoint used by the client instance.

Returns

The API endpoint used by the client instance.

Return type

str

async apply_conversion_workspace(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ApplyConversionWorkspaceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.ApplyConversionWorkspaceRequest, dict]]) – The request object. Request message for ‘ApplyConversionWorkspace’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation_async.AsyncOperation

async cancel_operation(request: Optional[google.longrunning.operations_pb2.CancelOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

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
  • request (CancelOperationRequest) – The request object. Request message for CancelOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

None

async commit_conversion_workspace(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.CommitConversionWorkspaceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.CommitConversionWorkspaceRequest, dict]]) – The request object. Request message for ‘CommitConversionWorkspace’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation_async.AsyncOperation

static common_billing_account_path(billing_account: str) str

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str) str

Returns a fully-qualified folder string.

static common_location_path(project: str, location: str) str

Returns a fully-qualified location string.

static common_organization_path(organization: str) str

Returns a fully-qualified organization string.

static common_project_path(project: str) str

Returns a fully-qualified project string.

static connection_profile_path(project: str, location: str, connection_profile: str) str

Returns a fully-qualified connection_profile string.

static conversion_workspace_path(project: str, location: str, conversion_workspace: str) str

Returns a fully-qualified conversion_workspace string.

async convert_conversion_workspace(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ConvertConversionWorkspaceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.ConvertConversionWorkspaceRequest, dict]]) – The request object. Request message for ‘ConvertConversionWorkspace’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation_async.AsyncOperation

async create_connection_profile(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.CreateConnectionProfileRequest, dict]] = None, *, parent: Optional[str] = None, connection_profile: Optional[google.cloud.clouddms_v1.types.clouddms_resources.ConnectionProfile] = None, connection_profile_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConnectionProfile A connection profile definition.

Return type

google.api_core.operation_async.AsyncOperation

async create_conversion_workspace(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.CreateConversionWorkspaceRequest, dict]] = None, *, parent: Optional[str] = None, conversion_workspace: Optional[google.cloud.clouddms_v1.types.conversionworkspace_resources.ConversionWorkspace] = None, conversion_workspace_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation_async.AsyncOperation

async create_mapping_rule(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.CreateMappingRuleRequest, dict]] = None, *, parent: Optional[str] = None, mapping_rule: Optional[google.cloud.clouddms_v1.types.conversionworkspace_resources.MappingRule] = None, mapping_rule_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.types.conversionworkspace_resources.MappingRule[source]

Creates a new mapping rule for a given 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

async def sample_create_mapping_rule():
    # Create a client
    client = clouddms_v1.DataMigrationServiceAsyncClient()

    # Initialize request argument(s)
    mapping_rule = clouddms_v1.MappingRule()
    mapping_rule.single_entity_rename.new_name = "new_name_value"
    mapping_rule.rule_scope = "DATABASE_ENTITY_TYPE_DATABASE"
    mapping_rule.rule_order = 1075

    request = clouddms_v1.CreateMappingRuleRequest(
        parent="parent_value",
        mapping_rule_id="mapping_rule_id_value",
        mapping_rule=mapping_rule,
    )

    # Make the request
    response = await client.create_mapping_rule(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.CreateMappingRuleRequest, dict]]) – The request object. Request message for ‘CreateMappingRule’ command.

  • parent (str) –

    Required. The parent which owns this collection of mapping rules.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • mapping_rule (google.cloud.clouddms_v1.types.MappingRule) –

    Required. Represents a [mapping rule] (https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.mappingRules) object.

    This corresponds to the mapping_rule field on the request instance; if request is provided, this should not be set.

  • mapping_rule_id (str) –

    Required. The ID of the rule to create.

    This corresponds to the mapping_rule_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Definition of a transformation that is to be applied to a group of entities in the source schema. Several such transformations can be applied to an entity sequentially to define the corresponding entity in the target schema.

Return type

google.cloud.clouddms_v1.types.MappingRule

async create_migration_job(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.CreateMigrationJobRequest, dict]] = None, *, parent: Optional[str] = None, migration_job: Optional[google.cloud.clouddms_v1.types.clouddms_resources.MigrationJob] = None, migration_job_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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 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_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation_async.AsyncOperation

async create_private_connection(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.CreatePrivateConnectionRequest, dict]] = None, *, parent: Optional[str] = None, private_connection: Optional[google.cloud.clouddms_v1.types.clouddms_resources.PrivateConnection] = None, private_connection_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.PrivateConnection The PrivateConnection resource is used to establish private connectivity

with the customer’s network.

Return type

google.api_core.operation_async.AsyncOperation

async delete_connection_profile(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.DeleteConnectionProfileRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An 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);

}

Return type

google.api_core.operation_async.AsyncOperation

async delete_conversion_workspace(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.DeleteConversionWorkspaceRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An 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);

}

Return type

google.api_core.operation_async.AsyncOperation

async delete_mapping_rule(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.DeleteMappingRuleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a single mapping rule.

# 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

async def sample_delete_mapping_rule():
    # Create a client
    client = clouddms_v1.DataMigrationServiceAsyncClient()

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

    # Make the request
    await client.delete_mapping_rule(request=request)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.DeleteMappingRuleRequest, dict]]) – The request object. Request message for ‘DeleteMappingRule’ request.

  • name (str) –

    Required. Name of the mapping rule 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_async.AsyncRetry) – 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.

async delete_migration_job(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.DeleteMigrationJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An 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);

}

Return type

google.api_core.operation_async.AsyncOperation

async delete_operation(request: Optional[google.longrunning.operations_pb2.DeleteOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

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
  • request (DeleteOperationRequest) – The request object. Request message for DeleteOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

None

async delete_private_connection(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.DeletePrivateConnectionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An 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);

}

Return type

google.api_core.operation_async.AsyncOperation

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

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

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

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

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

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.DescribeConversionWorkspaceRevisionsRequest, dict]]) – The request object. Request message for ‘DescribeConversionWorkspaceRevisions’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for ‘DescribeConversionWorkspaceRevisions’ request.

Return type

google.cloud.clouddms_v1.types.DescribeConversionWorkspaceRevisionsResponse

async describe_database_entities(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.DescribeDatabaseEntitiesRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.services.data_migration_service.pagers.DescribeDatabaseEntitiesAsyncPager[source]

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

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

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

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.DescribeDatabaseEntitiesRequest, dict]]) – The request object. Request message for ‘DescribeDatabaseEntities’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for ‘DescribeDatabaseEntities’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.DescribeDatabaseEntitiesAsyncPager

async fetch_static_ips(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.FetchStaticIpsRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.services.data_migration_service.pagers.FetchStaticIpsAsyncPager[source]

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

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

    # 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
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

Response message for a ‘FetchStaticIps’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.FetchStaticIpsAsyncPager

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DataMigrationServiceAsyncClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DataMigrationServiceAsyncClient

classmethod from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DataMigrationServiceAsyncClient

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

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

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

    # 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 = await client.generate_ssh_script(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.GenerateSshScriptRequest, dict]]) – The request object. Request message for ‘GenerateSshScript’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for ‘GenerateSshScript’ request.

Return type

google.cloud.clouddms_v1.types.SshScript

async generate_tcp_proxy_script(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.GenerateTcpProxyScriptRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.types.clouddms.TcpProxyScript[source]

Generate a TCP Proxy configuration script to configure a cloud-hosted VM running a TCP Proxy.

# 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

async def sample_generate_tcp_proxy_script():
    # Create a client
    client = clouddms_v1.DataMigrationServiceAsyncClient()

    # Initialize request argument(s)
    request = clouddms_v1.GenerateTcpProxyScriptRequest(
        vm_name="vm_name_value",
        vm_machine_type="vm_machine_type_value",
        vm_subnet="vm_subnet_value",
    )

    # Make the request
    response = await client.generate_tcp_proxy_script(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.GenerateTcpProxyScriptRequest, dict]]) – The request object. Request message for ‘GenerateTcpProxyScript’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for ‘GenerateTcpProxyScript’ request.

Return type

google.cloud.clouddms_v1.types.TcpProxyScript

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

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

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

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

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

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

A connection profile definition.

Return type

google.cloud.clouddms_v1.types.ConnectionProfile

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

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

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

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

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

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

The main conversion workspace resource entity.

Return type

google.cloud.clouddms_v1.types.ConversionWorkspace

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

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
  • request (GetIamPolicyRequest) – The request object. Request message for GetIamPolicy method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Defines 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.

Return type

Policy

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

Gets information about a location.

Parameters
  • request (GetLocationRequest) – The request object. Request message for GetLocation method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Location object.

Return type

Location

async get_mapping_rule(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.GetMappingRuleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.types.conversionworkspace_resources.MappingRule[source]

Gets the details of a mapping rule.

# 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

async def sample_get_mapping_rule():
    # Create a client
    client = clouddms_v1.DataMigrationServiceAsyncClient()

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

    # Make the request
    response = await client.get_mapping_rule(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.GetMappingRuleRequest, dict]]) – The request object. Request message for ‘GetMappingRule’ request.

  • name (str) –

    Required. Name of the mapping rule resource to get. Example: conversionWorkspaces/123/mappingRules/rule123

    In order to retrieve a previous revision of the mapping rule, also provide the revision ID. Example:

    conversionWorkspace/123/mappingRules/rule123@c7cfa2a8c7cfa2a8c7cfa2a8c7cfa2a8

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Definition of a transformation that is to be applied to a group of entities in the source schema. Several such transformations can be applied to an entity sequentially to define the corresponding entity in the target schema.

Return type

google.cloud.clouddms_v1.types.MappingRule

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

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

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

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

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

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

Represents a Database Migration Service migration job object.

Return type

google.cloud.clouddms_v1.types.MigrationJob

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]

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.

Parameters

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.

Returns

returns the API endpoint and the

client cert source to use.

Return type

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

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

Gets the latest state of a long-running operation.

Parameters
  • request (GetOperationRequest) – The request object. Request message for GetOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An Operation object.

Return type

Operation

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

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

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

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

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

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

The PrivateConnection resource is used to establish private connectivity with the customer’s network.

Return type

google.cloud.clouddms_v1.types.PrivateConnection

classmethod get_transport_class(label: Optional[str] = None) Type[google.cloud.clouddms_v1.services.data_migration_service.transports.base.DataMigrationServiceTransport]

Returns an appropriate transport class.

Parameters

label – The name of the desired transport. If none is provided, then the first transport in the registry is used.

Returns

The transport class to use.

async import_mapping_rules(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ImportMappingRulesRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # Initialize request argument(s)
    rules_files = clouddms_v1.RulesFile()
    rules_files.rules_source_filename = "rules_source_filename_value"
    rules_files.rules_content = "rules_content_value"

    request = clouddms_v1.ImportMappingRulesRequest(
        parent="parent_value",
        rules_format="IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE",
        rules_files=rules_files,
        auto_commit=True,
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.ImportMappingRulesRequest, dict]]) – The request object. Request message for ‘ImportMappingRules’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation_async.AsyncOperation

async list_connection_profiles(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ListConnectionProfilesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConnectionProfilesAsyncPager[source]

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

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

    # 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
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

Response message for ‘ListConnectionProfiles’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConnectionProfilesAsyncPager

async list_conversion_workspaces(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ListConversionWorkspacesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConversionWorkspacesAsyncPager[source]

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

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

    # 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
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

Response message for ‘ListConversionWorkspaces’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConversionWorkspacesAsyncPager

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

Lists information about the supported locations for this service.

Parameters
  • request (ListLocationsRequest) – The request object. Request message for ListLocations method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for ListLocations method.

Return type

ListLocationsResponse

async list_mapping_rules(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ListMappingRulesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMappingRulesAsyncPager[source]

Lists the mapping rules for 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

async def sample_list_mapping_rules():
    # Create a client
    client = clouddms_v1.DataMigrationServiceAsyncClient()

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

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.ListMappingRulesRequest, dict]]) – The request object. Retrieve a list of all mapping rules in a given conversion workspace.

  • parent (str) –

    Required. Name of the conversion workspace resource whose mapping rules are listed in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for ‘ListMappingRulesRequest’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMappingRulesAsyncPager

async list_migration_jobs(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ListMigrationJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMigrationJobsAsyncPager[source]

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

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

    # 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
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

Response message for ‘ListMigrationJobs’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMigrationJobsAsyncPager

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

Lists operations that match the specified filter in the request.

Parameters
  • request (ListOperationsRequest) – The request object. Request message for ListOperations method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for ListOperations method.

Return type

ListOperationsResponse

async list_private_connections(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ListPrivateConnectionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.services.data_migration_service.pagers.ListPrivateConnectionsAsyncPager[source]

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

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

    # 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
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

Response message for ‘ListPrivateConnections’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListPrivateConnectionsAsyncPager

static mapping_rule_path(project: str, location: str, conversion_workspace: str, mapping_rule: str) str

Returns a fully-qualified mapping_rule string.

static migration_job_path(project: str, location: str, migration_job: str) str

Returns a fully-qualified migration_job string.

static networks_path(project: str, network: str) str

Returns a fully-qualified networks string.

static parse_common_billing_account_path(path: str) Dict[str, str]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) Dict[str, str]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) Dict[str, str]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) Dict[str, str]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) Dict[str, str]

Parse a project path into its component segments.

static parse_connection_profile_path(path: str) Dict[str, str]

Parses a connection_profile path into its component segments.

static parse_conversion_workspace_path(path: str) Dict[str, str]

Parses a conversion_workspace path into its component segments.

static parse_mapping_rule_path(path: str) Dict[str, str]

Parses a mapping_rule path into its component segments.

static parse_migration_job_path(path: str) Dict[str, str]

Parses a migration_job path into its component segments.

static parse_networks_path(path: str) Dict[str, str]

Parses a networks path into its component segments.

static parse_private_connection_path(path: str) Dict[str, str]

Parses a private_connection path into its component segments.

static private_connection_path(project: str, location: str, private_connection: str) str

Returns a fully-qualified private_connection string.

async promote_migration_job(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.PromoteMigrationJobRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.PromoteMigrationJobRequest, dict]]) – The request object. Request message for ‘PromoteMigrationJob’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation_async.AsyncOperation

async restart_migration_job(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.RestartMigrationJobRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.RestartMigrationJobRequest, dict]]) – The request object. Request message for ‘RestartMigrationJob’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation_async.AsyncOperation

async resume_migration_job(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ResumeMigrationJobRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.ResumeMigrationJobRequest, dict]]) – The request object. Request message for ‘ResumeMigrationJob’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation_async.AsyncOperation

async rollback_conversion_workspace(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.RollbackConversionWorkspaceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.RollbackConversionWorkspaceRequest, dict]]) – The request object. Request message for ‘RollbackConversionWorkspace’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation_async.AsyncOperation

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

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

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

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

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

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.SearchBackgroundJobsRequest, dict]]) – The request object. Request message for ‘SearchBackgroundJobs’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for ‘SearchBackgroundJobs’ request.

Return type

google.cloud.clouddms_v1.types.SearchBackgroundJobsResponse

async seed_conversion_workspace(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.SeedConversionWorkspaceRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.SeedConversionWorkspaceRequest, dict]]) – The request object. Request message for ‘SeedConversionWorkspace’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation_async.AsyncOperation

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

Sets the IAM access control policy on the specified function.

Replaces any existing policy.

Parameters
  • request (SetIamPolicyRequest) – The request object. Request message for SetIamPolicy method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Defines 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.

Return type

Policy

async start_migration_job(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.StartMigrationJobRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.StartMigrationJobRequest, dict]]) – The request object. Request message for ‘StartMigrationJob’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation_async.AsyncOperation

async stop_migration_job(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.StopMigrationJobRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.StopMigrationJobRequest, dict]]) – The request object. Request message for ‘StopMigrationJob’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation_async.AsyncOperation

async test_iam_permissions(request: Optional[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse[source]
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
  • request (TestIamPermissionsRequest) – The request object. Request message for TestIamPermissions method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for TestIamPermissions method.

Return type

TestIamPermissionsResponse

property transport: google.cloud.clouddms_v1.services.data_migration_service.transports.base.DataMigrationServiceTransport

Returns the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

DataMigrationServiceTransport

property universe_domain: str

Return the universe domain used by the client instance.

Returns

The universe domain used

by the client instance.

Return type

str

async update_connection_profile(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.UpdateConnectionProfileRequest, dict]] = None, *, connection_profile: Optional[google.cloud.clouddms_v1.types.clouddms_resources.ConnectionProfile] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConnectionProfile A connection profile definition.

Return type

google.api_core.operation_async.AsyncOperation

async update_conversion_workspace(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.UpdateConversionWorkspaceRequest, dict]] = None, *, conversion_workspace: Optional[google.cloud.clouddms_v1.types.conversionworkspace_resources.ConversionWorkspace] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation_async.AsyncOperation

async update_migration_job(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.UpdateMigrationJobRequest, dict]] = None, *, migration_job: Optional[google.cloud.clouddms_v1.types.clouddms_resources.MigrationJob] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[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_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation_async.AsyncOperation

async verify_migration_job(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.VerifyMigrationJobRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

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

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

    # 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 = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.clouddms_v1.types.VerifyMigrationJobRequest, dict]]) – The request object. Request message for ‘VerifyMigrationJob’ request.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation_async.AsyncOperation

class google.cloud.clouddms_v1.services.data_migration_service.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, typing.Callable[[...], 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>)[source]

Database Migration service

Instantiates the data migration service client.

Parameters
  • 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 (Optional[Union[str,DataMigrationServiceTransport,Callable[..., DataMigrationServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the DataMigrationServiceTransport constructor. 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.

    1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “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).

    2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide a client certificate for mTLS 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.

    3. The universe_domain property can be used to override the default “googleapis.com” universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

  • 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.

Raises

google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.

__exit__(type, value, traceback)[source]

Releases underlying transport’s resources.

Warning

ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!

property api_endpoint

Return the API endpoint used by the client instance.

Returns

The API endpoint used by the client instance.

Return type

str

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation.Operation

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

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
  • request (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.

Returns

None

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation.Operation

static common_billing_account_path(billing_account: str) str[source]

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str) str[source]

Returns a fully-qualified folder string.

static common_location_path(project: str, location: str) str[source]

Returns a fully-qualified location string.

static common_organization_path(organization: str) str[source]

Returns a fully-qualified organization string.

static common_project_path(project: str) str[source]

Returns a fully-qualified project string.

static connection_profile_path(project: str, location: str, connection_profile: str) str[source]

Returns a fully-qualified connection_profile string.

static conversion_workspace_path(project: str, location: str, conversion_workspace: str) str[source]

Returns a fully-qualified conversion_workspace string.

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation.Operation

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

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
  • 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConnectionProfile A connection profile definition.

Return type

google.api_core.operation.Operation

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

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
  • 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation.Operation

create_mapping_rule(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.CreateMappingRuleRequest, dict]] = None, *, parent: Optional[str] = None, mapping_rule: Optional[google.cloud.clouddms_v1.types.conversionworkspace_resources.MappingRule] = None, mapping_rule_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.types.conversionworkspace_resources.MappingRule[source]

Creates a new mapping rule for a given 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_create_mapping_rule():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    mapping_rule = clouddms_v1.MappingRule()
    mapping_rule.single_entity_rename.new_name = "new_name_value"
    mapping_rule.rule_scope = "DATABASE_ENTITY_TYPE_DATABASE"
    mapping_rule.rule_order = 1075

    request = clouddms_v1.CreateMappingRuleRequest(
        parent="parent_value",
        mapping_rule_id="mapping_rule_id_value",
        mapping_rule=mapping_rule,
    )

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

    # Handle the response
    print(response)
Parameters
Returns

Definition of a transformation that is to be applied to a group of entities in the source schema. Several such transformations can be applied to an entity sequentially to define the corresponding entity in the target schema.

Return type

google.cloud.clouddms_v1.types.MappingRule

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

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
  • 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 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation.Operation

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

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
  • 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.PrivateConnection The PrivateConnection resource is used to establish private connectivity

with the customer’s network.

Return type

google.api_core.operation.Operation

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

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
  • 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

An 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);

}

Return type

google.api_core.operation.Operation

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

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
  • 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

An 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);

}

Return type

google.api_core.operation.Operation

delete_mapping_rule(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.DeleteMappingRuleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a single mapping rule.

# 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_mapping_rule():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

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

    # Make the request
    client.delete_mapping_rule(request=request)
Parameters
  • request (Union[google.cloud.clouddms_v1.types.DeleteMappingRuleRequest, dict]) – The request object. Request message for ‘DeleteMappingRule’ request.

  • name (str) –

    Required. Name of the mapping rule 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.

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

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
  • 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

An 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);

}

Return type

google.api_core.operation.Operation

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

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
  • request (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.

Returns

None

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

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
  • 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

An 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);

}

Return type

google.api_core.operation.Operation

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

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
Returns

Response message for ‘DescribeConversionWorkspaceRevisions’ request.

Return type

google.cloud.clouddms_v1.types.DescribeConversionWorkspaceRevisionsResponse

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

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",
        tree="DESTINATION_TREE",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Returns

Response message for ‘DescribeDatabaseEntities’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.DescribeDatabaseEntitiesPager

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

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
  • 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

Response message for a ‘FetchStaticIps’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.FetchStaticIpsPager

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DataMigrationServiceClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DataMigrationServiceClient

classmethod from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DataMigrationServiceClient

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

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
Returns

Response message for ‘GenerateSshScript’ request.

Return type

google.cloud.clouddms_v1.types.SshScript

generate_tcp_proxy_script(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.GenerateTcpProxyScriptRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.types.clouddms.TcpProxyScript[source]

Generate a TCP Proxy configuration script to configure a cloud-hosted VM running a TCP Proxy.

# 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_tcp_proxy_script():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

    # Initialize request argument(s)
    request = clouddms_v1.GenerateTcpProxyScriptRequest(
        vm_name="vm_name_value",
        vm_machine_type="vm_machine_type_value",
        vm_subnet="vm_subnet_value",
    )

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

    # Handle the response
    print(response)
Parameters
Returns

Response message for ‘GenerateTcpProxyScript’ request.

Return type

google.cloud.clouddms_v1.types.TcpProxyScript

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

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
  • 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

A connection profile definition.

Return type

google.cloud.clouddms_v1.types.ConnectionProfile

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

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
  • 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

The main conversion workspace resource entity.

Return type

google.cloud.clouddms_v1.types.ConversionWorkspace

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

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
  • request (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

Defines 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.

Return type

Policy

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

Gets information about a location.

Parameters
  • request (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

Location object.

Return type

Location

get_mapping_rule(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.GetMappingRuleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.types.conversionworkspace_resources.MappingRule[source]

Gets the details of a mapping rule.

# 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_mapping_rule():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

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

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

    # Handle the response
    print(response)
Parameters
Returns

Definition of a transformation that is to be applied to a group of entities in the source schema. Several such transformations can be applied to an entity sequentially to define the corresponding entity in the target schema.

Return type

google.cloud.clouddms_v1.types.MappingRule

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

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
  • 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

Represents a Database Migration Service migration job object.

Return type

google.cloud.clouddms_v1.types.MigrationJob

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]

Deprecated. 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.

Parameters

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.

Returns

returns the API endpoint and the

client cert source to use.

Return type

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

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

Gets the latest state of a long-running operation.

Parameters
  • request (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

An Operation object.

Return type

Operation

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

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
  • 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

The PrivateConnection resource is used to establish private connectivity with the customer’s network.

Return type

google.cloud.clouddms_v1.types.PrivateConnection

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

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)
    rules_files = clouddms_v1.RulesFile()
    rules_files.rules_source_filename = "rules_source_filename_value"
    rules_files.rules_content = "rules_content_value"

    request = clouddms_v1.ImportMappingRulesRequest(
        parent="parent_value",
        rules_format="IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE",
        rules_files=rules_files,
        auto_commit=True,
    )

    # 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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation.Operation

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

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
  • 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

Response message for ‘ListConnectionProfiles’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConnectionProfilesPager

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

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
  • 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

Response message for ‘ListConversionWorkspaces’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConversionWorkspacesPager

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

Lists information about the supported locations for this service.

Parameters
  • request (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

Response message for ListLocations method.

Return type

ListLocationsResponse

list_mapping_rules(request: Optional[Union[google.cloud.clouddms_v1.types.clouddms.ListMappingRulesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMappingRulesPager[source]

Lists the mapping rules for 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_list_mapping_rules():
    # Create a client
    client = clouddms_v1.DataMigrationServiceClient()

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

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters
  • request (Union[google.cloud.clouddms_v1.types.ListMappingRulesRequest, dict]) – The request object. Retrieve a list of all mapping rules in a given conversion workspace.

  • parent (str) –

    Required. Name of the conversion workspace resource whose mapping rules are listed in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    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

Response message for ‘ListMappingRulesRequest’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMappingRulesPager

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

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
  • 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

Response message for ‘ListMigrationJobs’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMigrationJobsPager

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

Lists operations that match the specified filter in the request.

Parameters
  • request (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

Response message for ListOperations method.

Return type

ListOperationsResponse

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

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
  • 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

Response message for ‘ListPrivateConnections’ request. Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.clouddms_v1.services.data_migration_service.pagers.ListPrivateConnectionsPager

static mapping_rule_path(project: str, location: str, conversion_workspace: str, mapping_rule: str) str[source]

Returns a fully-qualified mapping_rule string.

static migration_job_path(project: str, location: str, migration_job: str) str[source]

Returns a fully-qualified migration_job string.

static networks_path(project: str, network: str) str[source]

Returns a fully-qualified networks string.

static parse_common_billing_account_path(path: str) Dict[str, str][source]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) Dict[str, str][source]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) Dict[str, str][source]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) Dict[str, str][source]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) Dict[str, str][source]

Parse a project path into its component segments.

static parse_connection_profile_path(path: str) Dict[str, str][source]

Parses a connection_profile path into its component segments.

static parse_conversion_workspace_path(path: str) Dict[str, str][source]

Parses a conversion_workspace path into its component segments.

static parse_mapping_rule_path(path: str) Dict[str, str][source]

Parses a mapping_rule path into its component segments.

static parse_migration_job_path(path: str) Dict[str, str][source]

Parses a migration_job path into its component segments.

static parse_networks_path(path: str) Dict[str, str][source]

Parses a networks path into its component segments.

static parse_private_connection_path(path: str) Dict[str, str][source]

Parses a private_connection path into its component segments.

static private_connection_path(project: str, location: str, private_connection: str) str[source]

Returns a fully-qualified private_connection string.

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation.Operation

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation.Operation

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation.Operation

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation.Operation

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

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
Returns

Response message for ‘SearchBackgroundJobs’ request.

Return type

google.cloud.clouddms_v1.types.SearchBackgroundJobsResponse

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation.Operation

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

Sets the IAM access control policy on the specified function.

Replaces any existing policy.

Parameters
  • request (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

Defines 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.

Return type

Policy

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation.Operation

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation.Operation

test_iam_permissions(request: Optional[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse[source]
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
  • request (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

Response message for TestIamPermissions method.

Return type

TestIamPermissionsResponse

property transport: google.cloud.clouddms_v1.services.data_migration_service.transports.base.DataMigrationServiceTransport

Returns the transport used by the client instance.

Returns

The transport used by the client

instance.

Return type

DataMigrationServiceTransport

property universe_domain: str

Return the universe domain used by the client instance.

Returns

The universe domain used by the client instance.

Return type

str

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

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
  • 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConnectionProfile A connection profile definition.

Return type

google.api_core.operation.Operation

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

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
  • 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.ConversionWorkspace The main conversion workspace resource entity.

Return type

google.api_core.operation.Operation

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

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
  • 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

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation.Operation

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

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
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.clouddms_v1.types.MigrationJob Represents a Database Migration Service migration job object.

Return type

google.api_core.operation.Operation

class google.cloud.clouddms_v1.services.data_migration_service.pagers.DescribeDatabaseEntitiesAsyncPager(method: Callable[[...], Awaitable[google.cloud.clouddms_v1.types.clouddms.DescribeDatabaseEntitiesResponse]], request: google.cloud.clouddms_v1.types.clouddms.DescribeDatabaseEntitiesRequest, response: google.cloud.clouddms_v1.types.clouddms.DescribeDatabaseEntitiesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through describe_database_entities requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.DescribeDatabaseEntitiesResponse object, and provides an __aiter__ method to iterate through its database_entities field.

If there are more pages, the __aiter__ method will make additional DescribeDatabaseEntities requests and continue to iterate through the database_entities field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.DescribeDatabaseEntitiesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.DescribeDatabaseEntitiesPager(method: Callable[[...], google.cloud.clouddms_v1.types.clouddms.DescribeDatabaseEntitiesResponse], request: google.cloud.clouddms_v1.types.clouddms.DescribeDatabaseEntitiesRequest, response: google.cloud.clouddms_v1.types.clouddms.DescribeDatabaseEntitiesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through describe_database_entities requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.DescribeDatabaseEntitiesResponse object, and provides an __iter__ method to iterate through its database_entities field.

If there are more pages, the __iter__ method will make additional DescribeDatabaseEntities requests and continue to iterate through the database_entities field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.DescribeDatabaseEntitiesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.FetchStaticIpsAsyncPager(method: Callable[[...], Awaitable[google.cloud.clouddms_v1.types.clouddms.FetchStaticIpsResponse]], request: google.cloud.clouddms_v1.types.clouddms.FetchStaticIpsRequest, response: google.cloud.clouddms_v1.types.clouddms.FetchStaticIpsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through fetch_static_ips requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.FetchStaticIpsResponse object, and provides an __aiter__ method to iterate through its static_ips field.

If there are more pages, the __aiter__ method will make additional FetchStaticIps requests and continue to iterate through the static_ips field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.FetchStaticIpsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.FetchStaticIpsPager(method: Callable[[...], google.cloud.clouddms_v1.types.clouddms.FetchStaticIpsResponse], request: google.cloud.clouddms_v1.types.clouddms.FetchStaticIpsRequest, response: google.cloud.clouddms_v1.types.clouddms.FetchStaticIpsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through fetch_static_ips requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.FetchStaticIpsResponse object, and provides an __iter__ method to iterate through its static_ips field.

If there are more pages, the __iter__ method will make additional FetchStaticIps requests and continue to iterate through the static_ips field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.FetchStaticIpsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConnectionProfilesAsyncPager(method: Callable[[...], Awaitable[google.cloud.clouddms_v1.types.clouddms.ListConnectionProfilesResponse]], request: google.cloud.clouddms_v1.types.clouddms.ListConnectionProfilesRequest, response: google.cloud.clouddms_v1.types.clouddms.ListConnectionProfilesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_connection_profiles requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListConnectionProfilesResponse object, and provides an __aiter__ method to iterate through its connection_profiles field.

If there are more pages, the __aiter__ method will make additional ListConnectionProfiles requests and continue to iterate through the connection_profiles field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListConnectionProfilesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConnectionProfilesPager(method: Callable[[...], google.cloud.clouddms_v1.types.clouddms.ListConnectionProfilesResponse], request: google.cloud.clouddms_v1.types.clouddms.ListConnectionProfilesRequest, response: google.cloud.clouddms_v1.types.clouddms.ListConnectionProfilesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_connection_profiles requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListConnectionProfilesResponse object, and provides an __iter__ method to iterate through its connection_profiles field.

If there are more pages, the __iter__ method will make additional ListConnectionProfiles requests and continue to iterate through the connection_profiles field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListConnectionProfilesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConversionWorkspacesAsyncPager(method: Callable[[...], Awaitable[google.cloud.clouddms_v1.types.clouddms.ListConversionWorkspacesResponse]], request: google.cloud.clouddms_v1.types.clouddms.ListConversionWorkspacesRequest, response: google.cloud.clouddms_v1.types.clouddms.ListConversionWorkspacesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_conversion_workspaces requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListConversionWorkspacesResponse object, and provides an __aiter__ method to iterate through its conversion_workspaces field.

If there are more pages, the __aiter__ method will make additional ListConversionWorkspaces requests and continue to iterate through the conversion_workspaces field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListConversionWorkspacesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListConversionWorkspacesPager(method: Callable[[...], google.cloud.clouddms_v1.types.clouddms.ListConversionWorkspacesResponse], request: google.cloud.clouddms_v1.types.clouddms.ListConversionWorkspacesRequest, response: google.cloud.clouddms_v1.types.clouddms.ListConversionWorkspacesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_conversion_workspaces requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListConversionWorkspacesResponse object, and provides an __iter__ method to iterate through its conversion_workspaces field.

If there are more pages, the __iter__ method will make additional ListConversionWorkspaces requests and continue to iterate through the conversion_workspaces field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListConversionWorkspacesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMappingRulesAsyncPager(method: Callable[[...], Awaitable[google.cloud.clouddms_v1.types.clouddms.ListMappingRulesResponse]], request: google.cloud.clouddms_v1.types.clouddms.ListMappingRulesRequest, response: google.cloud.clouddms_v1.types.clouddms.ListMappingRulesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_mapping_rules requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListMappingRulesResponse object, and provides an __aiter__ method to iterate through its mapping_rules field.

If there are more pages, the __aiter__ method will make additional ListMappingRules requests and continue to iterate through the mapping_rules field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListMappingRulesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMappingRulesPager(method: Callable[[...], google.cloud.clouddms_v1.types.clouddms.ListMappingRulesResponse], request: google.cloud.clouddms_v1.types.clouddms.ListMappingRulesRequest, response: google.cloud.clouddms_v1.types.clouddms.ListMappingRulesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_mapping_rules requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListMappingRulesResponse object, and provides an __iter__ method to iterate through its mapping_rules field.

If there are more pages, the __iter__ method will make additional ListMappingRules requests and continue to iterate through the mapping_rules field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListMappingRulesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMigrationJobsAsyncPager(method: Callable[[...], Awaitable[google.cloud.clouddms_v1.types.clouddms.ListMigrationJobsResponse]], request: google.cloud.clouddms_v1.types.clouddms.ListMigrationJobsRequest, response: google.cloud.clouddms_v1.types.clouddms.ListMigrationJobsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_migration_jobs requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListMigrationJobsResponse object, and provides an __aiter__ method to iterate through its migration_jobs field.

If there are more pages, the __aiter__ method will make additional ListMigrationJobs requests and continue to iterate through the migration_jobs field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListMigrationJobsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListMigrationJobsPager(method: Callable[[...], google.cloud.clouddms_v1.types.clouddms.ListMigrationJobsResponse], request: google.cloud.clouddms_v1.types.clouddms.ListMigrationJobsRequest, response: google.cloud.clouddms_v1.types.clouddms.ListMigrationJobsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_migration_jobs requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListMigrationJobsResponse object, and provides an __iter__ method to iterate through its migration_jobs field.

If there are more pages, the __iter__ method will make additional ListMigrationJobs requests and continue to iterate through the migration_jobs field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListMigrationJobsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListPrivateConnectionsAsyncPager(method: Callable[[...], Awaitable[google.cloud.clouddms_v1.types.clouddms.ListPrivateConnectionsResponse]], request: google.cloud.clouddms_v1.types.clouddms.ListPrivateConnectionsRequest, response: google.cloud.clouddms_v1.types.clouddms.ListPrivateConnectionsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_private_connections requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListPrivateConnectionsResponse object, and provides an __aiter__ method to iterate through its private_connections field.

If there are more pages, the __aiter__ method will make additional ListPrivateConnections requests and continue to iterate through the private_connections field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListPrivateConnectionsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.clouddms_v1.services.data_migration_service.pagers.ListPrivateConnectionsPager(method: Callable[[...], google.cloud.clouddms_v1.types.clouddms.ListPrivateConnectionsResponse], request: google.cloud.clouddms_v1.types.clouddms.ListPrivateConnectionsRequest, response: google.cloud.clouddms_v1.types.clouddms.ListPrivateConnectionsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_private_connections requests.

This class thinly wraps an initial google.cloud.clouddms_v1.types.ListPrivateConnectionsResponse object, and provides an __iter__ method to iterate through its private_connections field.

If there are more pages, the __iter__ method will make additional ListPrivateConnections requests and continue to iterate through the private_connections field on the corresponding responses.

All the usual google.cloud.clouddms_v1.types.ListPrivateConnectionsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters