Create a Cloud Spanner connection

You're viewing Apigee X documentation.
View Apigee Edge documentation.

The Cloud Spanner connection lets you insert, read, update and delete rows in a Cloud Spanner table and use the resulting output in an integration. This page provides a reference for creating a Cloud Spanner connection and using it with Apigee Integration.

Before you begin

Before creating a Cloud Spanner connection, do the following:

  • Enable Cloud Spanner for your Google Cloud project.
  • Create a Cloud Spanner instance and database that the connector must connect to.
  • Grant the roles/spanner.databaseUser role to the service account that you want to use to create the connection.

Enable required services

Connectors requires that you enable the following Google services:

Name Title
apigee.googleapis.com Apigee API
secretmanager.googleapis.com Secret Manager API
connectors.googleapis.com Connector Platform API

If these services have not been enabled for your project previously, you are prompted to enable them when creating the connection in the Create Connection page.

Create a connection

  1. In the Cloud console, go to the Apigee > Connectors page and then select or create a Google Cloud project.

    Go to the Connections page

  2. Click + CREATE NEW to open the Create Connection page.
  3. Configure the connection:
    1. In the Create Connection section, complete the following:
      • Connector: Select GCP > Cloud Spanner from the drop down list of available Connectors.
      • Connector version: Select the Connector version from the drop down list of available versions.
      • In the Connection Name field, enter a name for the Connection instance.

        Connection names must meet the following criteria:

        • Connection names can use letters, numbers, or hyphens.
        • Letters must be lower-case.
        • Connection names must begin with a letter and end with a letter or number.
        • Connection names cannot exceed 63 characters.
      • Optionally, add a Description of the connection instance.
      • Project ID: Enter the of the Google Cloud project where the Cloud Spanner instance resides.
      • Instance ID: Enter the ID of the Cloud Spanner instance to connect.
      • Database Region:
      • Enter the region in which the Cloud Spanner instance and the Cloud Spanner database reside.
      • Database Name: Enter the name of the Cloud Spanner database to connect.
      • Optionally, click + ADD LABEL to add a label to the Connection in the form of a key/value pair.
      • Click NEXT.
    2. Location: Choose the location for the connection.
      • Select a location where Apigee is available from the Region drop-down list.

        Supported regions for connectors include:

        • asia-east1
        • asia-northeast1
        • asia-south1
        • asia-southeast1
        • australia-southeast1
        • europe-west1
        • europe-west2
        • europe-west3
        • europe-west4
        • europe-west6
        • northamerica-northeast1
        • southamerica-east1
        • us-central1
        • us-east1
        • us-east4
        • us-west1
        • us-west2
      • Click NEXT.
    3. Authentication: The Cloud Spanner connection does not require authentication configuration.
    4. Click NEXT.
    5. Review: Review your connection and authentication details.
  4. Click Create.

Create a Connectors task

After you create a Cloud Spanner connection, it becomes available in Apigee integrations. You can then use the connection to configure the Connectors tasks in your integrations. For more information, see Configure the Connectors task.