Add a Google Cloud Platform Connector

You can use the SDK to add a Google Cloud Platform (GCP) connector and sync virtual machines (VMs) from GCP to Deep Security Manager. For an overview, see this article in the Deep Security Help Center.

Prerequisite: You must prepare a GCP service account for use with Deep Security.

Use the following procedure to add a GCP connector:

  1. Create a GcpConnector object and set the name and service account. The name and service account are required properties. The length of the name cannot exceed 255 characters.
  2. Create a GcpConnectorsApi object and use it to create the GcpConnector on Deep Security Manager.

To see the properties that you can configure, see the Create a Computer operation in the API reference.

See the following example code: Python, JavaScript, Java

Submit a Sync Action for a GCP Connector

After you create a GCP connector successfully, you can indicate to the GCP connector to trigger a sync.

Use the following high-level procedure to submit a sync action:

  1. Create an Action object and set the type to "synchronize". The type is a required property.
  2. Create a GcpConnectorActionsApi object and use it to submit an action by a specific GCP connector ID to Deep Security Manager.

See the following example code: Python, JavaScript, Java