Connectors API . projects . locations . connections

Instance Methods

actions()

Returns the actions Resource.

entityTypes()

Returns the entityTypes Resource.

checkReadiness(name, x__xgafv=None)

Reports readiness status of the connector. Similar logic to GetStatus but modified for kubernetes health check to understand.

checkStatus(name, x__xgafv=None)

Reports the status of the connection. Note that when the connection is in a state that is not ACTIVE, the implementation of this RPC method must return a Status with the corresponding State instead of returning a gRPC status code that is not "OK", which indicates that ConnectionStatus itself, not the connection, failed.

close()

Close httplib2 connections.

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

ExchangeAuthCode exchanges the OAuth authorization code (and other necessary data) for an access token (and associated credentials).

executeSqlQuery(connection, body=None, x__xgafv=None)

Executes a SQL statement specified in the body of the request. An example of this SQL statement in the case of Salesforce connector would be 'select * from Account a, Order o where a.Id = o.AccountId'.

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

RefreshAccessToken exchanges the OAuth refresh token (and other necessary data) for a new access token (and new associated credentials).

Method Details

checkReadiness(name, x__xgafv=None)
Reports readiness status of the connector. Similar logic to GetStatus but modified for kubernetes health check to understand.

Args:
  name: string, A parameter (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response containing status of the connector for readiness prober.
  "status": "A String",
}
checkStatus(name, x__xgafv=None)
Reports the status of the connection. Note that when the connection is in a state that is not ACTIVE, the implementation of this RPC method must return a Status with the corresponding State instead of returning a gRPC status code that is not "OK", which indicates that ConnectionStatus itself, not the connection, failed.

Args:
  name: string, A parameter (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The status of the connector.
  "description": "A String", # When the connector is not in ACTIVE state, the description must be populated to specify the reason why it's not in ACTIVE state.
  "state": "A String", # State of the connector.
}
close()
Close httplib2 connections.
exchangeAuthCode(name, body=None, x__xgafv=None)
ExchangeAuthCode exchanges the OAuth authorization code (and other necessary data) for an access token (and associated credentials).

Args:
  name: string, A parameter (required)
  body: object, The request body.
    The object takes the form of:

{ # ExchangeAuthCodeRequest currently includes the auth code data.
  "authCodeData": { # AuthCodeData contains the data the runtime plane will give the connector backend in exchange for access and refresh tokens. # Optional. AuthCodeData contains the data the runtime requires to exchange for access and refresh tokens. If the data is not provided, the runtime will read the data from the secret manager.
    "authCode": "A String", # OAuth authorization code.
    "pkceVerifier": "A String", # OAuth PKCE verifier, needed if PKCE is enabled for this particular connection.
    "redirectUri": "A String", # OAuth redirect URI passed in during the auth code flow, required by some OAuth backends.
  },
}

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

Returns:
  An object of the form:

    { # ExchangeAuthCodeResponse includes the returned access token and its associated credentials.
  "accessCredentials": { # AccessCredentials includes the OAuth access token, and the other fields returned along with it.
    "accessToken": "A String", # OAuth access token.
    "expiresIn": "A String", # Duration till the access token expires.
    "refreshToken": "A String", # OAuth refresh token.
  },
}
executeSqlQuery(connection, body=None, x__xgafv=None)
Executes a SQL statement specified in the body of the request. An example of this SQL statement in the case of Salesforce connector would be 'select * from Account a, Order o where a.Id = o.AccountId'.

Args:
  connection: string, Required. Resource name of the Connection. Format: projects/{project}/locations/{location}/connections/{connection} (required)
  body: object, The request body.
    The object takes the form of:

{ # An execute sql query request containing the query and the connection to execute it on.
  "query": { # A wrapper around the SQL query statement. This is needed so that the JSON representation of ExecuteSqlQueryRequest has the following format: `{"query":"select *"}`. # Required. SQL statement passed by clients like Integration Platform, the query is passed as-is to the driver used for interfacing with external systems.
    "maxRows": "A String", # Sets the limit for the maximum number of rows returned after the query execution.
    "query": "A String", # Required. Sql query to execute.
    "queryParameters": [ # In the struct, the value corresponds to the value of query parameter and date type corresponds to the date type of the query parameter.
      { # Query parameter definition
        "dataType": "A String",
        "value": "",
      },
    ],
    "timeout": "A String", # Sets the number of seconds the driver will wait for a query to execute.
  },
}

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

Returns:
  An object of the form:

    { # A response returned by the connection after executing the sql query.
  "results": [ # In the case of successful execution of the query the response contains results returned by the external system. For example, the result rows of the query are contained in the 'results' Struct list - "results": [ { "field1": "val1", "field2": "val2",.. },.. ] Each Struct row can contain fields any type of like nested Structs or lists.
    {
      "a_key": "", # Properties of the object.
    },
  ],
}
refreshAccessToken(name, body=None, x__xgafv=None)
RefreshAccessToken exchanges the OAuth refresh token (and other necessary data) for a new access token (and new associated credentials).

Args:
  name: string, A parameter (required)
  body: object, The request body.
    The object takes the form of:

{ # RefreshAccessTokenRequest includes the refresh token.
  "refreshToken": "A String", # Optional. Refresh Token String. If the Refresh Token is not provided, the runtime will read the data from the secret manager.
}

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

Returns:
  An object of the form:

    { # RefreshAccessTokenResponse includes the returned access token and its associated credentials.
  "accessCredentials": { # AccessCredentials includes the OAuth access token, and the other fields returned along with it.
    "accessToken": "A String", # OAuth access token.
    "expiresIn": "A String", # Duration till the access token expires.
    "refreshToken": "A String", # OAuth refresh token.
  },
}