Class VmMigrationAsyncClient (1.1.2)

VmMigrationAsyncClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.vmmigration_v1.services.vm_migration.transports.base.VmMigrationTransport] = 'grpc_asyncio', client_options: 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>)

VM Migration Service

Properties

transport

Returns the transport used by the client instance.

Returns
TypeDescription
VmMigrationTransportThe transport used by the client instance.

Methods

VmMigrationAsyncClient

VmMigrationAsyncClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.vmmigration_v1.services.vm_migration.transports.base.VmMigrationTransport] = 'grpc_asyncio', client_options: 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>)

Instantiates the vm migration client.

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

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

transport Union[str, .VmMigrationTransport]

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

client_options ClientOptions

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

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

add_group_migration

add_group_migration(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.AddGroupMigrationRequest, dict]] = None, *, group: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Adds a MigratingVm to a Group.

from google.cloud import vmmigration_v1

async def sample_add_group_migration():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.AddGroupMigrationRequest(
        group="group_value",
    )

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

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

    response = await operation.result()

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

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

group str

Required. The full path name of the Group to add to. This corresponds to the group field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be AddGroupMigrationResponse Response message for 'AddGroupMigration' request.

cancel_clone_job

cancel_clone_job(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CancelCloneJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Initiates the cancellation of a running clone job.

from google.cloud import vmmigration_v1

async def sample_cancel_clone_job():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CancelCloneJobRequest(
        name="name_value",
    )

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

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

    response = await operation.result()

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be CancelCloneJobResponse Response message for 'CancelCloneJob' request.

cancel_cutover_job

cancel_cutover_job(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CancelCutoverJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Initiates the cancellation of a running cutover job.

from google.cloud import vmmigration_v1

async def sample_cancel_cutover_job():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CancelCutoverJobRequest(
        name="name_value",
    )

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

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

    response = await operation.result()

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be CancelCutoverJobResponse Response message for 'CancelCutoverJob' request.

clone_job_path

clone_job_path(
    project: str, location: str, source: str, migrating_vm: str, clone_job: str
)

Returns a fully-qualified clone_job string.

common_billing_account_path

common_billing_account_path(billing_account: str)

Returns a fully-qualified billing_account string.

common_folder_path

common_folder_path(folder: str)

Returns a fully-qualified folder string.

common_location_path

common_location_path(project: str, location: str)

Returns a fully-qualified location string.

common_organization_path

common_organization_path(organization: str)

Returns a fully-qualified organization string.

common_project_path

common_project_path(project: str)

Returns a fully-qualified project string.

create_clone_job

create_clone_job(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CreateCloneJobRequest, dict]] = None, *, parent: Optional[str] = None, clone_job: Optional[google.cloud.vmmigration_v1.types.vmmigration.CloneJob] = None, clone_job_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Initiates a Clone of a specific migrating VM.

from google.cloud import vmmigration_v1

async def sample_create_clone_job():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CreateCloneJobRequest(
        parent="parent_value",
        clone_job_id="clone_job_id_value",
    )

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

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

    response = await operation.result()

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

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

parent str

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

clone_job CloneJob

Required. The clone request body. This corresponds to the clone_job field on the request instance; if request is provided, this should not be set.

clone_job_id str

Required. The clone job identifier. This corresponds to the clone_job_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be CloneJob CloneJob describes the process of creating a clone of a MigratingVM to the requested target based on the latest successful uploaded snapshots. While the migration cycles of a MigratingVm take place, it is possible to verify the uploaded VM can be started in the cloud, by creating a clone. The clone can be created without any downtime, and it is created using the latest snapshots which are already in the cloud. The cloneJob is only responsible for its work, not its products, which means once it is finished, it will never touch the instance it created. It will only delete it in case of the CloneJob being cancelled or upon failure to clone.

create_cutover_job

create_cutover_job(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CreateCutoverJobRequest, dict]] = None, *, parent: Optional[str] = None, cutover_job: Optional[google.cloud.vmmigration_v1.types.vmmigration.CutoverJob] = None, cutover_job_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.

