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 ofgenomics.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 |
|
roles/genomics.editor |
|
roles/genomics.viewer |
|
Pipelines Role | Permission |
---|---|
roles/genomics.pipelinesRunner |
|
v2beta Cloud Life Sciences API:
Role | Permissions |
---|---|
roles/lifesciences.admin |
|
roles/lifesciences.editor |
|
roles/lifesciences.viewer |
|
Workflows role | Permission |
---|---|
roles/lifesciences.workflowsRunner |
|
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 v2alpha1 | Cloud Life Sciences v2beta |
---|---|
|
|
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 v2alpha1 | Cloud Life Sciences v2beta |
---|---|
|
|
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 v2alpha1 | Cloud Life Sciences v2beta |
---|---|
|
|
Network
The name
field has changed to network
:
Google Genomics v2alpha1 | Cloud Life Sciences v2beta |
---|---|
|
|
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 v2alpha1 | Cloud Life Sciences v2beta |
---|---|
|
|
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 v2alpha1 | Cloud Life Sciences v2beta |
---|---|
|
|
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.