Discovery Engine API . projects . locations . collections . dataConnector

Instance Methods

connectorRuns()

Returns the connectorRuns Resource.

operations()

Returns the operations Resource.

acquireAccessToken(name, body=None, x__xgafv=None)

Uses the per-user refresh token minted with AcquireAndStoreRefreshToken to generate and return a new access token and its details. Takes the access token from cache if available. Rotates the stored refresh token if needed. Uses the end user identity to return the user specific access token. Does *not* return the credentials configured by the administrator. Used by Agentspace action execution and Agentspace UI.

close()

Close httplib2 connections.

getConnectorSecret(name, x__xgafv=None)

Get the secret for the associated connector.

startConnectorRun(parent, body=None, x__xgafv=None)

Starts an immediate synchronization process for a DataConnector. Third Party Connector Users must specify which entities should be synced. FHIR Connectors must provide a timestamp to indicate the point in time from which data should be synced.

Method Details

acquireAccessToken(name, body=None, x__xgafv=None)
Uses the per-user refresh token minted with AcquireAndStoreRefreshToken to generate and return a new access token and its details. Takes the access token from cache if available. Rotates the stored refresh token if needed. Uses the end user identity to return the user specific access token. Does *not* return the credentials configured by the administrator. Used by Agentspace action execution and Agentspace UI.

Args:
  name: string, Required. The resource name of the connector for which a token is queried. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for the DataConnectorService.AcquireAccessToken method.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for the DataConnectorService.AcquireAccessToken method.
  "accessToken": "A String", # The created access token.
  "refreshTokenInfo": { # Describes a refresh token. # Info about the stored refresh token used to create the access token.
    "name": "A String", # Required. The connection for which this token applies.
    "scopes": [ # The list of scopes for this token.
      "A String",
    ],
  },
}
close()
Close httplib2 connections.
getConnectorSecret(name, x__xgafv=None)
Get the secret for the associated connector.

Args:
  name: string, Required. The full resource name of the associated data connector. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for DataConnectorService.GetConnectorSecret.
  "app": "A String", # The app name of the associated Connector.
  "authorizationUri": "A String", # The authorization uri for the data connector.
  "clientId": "A String", # The client id of the associated Connector.
  "instance": "A String", # The instance name of the associated Connector.
  "redirectUri": "A String", # The redirect url of the associated Connector.
  "tenantId": "A String", # The tenant id of the associated Connector.
}
startConnectorRun(parent, body=None, x__xgafv=None)
Starts an immediate synchronization process for a DataConnector. Third Party Connector Users must specify which entities should be synced. FHIR Connectors must provide a timestamp to indicate the point in time from which data should be synced.

Args:
  parent: string, Required. Connector name of the form projects/{project}/locations/{location}/collections/ {collection_id}/dataConnector (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for DataConnectorService.StartConnectorRun method.
  "entities": [ # Specifies which Third Party Connector entities should be synced. If not specified, all entities will be synced.
    "A String",
  ],
  "forceRefreshContent": True or False, # Optional. Whether to force refresh the unstructured content of the documents. If set to `true`, the content part of the documents will be refreshed regardless of the update status of the referencing content.
  "healthcareFhirResourceTypes": [ # The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty.
    "A String",
  ],
  "syncIdentity": True or False, # If true, trigger Identity sync.
  "syncSinceTimestamp": "A String", # Timestamp to indicate the point in time from which data should be synced for Streaming/Batch Data Connectors. This field is only utilized for Healthcare Connectors.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A data sync run of DataConnector. After DataConnector is successfully initialized, data syncs are scheduled at DataConnector.refresh_interval. A ConnectorRun represents a data sync either in the past or onging that the moment. //
  "endTime": "A String", # Output only. The time when the connector run ended.
  "entityRuns": [ # Output only. The details of the entities synced at the ConnectorRun. Each ConnectorRun consists of syncing one or more entities.
    { # Represents an entity that was synced in this ConnectorRun.
      "deletedRecordCount": "A String", # Optional. The number of documents deleted.
      "entityName": "A String", # The name of the source entity.
      "errorRecordCount": "A String", # Optional. The total number of documents failed at sync at indexing stage.
      "errors": [ # The errors from the entity's sync run. Only exist if running into an error state. Contains error code and error message.
        { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
          "code": 42, # The status code, which should be an enum value of google.rpc.Code.
          "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
            {
              "a_key": "", # Properties of the object. Contains field @type with type URL.
            },
          ],
          "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
        },
      ],
      "extractedRecordCount": "A String", # Optional. The number of documents extracted from connector source, ready to be ingested to VAIS.
      "indexedRecordCount": "A String", # Optional. The number of documents indexed.
      "progress": { # Represents the progress of a sync run. # Metadata to generate the progress bar.
        "currentCount": "A String", # The current progress.
        "percentile": 3.14, # Derived. The percentile of the progress.current_count / total_count. The value is between [0, 1.0] inclusive.
        "totalCount": "A String", # The total.
      },
      "scheduledRecordCount": "A String", # Optional. The number of documents scheduled to be crawled/extracted from connector source. This only applies to third party connectors.
      "sourceApiRequestCount": "A String", # Optional. The number of requests sent to 3p API.
      "state": "A String", # The state of the entity's sync run.
      "stateUpdateTime": "A String", # Timestamp at which the entity sync state was last updated.
      "statsUpdateTime": "A String", # The timestamp for either extracted_documents_count, indexed_documents_count and error_documents_count was last updated.
      "syncType": "A String", # Sync type of this run.
    },
  ],
  "errors": [ # Contains info about errors incurred during the sync. Only exist if running into an error state. Contains error code and error message. Use with the `state` field.
    { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
      "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
        {
          "a_key": "", # Properties of the object. Contains field @type with type URL.
        },
      ],
      "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
    },
  ],
  "latestPauseTime": "A String", # Output only. The time when the connector run was most recently paused.
  "name": "A String", # Output only. The full resource name of the Connector Run. Format: `projects/*/locations/*/collections/*/dataConnector/connectorRuns/*`. The `connector_run_id` is system-generated.
  "startTime": "A String", # Output only. The time when the connector run started.
  "state": "A String", # Output only. The state of the sync run.
  "stateUpdateTime": "A String", # Timestamp at which the connector run sync state was last updated.
  "trigger": "A String", # Output only. The trigger for this ConnectorRun.
}