from google.cloud import vmmigration_v1

async def sample_create_cutover_job():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CreateCutoverJobRequest(
        parent="parent_value",
        cutover_job_id="cutover_job_id_value",
    )

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

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

    response = await operation.result()

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

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

parent str

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

cutover_job CutoverJob

Required. The cutover request body. This corresponds to the cutover_job field on the request instance; if request is provided, this should not be set.

cutover_job_id str

Required. The cutover job identifier. This corresponds to the cutover_job_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be CutoverJob CutoverJob message describes a cutover of a migrating VM. The CutoverJob is the operation of shutting down the VM, creating a snapshot and clonning the VM using the replicated snapshot.

create_datacenter_connector

create_datacenter_connector(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CreateDatacenterConnectorRequest, dict]] = None, *, parent: Optional[str] = None, datacenter_connector: Optional[google.cloud.vmmigration_v1.types.vmmigration.DatacenterConnector] = None, datacenter_connector_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Creates a new DatacenterConnector in a given Source.

from google.cloud import vmmigration_v1

async def sample_create_datacenter_connector():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CreateDatacenterConnectorRequest(
        parent="parent_value",
        datacenter_connector_id="datacenter_connector_id_value",
    )

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

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

    response = await operation.result()

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

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

parent str

Required. The DatacenterConnector's parent. Required. The Source in where the new DatacenterConnector will be created. For example: projects/my-project/locations/us-central1/sources/my-source This corresponds to the parent field on the request instance; if request is provided, this should not be set.

datacenter_connector DatacenterConnector

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

datacenter_connector_id str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be DatacenterConnector DatacenterConnector message describes a connector between the Source and GCP, which is installed on a vmware datacenter (an OVA vm installed by the user) to connect the Datacenter to GCP and support vm migration data transfer.

create_group

create_group(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CreateGroupRequest, dict]] = None, *, parent: Optional[str] = None, group: Optional[google.cloud.vmmigration_v1.types.vmmigration.Group] = None, group_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Creates a new Group in a given project and location.

from google.cloud import vmmigration_v1

async def sample_create_group():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CreateGroupRequest(
        parent="parent_value",
        group_id="group_id_value",
    )

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

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

    response = await operation.result()

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

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

parent str

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

group Group

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

group_id str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be Group Describes message for 'Group' resource. The Group is a collections of several MigratingVms.

create_migrating_vm

create_migrating_vm(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CreateMigratingVmRequest, dict]] = None, *, parent: Optional[str] = None, migrating_vm: Optional[google.cloud.vmmigration_v1.types.vmmigration.MigratingVm] = None, migrating_vm_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Creates a new MigratingVm in a given Source.

from google.cloud import vmmigration_v1

async def sample_create_migrating_vm():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CreateMigratingVmRequest(
        parent="parent_value",
        migrating_vm_id="migrating_vm_id_value",
    )

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

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

    response = await operation.result()

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

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

parent str

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

migrating_vm MigratingVm

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

migrating_vm_id str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be MigratingVm MigratingVm describes the VM that will be migrated from a Source environment and its replication state.

create_source

create_source(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CreateSourceRequest, dict]] = None, *, parent: Optional[str] = None, source: Optional[google.cloud.vmmigration_v1.types.vmmigration.Source] = None, source_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Creates a new Source in a given project and location.

from google.cloud import vmmigration_v1

async def sample_create_source():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CreateSourceRequest(
        parent="parent_value",
        source_id="source_id_value",
    )

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

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

    response = await operation.result()

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

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

parent str

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

source Source

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

source_id str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be Source Source message describes a specific vm migration Source resource. It contains the source environment information.

create_target_project

