Migrate to Cloud Life Sciences v2beta

Google Genomics is now Cloud Life Sciences. This page explains how to migrate from the v2alpha1 version of Google Genomics to the v2beta version of Cloud Life Sciences.

Cloud Life Sciences as a regionalized service

Google Genomics was a global service that could not run in specific Google Cloud locations. The Cloud Life Sciences API is a regionalized service that lets you align with locality needs for your data. When you select the location where the Cloud Life Sciences API runs, the metadata for the operation you run is stored in that location.

For information on how to make requests to the Cloud Life Sciences API and specify a location, see REST and RPC paths.

REST and RPC paths

The following changes were made to the REST and RPC paths to the Cloud Life Sciences API:

  • All paths now use lifesciences.googleapis.com instead of genomics.googleapis.com.
  • All paths now require you to specify a Google Cloud location, such as us-central1, when calling the Cloud Life Sciences API.

For example:

v2alpha1 Google Genomics:

GET https://genomics.googleapis.com/v2alpha1/projects/PROJECT_ID/operations/OPERATION_ID

v2beta Cloud Life Sciences API:

GET https://lifesciences.googleapis.com/v2beta/projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID

Batch requests must be made to regional endpoints:

POST https://LOCATION-lifesciences.googleapis.com/batch

Google Cloud CLI changes

The Cloud Life Sciences gcloud CLI commands now use gcloud beta lifesciences instead of gcloud alpha genomics. For example:

v2alpha1 Google Genomics:

gcloud alpha genomics operations describe OPERATION_ID

v2beta Cloud Life Sciences API:

gcloud beta lifesciences operations describe OPERATION_ID

The --cpu and --memory flags have been removed. Instead, use the --machine-type flag. When you choose a machine type, you can specify the amount of memory and the number of CPU cores.

IAM changes

Cloud Life Sciences uses the following Identity and Access Management (IAM) roles and permissions in the lifesciences namespace instead of the genomics namespace used by Cloud Genomics v2alpha1. In addition to the namespace change, the role roles/lifesciences.workflowsRunner replaced roles/genomics.pipelinesRunner, and the permission lifesciences.workflows.run replaced genomics.pipelines.run.

v2alpha1 Google Genomics:

Role Permissions
roles/genomics.admin
  • genomics.*
roles/genomics.editor
  • genomics.datasets.create
  • genomics.datasets.delete
  • genomics.datasets.get
  • genomics.datasets.list
  • genomics.datasets.update
  • genomics.operations.*
roles/genomics.viewer
  • genomics.datasets.get
  • genomics.datasets.list
  • genomics.operations.get
  • genomics.operations.list
Pipelines Role Permission
roles/genomics.pipelinesRunner
  • pipelines.run
  • projects.operations.cancel
  • projects.operations.get
  • projects.operations.list

v2beta Cloud Life Sciences API:

Role Permissions
roles/lifesciences.admin
  • lifesciences.*
roles/lifesciences.editor
  • lifesciences.workflows.run
  • lifesciences.operations.cancel
  • lifesciences.operations.get
  • lifesciences.operations.list
roles/lifesciences.viewer
  • lifesciences.operations.get
  • lifesciences.operations.list
Workflows role Permission
roles/lifesciences.workflowsRunner
  • lifesciences.workflows.run
  • lifesciences.operations.cancel
  • lifesciences.operations.get
  • lifesciences.operations.list

Migrate requests and responses

The process of migrating Google Genomics v2alpha1 requests to Cloud Life Sciences API v2beta requests primarily consists of replacing field names and changing field structures within requests and responses.

Each of the following sections contains information about a Cloud Life Sciences API object and any differences that the object has between the Google Genomics v2alpha1 and Cloud Life Sciences API v2beta.

Action

The name field has changed to containerName:

Google Genomics v2alpha1Cloud Life Sciences v2beta
{
  "name": string
  ...
}
{
  "containerName": string
  ...
}

Previously, the flags field was an enum that let you specify values in a Flag object. These values are now fields in the Action object. The following sample shows how to migrate your request when setting the ignoreExitStatus flag in Action:

Google Genomics v2alpha1Cloud Life Sciences v2beta
{
  ...
  "flags": [
    "ignoreExitStatus"
  ]
  ...
}
{
  ...
  "ignoreExitStatus": true
  ...
}

Event

Machine-readable event details are now stored as a specific message type inside a oneof rather than a protobuf.Any typed message. The underlying message types have not changed.

The following sample shows how to migrate your request when configuring a DelayedEvent:

Google Genomics v2alpha1Cloud Life Sciences v2beta
{
  "timestamp": string,
  "description": string,
  "details": {
    "@type": string,
    field1: delayed
  }
}
{
  "timestamp": string,
  "description": string,
  "delayed": {
    "cause": string,
    "metrics": [
      string
    ]
  }
}

Network

The name field has changed to network:

Google Genomics v2alpha1Cloud Life Sciences v2beta
{
  "network": {
    "name": string
  }
}
{
  "network": {
    "network": string
  }
}

Resources

The Resources object no longer takes a projectId field; the operation detects the Google Cloud project ID from the request URL instead.

Google Genomics v2alpha1Cloud Life Sciences v2beta
{
  "projectId": string,
  "regions": [
    string
  ],
  ...
}
{
  "regions": [
    string
  ],
  ...
  "defaultContainerRegistryUri": string
}

operations.get and operations.list responses

In v2alpha1, the projects.locations.operations.get and projects.locations.operations.list methods returned a response containing a Google Cloud project ID in operation names. In v2beta, the operation name in the response contains a Google Cloud project number instead of a project ID. See Creating and managing projects for information on the differences between a project ID and a project number.

Google Genomics v2alpha1Cloud Life Sciences v2beta

projects/PROJECT_ID/operations/OPERATION_ID

projects/PROJECT_NUMBER/locations/LOCATION/operations/OPERATION_ID

When submitting a request to the Cloud Life Sciences API, you can use either the project ID or the project number. However, the response always contains the project number.