Migrating to Cloud Life Sciences v2beta

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

Cloud Life Sciences as a regionalized service

Cloud Genomics was a global service that did not have the ability to run in specific Google Cloud Platform locations. The Cloud Life Sciences API is a regionalized service that lets you align with locality needs for your data. 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 Platform location, such as us-central1, when calling the Cloud Life Sciences API.

For example:

v2alpha1 Cloud 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

gcloud command-line tool changes

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

v2alpha1 Cloud Genomics:

gcloud alpha genomics operations describe OPERATION_ID

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

Migrating requests

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.

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 of 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 Platform project ID from the request URL instead.

Google Genomics v2alpha1Cloud Life Sciences v2beta
{
  "projectId": string,
  "regions": [
    string
  ],
  ...
}
{
  "regions": [
    string
  ],
  ...
  "defaultContainerRegistryUri": string
}
このページは役立ちましたか?評価をお願いいたします。

フィードバックを送信...