create_target_project(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CreateTargetProjectRequest, dict]] = None, *, parent: Optional[str] = None, target_project: Optional[google.cloud.vmmigration_v1.types.vmmigration.TargetProject] = None, target_project_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Creates a new TargetProject in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

from google.cloud import vmmigration_v1

async def sample_create_target_project():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CreateTargetProjectRequest(
        parent="parent_value",
        target_project_id="target_project_id_value",
    )

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

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

    response = await operation.result()

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

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

parent str

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

target_project TargetProject

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

target_project_id str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be TargetProject TargetProject message represents a target Compute Engine project for a migration or a clone.

create_utilization_report

create_utilization_report(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.CreateUtilizationReportRequest, dict]] = None, *, parent: Optional[str] = None, utilization_report: Optional[google.cloud.vmmigration_v1.types.vmmigration.UtilizationReport] = None, utilization_report_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Creates a new UtilizationReport.

from google.cloud import vmmigration_v1

async def sample_create_utilization_report():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.CreateUtilizationReportRequest(
        parent="parent_value",
        utilization_report_id="utilization_report_id_value",
    )

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

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

    response = await operation.result()

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

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

parent str

Required. The Utilization Report's parent. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

utilization_report UtilizationReport

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

utilization_report_id str

Required. The ID to use for the report, which will become the final component of the reports's resource name. This value maximum length is 63 characters, and valid characters are /a-z][0-9]-/. It must start with an english letter and must not end with a hyphen. This corresponds to the utilization_report_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be UtilizationReport Utilization report details the utilization (CPU, memory, etc.) of selected source VMs.

cutover_job_path

cutover_job_path(
    project: str, location: str, source: str, migrating_vm: str, cutover_job: str
)

Returns a fully-qualified cutover_job string.

datacenter_connector_path

datacenter_connector_path(
    project: str, location: str, source: str, datacenter_connector: str
)

Returns a fully-qualified datacenter_connector string.

delete_datacenter_connector

delete_datacenter_connector(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.DeleteDatacenterConnectorRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Deletes a single DatacenterConnector.

from google.cloud import vmmigration_v1

async def sample_delete_datacenter_connector():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.DeleteDatacenterConnectorRequest(
        name="name_value",
    )

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

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

    response = await operation.result()

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn 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); } The JSON representation for Empty is empty JSON object {}.

delete_group

delete_group(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.DeleteGroupRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Deletes a single Group.

from google.cloud import vmmigration_v1

async def sample_delete_group():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.DeleteGroupRequest(
        name="name_value",
    )

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

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

    response = await operation.result()

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn 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); } The JSON representation for Empty is empty JSON object {}.

delete_migrating_vm

delete_migrating_vm(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.DeleteMigratingVmRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Deletes a single MigratingVm.

from google.cloud import vmmigration_v1

async def sample_delete_migrating_vm():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.DeleteMigratingVmRequest(
        name="name_value",
    )

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

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

    response = await operation.result()

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn 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); } The JSON representation for Empty is empty JSON object {}.

delete_source

delete_source(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.DeleteSourceRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Deletes a single Source.

from google.cloud import vmmigration_v1

async def sample_delete_source():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.DeleteSourceRequest(
        name="name_value",
    )

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

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

    response = await operation.result()

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn 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); } The JSON representation for Empty is empty JSON object {}.

delete_target_project

delete_target_project(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.DeleteTargetProjectRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Deletes a single TargetProject.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

from google.cloud import vmmigration_v1

async def sample_delete_target_project():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.DeleteTargetProjectRequest(
        name="name_value",
    )

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

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

    response = await operation.result()

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn 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); } The JSON representation for Empty is empty JSON object {}.

delete_utilization_report

delete_utilization_report(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.DeleteUtilizationReportRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Deletes a single Utilization Report.

from google.cloud import vmmigration_v1

async def sample_delete_utilization_report():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.DeleteUtilizationReportRequest(
        name="name_value",
    )

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

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

    response = await operation.result()

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn 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); } The JSON representation for Empty is empty JSON object {}.

fetch_inventory

fetch_inventory(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.FetchInventoryRequest, dict]] = None, *, source: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the sense it's not in Compute Engine). The inventory describes the list of existing VMs in that source. Note that this operation lists the VMs on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.

from google.cloud import vmmigration_v1

async def sample_fetch_inventory():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.FetchInventoryRequest(
        source="source_value",
    )

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

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

The request object. Request message for fetchInventory.

source str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.types.FetchInventoryResponseResponse message for fetchInventory.

finalize_migration

finalize_migration(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.FinalizeMigrationRequest, dict]] = None, *, migrating_vm: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.

from google.cloud import vmmigration_v1

async def sample_finalize_migration():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.FinalizeMigrationRequest(
        migrating_vm="migrating_vm_value",
    )

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

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

    response = await operation.result()

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

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

migrating_vm str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be FinalizeMigrationResponse Response message for 'FinalizeMigration' request.

from_service_account_file

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

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

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
VmMigrationAsyncClientThe constructed client.

from_service_account_info

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

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

Parameter
NameDescription
info dict

The service account private key info.

Returns
TypeDescription
VmMigrationAsyncClientThe constructed client.

from_service_account_json

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

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

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
VmMigrationAsyncClientThe constructed client.

get_clone_job

get_clone_job(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.GetCloneJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Gets details of a single CloneJob.

from google.cloud import vmmigration_v1

async def sample_get_clone_job():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.GetCloneJobRequest(
        name="name_value",
    )

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

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.types.CloneJobCloneJob describes the process of creating a clone of a MigratingVM to the requested target based on the latest successful uploaded snapshots. While the migration cycles of a MigratingVm take place, it is possible to verify the uploaded VM can be started in the cloud, by creating a clone. The clone can be created without any downtime, and it is created using the latest snapshots which are already in the cloud. The cloneJob is only responsible for its work, not its products, which means once it is finished, it will never touch the instance it created. It will only delete it in case of the CloneJob being cancelled or upon failure to clone.

get_cutover_job

get_cutover_job(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.GetCutoverJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Gets details of a single CutoverJob.

from google.cloud import vmmigration_v1

async def sample_get_cutover_job():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.GetCutoverJobRequest(
        name="name_value",
    )

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

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.types.CutoverJobCutoverJob message describes a cutover of a migrating VM. The CutoverJob is the operation of shutting down the VM, creating a snapshot and clonning the VM using the replicated snapshot.

get_datacenter_connector

get_datacenter_connector(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.GetDatacenterConnectorRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Gets details of a single DatacenterConnector.

from google.cloud import vmmigration_v1

async def sample_get_datacenter_connector():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.GetDatacenterConnectorRequest(
        name="name_value",
    )

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

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.types.DatacenterConnectorDatacenterConnector message describes a connector between the Source and GCP, which is installed on a vmware datacenter (an OVA vm installed by the user) to connect the Datacenter to GCP and support vm migration data transfer.

get_group

get_group(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.GetGroupRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Gets details of a single Group.

from google.cloud import vmmigration_v1

async def sample_get_group():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.GetGroupRequest(
        name="name_value",
    )

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

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.types.GroupDescribes message for 'Group' resource. The Group is a collections of several MigratingVms.

get_migrating_vm

get_migrating_vm(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.GetMigratingVmRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Gets details of a single MigratingVm.

from google.cloud import vmmigration_v1

async def sample_get_migrating_vm():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.GetMigratingVmRequest(
        name="name_value",
    )

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

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.types.MigratingVmMigratingVm describes the VM that will be migrated from a Source environment and its replication state.

get_mtls_endpoint_and_cert_source

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

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

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

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

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

Parameter
NameDescription
client_options google.api_core.client_options.ClientOptions

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

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

get_source

get_source(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.GetSourceRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Gets details of a single Source.

from google.cloud import vmmigration_v1

async def sample_get_source():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.GetSourceRequest(
        name="name_value",
    )

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

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.types.SourceSource message describes a specific vm migration Source resource. It contains the source environment information.

get_target_project

get_target_project(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.GetTargetProjectRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Gets details of a single TargetProject.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

from google.cloud import vmmigration_v1

async def sample_get_target_project():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.GetTargetProjectRequest(
        name="name_value",
    )

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

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

The request object. Request message for 'GetTargetProject' call.

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.types.TargetProjectTargetProject message represents a target Compute Engine project for a migration or a clone.

get_transport_class

get_transport_class()

Returns an appropriate transport class.

get_utilization_report

get_utilization_report(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.GetUtilizationReportRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Gets a single Utilization Report.

from google.cloud import vmmigration_v1

async def sample_get_utilization_report():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.GetUtilizationReportRequest(
        name="name_value",
    )

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

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

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

name str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.types.UtilizationReportUtilization report details the utilization (CPU, memory, etc.) of selected source VMs.

group_path

group_path(project: str, location: str, group: str)

Returns a fully-qualified group string.

list_clone_jobs

list_clone_jobs(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.ListCloneJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists CloneJobs of a given migrating VM.

from google.cloud import vmmigration_v1

async def sample_list_clone_jobs():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.ListCloneJobsRequest(
        parent="parent_value",
        page_token="page_token_value",
    )

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

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

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

parent str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.services.vm_migration.pagers.ListCloneJobsAsyncPagerResponse message for 'ListCloneJobs' request. Iterating over this object will yield results and resolve additional pages automatically.

list_cutover_jobs

list_cutover_jobs(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.ListCutoverJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists CutoverJobs of a given migrating VM.

from google.cloud import vmmigration_v1

async def sample_list_cutover_jobs():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.ListCutoverJobsRequest(
        parent="parent_value",
        page_token="page_token_value",
    )

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

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

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

parent str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.services.vm_migration.pagers.ListCutoverJobsAsyncPagerResponse message for 'ListCutoverJobs' request. Iterating over this object will yield results and resolve additional pages automatically.

list_datacenter_connectors

list_datacenter_connectors(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.ListDatacenterConnectorsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists DatacenterConnectors in a given Source.

from google.cloud import vmmigration_v1

async def sample_list_datacenter_connectors():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.ListDatacenterConnectorsRequest(
        parent="parent_value",
        page_token="page_token_value",
    )

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

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

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

parent str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.services.vm_migration.pagers.ListDatacenterConnectorsAsyncPagerResponse message for 'ListDatacenterConnectors' request. Iterating over this object will yield results and resolve additional pages automatically.

list_groups

list_groups(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.ListGroupsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists Groups in a given project and location.

from google.cloud import vmmigration_v1

async def sample_list_groups():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.ListGroupsRequest(
        parent="parent_value",
        page_token="page_token_value",
    )

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

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

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

parent str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.services.vm_migration.pagers.ListGroupsAsyncPagerResponse message for 'ListGroups' request. Iterating over this object will yield results and resolve additional pages automatically.

list_migrating_vms

list_migrating_vms(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.ListMigratingVmsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists MigratingVms in a given Source.

from google.cloud import vmmigration_v1

async def sample_list_migrating_vms():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.ListMigratingVmsRequest(
        parent="parent_value",
        page_token="page_token_value",
    )

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

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

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

parent str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.services.vm_migration.pagers.ListMigratingVmsAsyncPagerResponse message for 'ListMigratingVms' request. Iterating over this object will yield results and resolve additional pages automatically.

list_sources

list_sources(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.ListSourcesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists Sources in a given project and location.

from google.cloud import vmmigration_v1

async def sample_list_sources():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.ListSourcesRequest(
        parent="parent_value",
        page_token="page_token_value",
    )

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

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

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

parent str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.services.vm_migration.pagers.ListSourcesAsyncPagerResponse message for 'ListSources' request. Iterating over this object will yield results and resolve additional pages automatically.

list_target_projects

list_target_projects(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.ListTargetProjectsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists TargetProjects in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

from google.cloud import vmmigration_v1

async def sample_list_target_projects():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.ListTargetProjectsRequest(
        parent="parent_value",
        page_token="page_token_value",
    )

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

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

The request object. Request message for 'ListTargetProjects' call.

parent str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.services.vm_migration.pagers.ListTargetProjectsAsyncPagerResponse message for 'ListTargetProjects' call. Iterating over this object will yield results and resolve additional pages automatically.

list_utilization_reports

list_utilization_reports(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.ListUtilizationReportsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists Utilization Reports of the given Source.

from google.cloud import vmmigration_v1

async def sample_list_utilization_reports():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.ListUtilizationReportsRequest(
        parent="parent_value",
        page_token="page_token_value",
    )

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

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

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

parent str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.cloud.vmmigration_v1.services.vm_migration.pagers.ListUtilizationReportsAsyncPagerResponse message for 'ListUtilizationReports' request. Iterating over this object will yield results and resolve additional pages automatically.

migrating_vm_path

migrating_vm_path(project: str, location: str, source: str, migrating_vm: str)

Returns a fully-qualified migrating_vm string.

parse_clone_job_path

parse_clone_job_path(path: str)

Parses a clone_job path into its component segments.

parse_common_billing_account_path

parse_common_billing_account_path(path: str)

Parse a billing_account path into its component segments.

parse_common_folder_path

parse_common_folder_path(path: str)

Parse a folder path into its component segments.

parse_common_location_path

parse_common_location_path(path: str)

Parse a location path into its component segments.

parse_common_organization_path

parse_common_organization_path(path: str)

Parse a organization path into its component segments.

parse_common_project_path

parse_common_project_path(path: str)

Parse a project path into its component segments.

parse_cutover_job_path

parse_cutover_job_path(path: str)

Parses a cutover_job path into its component segments.

parse_datacenter_connector_path

parse_datacenter_connector_path(path: str)

Parses a datacenter_connector path into its component segments.

parse_group_path

parse_group_path(path: str)

Parses a group path into its component segments.

parse_migrating_vm_path

parse_migrating_vm_path(path: str)

Parses a migrating_vm path into its component segments.

parse_source_path

parse_source_path(path: str)

Parses a source path into its component segments.

parse_target_project_path

parse_target_project_path(path: str)

Parses a target_project path into its component segments.

parse_utilization_report_path

parse_utilization_report_path(path: str)

Parses a utilization_report path into its component segments.

pause_migration

pause_migration(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.PauseMigrationRequest, dict]] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving source task data. Further replication cycles will not be triggered while the VM is paused.

from google.cloud import vmmigration_v1

async def sample_pause_migration():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.PauseMigrationRequest(
        migrating_vm="migrating_vm_value",
    )

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

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

    response = await operation.result()

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

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be PauseMigrationResponse Response message for 'PauseMigration' request.

remove_group_migration

remove_group_migration(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.RemoveGroupMigrationRequest, dict]] = None, *, group: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Removes a MigratingVm from a Group.

from google.cloud import vmmigration_v1

async def sample_remove_group_migration():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.RemoveGroupMigrationRequest(
        group="group_value",
    )

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

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

    response = await operation.result()

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

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

group str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be RemoveGroupMigrationResponse Response message for 'RemoveMigration' request.

resume_migration

resume_migration(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.ResumeMigrationRequest, dict]] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Resumes a migration for a VM. When called on a paused migration, will start the process of uploading data and creating snapshots; when called on a completed cut-over migration, will update the migration to active state and start the process of uploading data and creating snapshots.

from google.cloud import vmmigration_v1

async def sample_resume_migration():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.ResumeMigrationRequest(
        migrating_vm="migrating_vm_value",
    )

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

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

    response = await operation.result()

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

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be ResumeMigrationResponse Response message for 'ResumeMigration' request.

source_path

source_path(project: str, location: str, source: str)

Returns a fully-qualified source string.

start_migration

start_migration(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.StartMigrationRequest, dict]] = None, *, migrating_vm: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.

from google.cloud import vmmigration_v1

async def sample_start_migration():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.StartMigrationRequest(
        migrating_vm="migrating_vm_value",
    )

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

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

    response = await operation.result()

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

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

migrating_vm str

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

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be StartMigrationResponse Response message for 'StartMigration' request.

target_project_path

target_project_path(project: str, location: str, target_project: str)

Returns a fully-qualified target_project string.

update_group

update_group(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.UpdateGroupRequest, dict]] = None, *, group: Optional[google.cloud.vmmigration_v1.types.vmmigration.Group] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Updates the parameters of a single Group.

from google.cloud import vmmigration_v1

async def sample_update_group():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.UpdateGroupRequest(
    )

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

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

    response = await operation.result()

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

The request object. Update message for 'UpdateGroups' request.

group Group

Required. The update request body. This corresponds to the group field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Field mask is used to specify the fields to be overwritten in the Group resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be Group Describes message for 'Group' resource. The Group is a collections of several MigratingVms.

update_migrating_vm

update_migrating_vm(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.UpdateMigratingVmRequest, dict]] = None, *, migrating_vm: Optional[google.cloud.vmmigration_v1.types.vmmigration.MigratingVm] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Updates the parameters of a single MigratingVm.

from google.cloud import vmmigration_v1

async def sample_update_migrating_vm():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.UpdateMigratingVmRequest(
    )

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

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

    response = await operation.result()

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

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

migrating_vm MigratingVm

Required. The update request body. This corresponds to the migrating_vm field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Field mask is used to specify the fields to be overwritten in the MigratingVm resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be MigratingVm MigratingVm describes the VM that will be migrated from a Source environment and its replication state.

update_source

update_source(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.UpdateSourceRequest, dict]] = None, *, source: Optional[google.cloud.vmmigration_v1.types.vmmigration.Source] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Updates the parameters of a single Source.

from google.cloud import vmmigration_v1

async def sample_update_source():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.UpdateSourceRequest(
    )

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

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

    response = await operation.result()

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

The request object. Update message for 'UpdateSources' request.

source Source

Required. The update request body. This corresponds to the source field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Field mask is used to specify the fields to be overwritten in the Source resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be Source Source message describes a specific vm migration Source resource. It contains the source environment information.

update_target_project

update_target_project(request: Optional[Union[google.cloud.vmmigration_v1.types.vmmigration.UpdateTargetProjectRequest, dict]] = None, *, target_project: Optional[google.cloud.vmmigration_v1.types.vmmigration.TargetProject] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Updates the parameters of a single TargetProject.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

from google.cloud import vmmigration_v1

async def sample_update_target_project():
    # Create a client
    client = vmmigration_v1.VmMigrationAsyncClient()

    # Initialize request argument(s)
    request = vmmigration_v1.UpdateTargetProjectRequest(
    )

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

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

    response = await operation.result()

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

The request object. Update message for 'UpdateTargetProject' request.

target_project TargetProject

Required. The update request body. This corresponds to the target_project field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Field mask is used to specify the fields to be overwritten in the TargetProject resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

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

Returns
TypeDescription
google.api_core.operation_async.AsyncOperationAn object representing a long-running operation. The result type for the operation will be TargetProject TargetProject message represents a target Compute Engine project for a migration or a clone.

utilization_report_path

utilization_report_path(
    project: str, location: str, source: str, utilization_report: str
)

Returns a fully-qualified utilization_report string.