Class v1.ConnectorsClient (0.7.1)

Connectors is the interface for managing Connectors. v1

Package

@google-cloud/connectors

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of ConnectorsClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new ConnectorsClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

connectorsStub

connectorsStub?: Promise<{
        [name: string]: Function;
    }>;

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

cancelOperation(request, optionsOrCallback, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
request CancelOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkCreateConnectionProgress(name)

checkCreateConnectionProgress(name: string): Promise<LROperation<protos.google.cloud.connectors.v1.Connection, protos.google.cloud.connectors.v1.OperationMetadata>>;

Check the status of the long running operation returned by createConnection().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.connectors.v1.Connection, protos.google.cloud.connectors.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource of the Connection, of the form:
   *  `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. Identifier to assign to the Connection. Must be unique within
   *  scope of the parent resource.
   */
  // const connectionId = 'abc123'
  /**
   *  Required. Connection resource.
   */
  // const connection = {}

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callCreateConnection() {
    // Construct request
    const request = {
      parent,
      connectionId,
      connection,
    };

    // Run request
    const [operation] = await connectorsClient.createConnection(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateConnection();

checkDeleteConnectionProgress(name)

checkDeleteConnectionProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.connectors.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteConnection().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.connectors.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the form:
   *  `projects/* /locations/* /connections/*`
   */
  // const name = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callDeleteConnection() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await connectorsClient.deleteConnection(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteConnection();

checkRefreshConnectionSchemaMetadataProgress(name)

checkRefreshConnectionSchemaMetadataProgress(name: string): Promise<LROperation<protos.google.cloud.connectors.v1.ConnectionSchemaMetadata, protos.google.cloud.connectors.v1.OperationMetadata>>;

Check the status of the long running operation returned by refreshConnectionSchemaMetadata().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.connectors.v1.ConnectionSchemaMetadata, protos.google.cloud.connectors.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name.
   *  Format:
   *  projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata
   */
  // const name = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callRefreshConnectionSchemaMetadata() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await connectorsClient.refreshConnectionSchemaMetadata(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRefreshConnectionSchemaMetadata();

checkUpdateConnectionProgress(name)

checkUpdateConnectionProgress(name: string): Promise<LROperation<protos.google.cloud.connectors.v1.Connection, protos.google.cloud.connectors.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateConnection().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.connectors.v1.Connection, protos.google.cloud.connectors.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Connection resource.
   */
  // const connection = {}
  /**
   *  Required. You can modify only the fields listed below.
   *  To lock/unlock a connection:
   *  * `lock_config`
   *  To suspend/resume a connection:
   *  * `suspended`
   *  To update the connection details:
   *  * `description`
   *  * `labels`
   *  * `connector_version`
   *  * `config_variables`
   *  * `auth_config`
   *  * `destination_configs`
   *  * `node_config`
   */
  // const updateMask = {}

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callUpdateConnection() {
    // Construct request
    const request = {
      connection,
      updateMask,
    };

    // Run request
    const [operation] = await connectorsClient.updateConnection(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateConnection();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

connectionPath(project, location, connection)

connectionPath(project: string, location: string, connection: string): string;

Return a fully-qualified connection resource name string.

Parameters
Name Description
project string
location string
connection string
Returns
Type Description
string

{string} Resource name string.

connectionSchemaMetadataPath(project, location, connection)

connectionSchemaMetadataPath(project: string, location: string, connection: string): string;

Return a fully-qualified connectionSchemaMetadata resource name string.

Parameters
Name Description
project string
location string
connection string
Returns
Type Description
string

{string} Resource name string.

connectorPath(project, location, provider, connector)

connectorPath(project: string, location: string, provider: string, connector: string): string;

Return a fully-qualified connector resource name string.

Parameters
Name Description
project string
location string
provider string
connector string
Returns
Type Description
string

{string} Resource name string.

connectorVersionPath(project, location, provider, connector, version)

connectorVersionPath(project: string, location: string, provider: string, connector: string, version: string): string;

Return a fully-qualified connectorVersion resource name string.

Parameters
Name Description
project string
location string
provider string
connector string
version string
Returns
Type Description
string

{string} Resource name string.

createConnection(request, options)

createConnection(request?: protos.google.cloud.connectors.v1.ICreateConnectionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Connection in a given project and location.

Parameters
Name Description
request ICreateConnectionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource of the Connection, of the form:
   *  `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. Identifier to assign to the Connection. Must be unique within
   *  scope of the parent resource.
   */
  // const connectionId = 'abc123'
  /**
   *  Required. Connection resource.
   */
  // const connection = {}

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callCreateConnection() {
    // Construct request
    const request = {
      parent,
      connectionId,
      connection,
    };

    // Run request
    const [operation] = await connectorsClient.createConnection(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateConnection();

createConnection(request, options, callback)

createConnection(request: protos.google.cloud.connectors.v1.ICreateConnectionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateConnectionRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createConnection(request, callback)

createConnection(request: protos.google.cloud.connectors.v1.ICreateConnectionRequest, callback: Callback<LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateConnectionRequest
callback Callback<LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteConnection(request, options)

deleteConnection(request?: protos.google.cloud.connectors.v1.IDeleteConnectionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.connectors.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single Connection.

Parameters
Name Description
request IDeleteConnectionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the form:
   *  `projects/* /locations/* /connections/*`
   */
  // const name = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callDeleteConnection() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await connectorsClient.deleteConnection(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteConnection();

deleteConnection(request, options, callback)

deleteConnection(request: protos.google.cloud.connectors.v1.IDeleteConnectionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteConnectionRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteConnection(request, callback)

deleteConnection(request: protos.google.cloud.connectors.v1.IDeleteConnectionRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteConnectionRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteOperation(request, optionsOrCallback, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request DeleteOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

getConnection(request, options)

getConnection(request?: protos.google.cloud.connectors.v1.IGetConnectionRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IConnection,
        protos.google.cloud.connectors.v1.IGetConnectionRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Connection.

Parameters
Name Description
request IGetConnectionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IGetConnectionRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Connection. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the form:
   *  `projects/* /locations/* /connections/*`
   */
  // const name = 'abc123'
  /**
   *  Specifies which fields of the Connection are returned in the response.
   *  Defaults to `BASIC` view.
   */
  // const view = {}

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callGetConnection() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await connectorsClient.getConnection(request);
    console.log(response);
  }

  callGetConnection();

getConnection(request, options, callback)

getConnection(request: protos.google.cloud.connectors.v1.IGetConnectionRequest, options: CallOptions, callback: Callback<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IGetConnectionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetConnectionRequest
options CallOptions
callback Callback<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IGetConnectionRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getConnection(request, callback)

getConnection(request: protos.google.cloud.connectors.v1.IGetConnectionRequest, callback: Callback<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IGetConnectionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetConnectionRequest
callback Callback<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IGetConnectionRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getConnectionSchemaMetadata(request, options)

getConnectionSchemaMetadata(request?: protos.google.cloud.connectors.v1.IGetConnectionSchemaMetadataRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IConnectionSchemaMetadata,
        (protos.google.cloud.connectors.v1.IGetConnectionSchemaMetadataRequest | undefined),
        {} | undefined
    ]>;

Gets schema metadata of a connection. SchemaMetadata is a singleton resource for each connection.

Parameters
Name Description
request IGetConnectionSchemaMetadataRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, (protos.google.cloud.connectors.v1.IGetConnectionSchemaMetadataRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Connection name
   *  Format:
   *  projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata
   */
  // const name = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callGetConnectionSchemaMetadata() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await connectorsClient.getConnectionSchemaMetadata(request);
    console.log(response);
  }

  callGetConnectionSchemaMetadata();

getConnectionSchemaMetadata(request, options, callback)

getConnectionSchemaMetadata(request: protos.google.cloud.connectors.v1.IGetConnectionSchemaMetadataRequest, options: CallOptions, callback: Callback<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IGetConnectionSchemaMetadataRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetConnectionSchemaMetadataRequest
options CallOptions
callback Callback<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IGetConnectionSchemaMetadataRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getConnectionSchemaMetadata(request, callback)

getConnectionSchemaMetadata(request: protos.google.cloud.connectors.v1.IGetConnectionSchemaMetadataRequest, callback: Callback<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IGetConnectionSchemaMetadataRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetConnectionSchemaMetadataRequest
callback Callback<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IGetConnectionSchemaMetadataRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getConnector(request, options)

getConnector(request?: protos.google.cloud.connectors.v1.IGetConnectorRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IConnector,
        protos.google.cloud.connectors.v1.IGetConnectorRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Connector.

Parameters
Name Description
request IGetConnectorRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IConnector, protos.google.cloud.connectors.v1.IGetConnectorRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Connector. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the form:
   *  `projects/* /locations/* /providers/* /connectors/*`
   *  Only global location is supported for Connector resource.
   */
  // const name = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callGetConnector() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await connectorsClient.getConnector(request);
    console.log(response);
  }

  callGetConnector();

getConnector(request, options, callback)

getConnector(request: protos.google.cloud.connectors.v1.IGetConnectorRequest, options: CallOptions, callback: Callback<protos.google.cloud.connectors.v1.IConnector, protos.google.cloud.connectors.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetConnectorRequest
options CallOptions
callback Callback<protos.google.cloud.connectors.v1.IConnector, protos.google.cloud.connectors.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getConnector(request, callback)

getConnector(request: protos.google.cloud.connectors.v1.IGetConnectorRequest, callback: Callback<protos.google.cloud.connectors.v1.IConnector, protos.google.cloud.connectors.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetConnectorRequest
callback Callback<protos.google.cloud.connectors.v1.IConnector, protos.google.cloud.connectors.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getConnectorVersion(request, options)

getConnectorVersion(request?: protos.google.cloud.connectors.v1.IGetConnectorVersionRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IConnectorVersion,
        protos.google.cloud.connectors.v1.IGetConnectorVersionRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single connector version.

Parameters
Name Description
request IGetConnectorVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IConnectorVersion, protos.google.cloud.connectors.v1.IGetConnectorVersionRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ConnectorVersion. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the form:
   *  `projects/* /locations/* /providers/* /connectors/* /versions/*`
   *  Only global location is supported for ConnectorVersion resource.
   */
  // const name = 'abc123'
  /**
   *  Specifies which fields of the ConnectorVersion are returned in the
   *  response. Defaults to `CUSTOMER` view.
   */
  // const view = {}

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callGetConnectorVersion() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await connectorsClient.getConnectorVersion(request);
    console.log(response);
  }

  callGetConnectorVersion();

getConnectorVersion(request, options, callback)

getConnectorVersion(request: protos.google.cloud.connectors.v1.IGetConnectorVersionRequest, options: CallOptions, callback: Callback<protos.google.cloud.connectors.v1.IConnectorVersion, protos.google.cloud.connectors.v1.IGetConnectorVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetConnectorVersionRequest
options CallOptions
callback Callback<protos.google.cloud.connectors.v1.IConnectorVersion, protos.google.cloud.connectors.v1.IGetConnectorVersionRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getConnectorVersion(request, callback)

getConnectorVersion(request: protos.google.cloud.connectors.v1.IGetConnectorVersionRequest, callback: Callback<protos.google.cloud.connectors.v1.IConnectorVersion, protos.google.cloud.connectors.v1.IGetConnectorVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetConnectorVersionRequest
callback Callback<protos.google.cloud.connectors.v1.IConnectorVersion, protos.google.cloud.connectors.v1.IGetConnectorVersionRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getGlobalSettings(request, options)

getGlobalSettings(request?: protos.google.cloud.connectors.v1.IGetGlobalSettingsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.ISettings,
        protos.google.cloud.connectors.v1.IGetGlobalSettingsRequest | undefined,
        {} | undefined
    ]>;

GetGlobalSettings gets settings of a project. GlobalSettings is a singleton resource.

Parameters
Name Description
request IGetGlobalSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.ISettings, protos.google.cloud.connectors.v1.IGetGlobalSettingsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Settings. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Settings.
   */
  // const name = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callGetGlobalSettings() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await connectorsClient.getGlobalSettings(request);
    console.log(response);
  }

  callGetGlobalSettings();

getGlobalSettings(request, options, callback)

getGlobalSettings(request: protos.google.cloud.connectors.v1.IGetGlobalSettingsRequest, options: CallOptions, callback: Callback<protos.google.cloud.connectors.v1.ISettings, protos.google.cloud.connectors.v1.IGetGlobalSettingsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetGlobalSettingsRequest
options CallOptions
callback Callback<protos.google.cloud.connectors.v1.ISettings, protos.google.cloud.connectors.v1.IGetGlobalSettingsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getGlobalSettings(request, callback)

getGlobalSettings(request: protos.google.cloud.connectors.v1.IGetGlobalSettingsRequest, callback: Callback<protos.google.cloud.connectors.v1.ISettings, protos.google.cloud.connectors.v1.IGetGlobalSettingsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetGlobalSettingsRequest
callback Callback<protos.google.cloud.connectors.v1.ISettings, protos.google.cloud.connectors.v1.IGetGlobalSettingsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIamPolicy(request, options, callback)

getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.Policy]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
Name Description
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
Type Description
Promise<google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

const [response] = await client.getLocation(request);

getOperation(request, optionsOrCallback, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
request GetOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

getProvider(request, options)

getProvider(request?: protos.google.cloud.connectors.v1.IGetProviderRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IProvider,
        protos.google.cloud.connectors.v1.IGetProviderRequest | undefined,
        {} | undefined
    ]>;

Gets details of a provider.

Parameters
Name Description
request IGetProviderRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IProvider, protos.google.cloud.connectors.v1.IGetProviderRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Provider. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the form:
   *  `projects/* /locations/* /providers/*`
   *  Only global location is supported for Provider resource.
   */
  // const name = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callGetProvider() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await connectorsClient.getProvider(request);
    console.log(response);
  }

  callGetProvider();

getProvider(request, options, callback)

getProvider(request: protos.google.cloud.connectors.v1.IGetProviderRequest, options: CallOptions, callback: Callback<protos.google.cloud.connectors.v1.IProvider, protos.google.cloud.connectors.v1.IGetProviderRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetProviderRequest
options CallOptions
callback Callback<protos.google.cloud.connectors.v1.IProvider, protos.google.cloud.connectors.v1.IGetProviderRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getProvider(request, callback)

getProvider(request: protos.google.cloud.connectors.v1.IGetProviderRequest, callback: Callback<protos.google.cloud.connectors.v1.IProvider, protos.google.cloud.connectors.v1.IGetProviderRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetProviderRequest
callback Callback<protos.google.cloud.connectors.v1.IProvider, protos.google.cloud.connectors.v1.IGetProviderRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRuntimeConfig(request, options)

getRuntimeConfig(request?: protos.google.cloud.connectors.v1.IGetRuntimeConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IRuntimeConfig,
        protos.google.cloud.connectors.v1.IGetRuntimeConfigRequest | undefined,
        {} | undefined
    ]>;

Gets the runtimeConfig of a location. RuntimeConfig is a singleton resource for each location.

Parameters
Name Description
request IGetRuntimeConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IRuntimeConfig, protos.google.cloud.connectors.v1.IGetRuntimeConfigRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the form:
   *  `projects/* /locations/* /runtimeConfig`
   */
  // const name = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callGetRuntimeConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await connectorsClient.getRuntimeConfig(request);
    console.log(response);
  }

  callGetRuntimeConfig();

getRuntimeConfig(request, options, callback)

getRuntimeConfig(request: protos.google.cloud.connectors.v1.IGetRuntimeConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.connectors.v1.IRuntimeConfig, protos.google.cloud.connectors.v1.IGetRuntimeConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRuntimeConfigRequest
options CallOptions
callback Callback<protos.google.cloud.connectors.v1.IRuntimeConfig, protos.google.cloud.connectors.v1.IGetRuntimeConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRuntimeConfig(request, callback)

getRuntimeConfig(request: protos.google.cloud.connectors.v1.IGetRuntimeConfigRequest, callback: Callback<protos.google.cloud.connectors.v1.IRuntimeConfig, protos.google.cloud.connectors.v1.IGetRuntimeConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRuntimeConfigRequest
callback Callback<protos.google.cloud.connectors.v1.IRuntimeConfig, protos.google.cloud.connectors.v1.IGetRuntimeConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listConnections(request, options)

listConnections(request?: protos.google.cloud.connectors.v1.IListConnectionsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IConnection[],
        protos.google.cloud.connectors.v1.IListConnectionsRequest | null,
        protos.google.cloud.connectors.v1.IListConnectionsResponse
    ]>;

Lists Connections in a given project and location.

Parameters
Name Description
request IListConnectionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IConnection[], protos.google.cloud.connectors.v1.IListConnectionsRequest | null, protos.google.cloud.connectors.v1.IListConnectionsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Connection. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listConnectionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listConnections(request, options, callback)

listConnections(request: protos.google.cloud.connectors.v1.IListConnectionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListConnectionsRequest, protos.google.cloud.connectors.v1.IListConnectionsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnection>): void;
Parameters
Name Description
request IListConnectionsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.connectors.v1.IListConnectionsRequest, protos.google.cloud.connectors.v1.IListConnectionsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnection>
Returns
Type Description
void

listConnections(request, callback)

listConnections(request: protos.google.cloud.connectors.v1.IListConnectionsRequest, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListConnectionsRequest, protos.google.cloud.connectors.v1.IListConnectionsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnection>): void;
Parameters
Name Description
request IListConnectionsRequest
callback PaginationCallback<protos.google.cloud.connectors.v1.IListConnectionsRequest, protos.google.cloud.connectors.v1.IListConnectionsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnection>
Returns
Type Description
void

listConnectionsAsync(request, options)

listConnectionsAsync(request?: protos.google.cloud.connectors.v1.IListConnectionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.connectors.v1.IConnection>;

Equivalent to listConnections, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListConnectionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.connectors.v1.IConnection>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Connection. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource of the Connection, of the form:
   *  `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Page size.
   */
  // const pageSize = 1234
  /**
   *  Page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Filter.
   */
  // const filter = 'abc123'
  /**
   *  Order by parameters.
   */
  // const orderBy = 'abc123'
  /**
   *  Specifies which fields of the Connection are returned in the response.
   *  Defaults to `BASIC` view.
   */
  // const view = {}

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callListConnections() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = connectorsClient.listConnectionsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListConnections();

listConnectionsStream(request, options)

listConnectionsStream(request?: protos.google.cloud.connectors.v1.IListConnectionsRequest, options?: CallOptions): Transform;

Equivalent to listConnections, but returns a NodeJS Stream object.

Parameters
Name Description
request IListConnectionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Connection on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listConnectionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listConnectors(request, options)

listConnectors(request?: protos.google.cloud.connectors.v1.IListConnectorsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IConnector[],
        protos.google.cloud.connectors.v1.IListConnectorsRequest | null,
        protos.google.cloud.connectors.v1.IListConnectorsResponse
    ]>;

Lists Connectors in a given project and location.

Parameters
Name Description
request IListConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IConnector[], protos.google.cloud.connectors.v1.IListConnectorsRequest | null, protos.google.cloud.connectors.v1.IListConnectorsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Connector. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listConnectorsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listConnectors(request, options, callback)

listConnectors(request: protos.google.cloud.connectors.v1.IListConnectorsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListConnectorsRequest, protos.google.cloud.connectors.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnector>): void;
Parameters
Name Description
request IListConnectorsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.connectors.v1.IListConnectorsRequest, protos.google.cloud.connectors.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnector>
Returns
Type Description
void

listConnectors(request, callback)

listConnectors(request: protos.google.cloud.connectors.v1.IListConnectorsRequest, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListConnectorsRequest, protos.google.cloud.connectors.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnector>): void;
Parameters
Name Description
request IListConnectorsRequest
callback PaginationCallback<protos.google.cloud.connectors.v1.IListConnectorsRequest, protos.google.cloud.connectors.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnector>
Returns
Type Description
void

listConnectorsAsync(request, options)

listConnectorsAsync(request?: protos.google.cloud.connectors.v1.IListConnectorsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.connectors.v1.IConnector>;

Equivalent to listConnectors, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.connectors.v1.IConnector>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Connector. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource of the connectors, of the form:
   *  `projects/* /locations/* /providers/*`
   *  Only global location is supported for Connector resource.
   */
  // const parent = 'abc123'
  /**
   *  Page size.
   */
  // const pageSize = 1234
  /**
   *  Page token.
   */
  // const pageToken = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callListConnectors() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = connectorsClient.listConnectorsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListConnectors();

listConnectorsStream(request, options)

listConnectorsStream(request?: protos.google.cloud.connectors.v1.IListConnectorsRequest, options?: CallOptions): Transform;

Equivalent to listConnectors, but returns a NodeJS Stream object.

Parameters
Name Description
request IListConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Connector on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listConnectorsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listConnectorVersions(request, options)

listConnectorVersions(request?: protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IConnectorVersion[],
        protos.google.cloud.connectors.v1.IListConnectorVersionsRequest | null,
        protos.google.cloud.connectors.v1.IListConnectorVersionsResponse
    ]>;

Lists Connector Versions in a given project and location.

Parameters
Name Description
request IListConnectorVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IConnectorVersion[], protos.google.cloud.connectors.v1.IListConnectorVersionsRequest | null, protos.google.cloud.connectors.v1.IListConnectorVersionsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of ConnectorVersion. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listConnectorVersionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listConnectorVersions(request, options, callback)

listConnectorVersions(request: protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, protos.google.cloud.connectors.v1.IListConnectorVersionsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnectorVersion>): void;
Parameters
Name Description
request IListConnectorVersionsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, protos.google.cloud.connectors.v1.IListConnectorVersionsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnectorVersion>
Returns
Type Description
void

listConnectorVersions(request, callback)

listConnectorVersions(request: protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, protos.google.cloud.connectors.v1.IListConnectorVersionsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnectorVersion>): void;
Parameters
Name Description
request IListConnectorVersionsRequest
callback PaginationCallback<protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, protos.google.cloud.connectors.v1.IListConnectorVersionsResponse | null | undefined, protos.google.cloud.connectors.v1.IConnectorVersion>
Returns
Type Description
void

listConnectorVersionsAsync(request, options)

listConnectorVersionsAsync(request?: protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.connectors.v1.IConnectorVersion>;

Equivalent to listConnectorVersions, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListConnectorVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.connectors.v1.IConnectorVersion>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ConnectorVersion. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource of the connectors, of the form:
   *  `projects/* /locations/* /providers/* /connectors/*`
   *  Only global location is supported for ConnectorVersion resource.
   */
  // const parent = 'abc123'
  /**
   *  Page size.
   */
  // const pageSize = 1234
  /**
   *  Page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Specifies which fields of the ConnectorVersion are returned in the
   *  response. Defaults to `BASIC` view.
   */
  // const view = {}

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callListConnectorVersions() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = connectorsClient.listConnectorVersionsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListConnectorVersions();

listConnectorVersionsStream(request, options)

listConnectorVersionsStream(request?: protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, options?: CallOptions): Transform;

Equivalent to listConnectorVersions, but returns a NodeJS Stream object.

Parameters
Name Description
request IListConnectorVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing ConnectorVersion on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listConnectorVersionsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<google.cloud.location.ILocation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
Name Description
request ListOperationsRequest

The request object that will be sent.

options CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
Type Description
AsyncIterable<protos.google.longrunning.IOperation>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listProviders(request, options)

listProviders(request?: protos.google.cloud.connectors.v1.IListProvidersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IProvider[],
        protos.google.cloud.connectors.v1.IListProvidersRequest | null,
        protos.google.cloud.connectors.v1.IListProvidersResponse
    ]>;

Lists Providers in a given project and location.

Parameters
Name Description
request IListProvidersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IProvider[], protos.google.cloud.connectors.v1.IListProvidersRequest | null, protos.google.cloud.connectors.v1.IListProvidersResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Provider. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listProvidersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listProviders(request, options, callback)

listProviders(request: protos.google.cloud.connectors.v1.IListProvidersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListProvidersRequest, protos.google.cloud.connectors.v1.IListProvidersResponse | null | undefined, protos.google.cloud.connectors.v1.IProvider>): void;
Parameters
Name Description
request IListProvidersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.connectors.v1.IListProvidersRequest, protos.google.cloud.connectors.v1.IListProvidersResponse | null | undefined, protos.google.cloud.connectors.v1.IProvider>
Returns
Type Description
void

listProviders(request, callback)

listProviders(request: protos.google.cloud.connectors.v1.IListProvidersRequest, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListProvidersRequest, protos.google.cloud.connectors.v1.IListProvidersResponse | null | undefined, protos.google.cloud.connectors.v1.IProvider>): void;
Parameters
Name Description
request IListProvidersRequest
callback PaginationCallback<protos.google.cloud.connectors.v1.IListProvidersRequest, protos.google.cloud.connectors.v1.IListProvidersResponse | null | undefined, protos.google.cloud.connectors.v1.IProvider>
Returns
Type Description
void

listProvidersAsync(request, options)

listProvidersAsync(request?: protos.google.cloud.connectors.v1.IListProvidersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.connectors.v1.IProvider>;

Equivalent to listProviders, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListProvidersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.connectors.v1.IProvider>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Provider. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource of the API, of the form:
   *  `projects/* /locations/*`
   *  Only global location is supported for Provider resource.
   */
  // const parent = 'abc123'
  /**
   *  Page size.
   */
  // const pageSize = 1234
  /**
   *  Page token.
   */
  // const pageToken = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callListProviders() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = connectorsClient.listProvidersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListProviders();

listProvidersStream(request, options)

listProvidersStream(request?: protos.google.cloud.connectors.v1.IListProvidersRequest, options?: CallOptions): Transform;

Equivalent to listProviders, but returns a NodeJS Stream object.

Parameters
Name Description
request IListProvidersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Provider on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listProvidersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRuntimeActionSchemas(request, options)

listRuntimeActionSchemas(request?: protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IRuntimeActionSchema[],
        protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest | null,
        protos.google.cloud.connectors.v1.IListRuntimeActionSchemasResponse
    ]>;

List schema of a runtime actions filtered by action name.

Parameters
Name Description
request IListRuntimeActionSchemasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IRuntimeActionSchema[], protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest | null, protos.google.cloud.connectors.v1.IListRuntimeActionSchemasResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listRuntimeActionSchemasAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRuntimeActionSchemas(request, options, callback)

listRuntimeActionSchemas(request: protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, protos.google.cloud.connectors.v1.IListRuntimeActionSchemasResponse | null | undefined, protos.google.cloud.connectors.v1.IRuntimeActionSchema>): void;
Parameters
Name Description
request IListRuntimeActionSchemasRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, protos.google.cloud.connectors.v1.IListRuntimeActionSchemasResponse | null | undefined, protos.google.cloud.connectors.v1.IRuntimeActionSchema>
Returns
Type Description
void

listRuntimeActionSchemas(request, callback)

listRuntimeActionSchemas(request: protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, protos.google.cloud.connectors.v1.IListRuntimeActionSchemasResponse | null | undefined, protos.google.cloud.connectors.v1.IRuntimeActionSchema>): void;
Parameters
Name Description
request IListRuntimeActionSchemasRequest
callback PaginationCallback<protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, protos.google.cloud.connectors.v1.IListRuntimeActionSchemasResponse | null | undefined, protos.google.cloud.connectors.v1.IRuntimeActionSchema>
Returns
Type Description
void

listRuntimeActionSchemasAsync(request, options)

listRuntimeActionSchemasAsync(request?: protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.connectors.v1.IRuntimeActionSchema>;

Equivalent to listRuntimeActionSchemas, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListRuntimeActionSchemasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.connectors.v1.IRuntimeActionSchema>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource of RuntimeActionSchema
   *  Format:
   *  projects/{project}/locations/{location}/connections/{connection}
   */
  // const parent = 'abc123'
  /**
   *  Page size.
   */
  // const pageSize = 1234
  /**
   *  Page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Required. Filter
   *  Format:
   *  action="{actionId}"
   *  Only action field is supported with literal equality operator.
   *  Accepted filter example: action="CancelOrder"
   *  Wildcards are not supported in the filter currently.
   */
  // const filter = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callListRuntimeActionSchemas() {
    // Construct request
    const request = {
      parent,
      filter,
    };

    // Run request
    const iterable = connectorsClient.listRuntimeActionSchemasAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListRuntimeActionSchemas();

listRuntimeActionSchemasStream(request, options)

listRuntimeActionSchemasStream(request?: protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, options?: CallOptions): Transform;

Equivalent to listRuntimeActionSchemas, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRuntimeActionSchemasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listRuntimeActionSchemasAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRuntimeEntitySchemas(request, options)

listRuntimeEntitySchemas(request?: protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, options?: CallOptions): Promise<[
        protos.google.cloud.connectors.v1.IRuntimeEntitySchema[],
        protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest | null,
        protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasResponse
    ]>;

List schema of a runtime entities filtered by entity name.

Parameters
Name Description
request IListRuntimeEntitySchemasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.connectors.v1.IRuntimeEntitySchema[], protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest | null, protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listRuntimeEntitySchemasAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRuntimeEntitySchemas(request, options, callback)

listRuntimeEntitySchemas(request: protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasResponse | null | undefined, protos.google.cloud.connectors.v1.IRuntimeEntitySchema>): void;
Parameters
Name Description
request IListRuntimeEntitySchemasRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasResponse | null | undefined, protos.google.cloud.connectors.v1.IRuntimeEntitySchema>
Returns
Type Description
void

listRuntimeEntitySchemas(request, callback)

listRuntimeEntitySchemas(request: protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, callback: PaginationCallback<protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasResponse | null | undefined, protos.google.cloud.connectors.v1.IRuntimeEntitySchema>): void;
Parameters
Name Description
request IListRuntimeEntitySchemasRequest
callback PaginationCallback<protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasResponse | null | undefined, protos.google.cloud.connectors.v1.IRuntimeEntitySchema>
Returns
Type Description
void

listRuntimeEntitySchemasAsync(request, options)

listRuntimeEntitySchemasAsync(request?: protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.connectors.v1.IRuntimeEntitySchema>;

Equivalent to listRuntimeEntitySchemas, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListRuntimeEntitySchemasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.connectors.v1.IRuntimeEntitySchema>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource of RuntimeEntitySchema
   *  Format:
   *  projects/{project}/locations/{location}/connections/{connection}
   */
  // const parent = 'abc123'
  /**
   *  Page size.
   */
  // const pageSize = 1234
  /**
   *  Page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Required. Filter
   *  Format:
   *  entity="{entityId}"
   *  Only entity field is supported with literal equality operator.
   *  Accepted filter example: entity="Order"
   *  Wildcards are not supported in the filter currently.
   */
  // const filter = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callListRuntimeEntitySchemas() {
    // Construct request
    const request = {
      parent,
      filter,
    };

    // Run request
    const iterable = connectorsClient.listRuntimeEntitySchemasAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListRuntimeEntitySchemas();

listRuntimeEntitySchemasStream(request, options)

listRuntimeEntitySchemasStream(request?: protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, options?: CallOptions): Transform;

Equivalent to listRuntimeEntitySchemas, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRuntimeEntitySchemasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listRuntimeEntitySchemasAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchConnectionFromConnectionName(connectionName)

matchConnectionFromConnectionName(connectionName: string): string | number;

Parse the connection from Connection resource.

Parameter
Name Description
connectionName string

A fully-qualified path representing Connection resource.

Returns
Type Description
string | number

{string} A string representing the connection.

matchConnectionFromConnectionSchemaMetadataName(connectionSchemaMetadataName)

matchConnectionFromConnectionSchemaMetadataName(connectionSchemaMetadataName: string): string | number;

Parse the connection from ConnectionSchemaMetadata resource.

Parameter
Name Description
connectionSchemaMetadataName string

A fully-qualified path representing ConnectionSchemaMetadata resource.

Returns
Type Description
string | number

{string} A string representing the connection.

matchConnectorFromConnectorName(connectorName)

matchConnectorFromConnectorName(connectorName: string): string | number;

Parse the connector from Connector resource.

Parameter
Name Description
connectorName string

A fully-qualified path representing Connector resource.

Returns
Type Description
string | number

{string} A string representing the connector.

matchConnectorFromConnectorVersionName(connectorVersionName)

matchConnectorFromConnectorVersionName(connectorVersionName: string): string | number;

Parse the connector from ConnectorVersion resource.

Parameter
Name Description
connectorVersionName string

A fully-qualified path representing ConnectorVersion resource.

Returns
Type Description
string | number

{string} A string representing the connector.

matchLocationFromConnectionName(connectionName)

matchLocationFromConnectionName(connectionName: string): string | number;

Parse the location from Connection resource.

Parameter
Name Description
connectionName string

A fully-qualified path representing Connection resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromConnectionSchemaMetadataName(connectionSchemaMetadataName)

matchLocationFromConnectionSchemaMetadataName(connectionSchemaMetadataName: string): string | number;

Parse the location from ConnectionSchemaMetadata resource.

Parameter
Name Description
connectionSchemaMetadataName string

A fully-qualified path representing ConnectionSchemaMetadata resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromConnectorName(connectorName)

matchLocationFromConnectorName(connectorName: string): string | number;

Parse the location from Connector resource.

Parameter
Name Description
connectorName string

A fully-qualified path representing Connector resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromConnectorVersionName(connectorVersionName)

matchLocationFromConnectorVersionName(connectorVersionName: string): string | number;

Parse the location from ConnectorVersion resource.

Parameter
Name Description
connectorVersionName string

A fully-qualified path representing ConnectorVersion resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromProviderName(providerName)

matchLocationFromProviderName(providerName: string): string | number;

Parse the location from Provider resource.

Parameter
Name Description
providerName string

A fully-qualified path representing Provider resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRuntimeConfigName(runtimeConfigName)

matchLocationFromRuntimeConfigName(runtimeConfigName: string): string | number;

Parse the location from RuntimeConfig resource.

Parameter
Name Description
runtimeConfigName string

A fully-qualified path representing RuntimeConfig resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchProjectFromConnectionName(connectionName)

matchProjectFromConnectionName(connectionName: string): string | number;

Parse the project from Connection resource.

Parameter
Name Description
connectionName string

A fully-qualified path representing Connection resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromConnectionSchemaMetadataName(connectionSchemaMetadataName)

matchProjectFromConnectionSchemaMetadataName(connectionSchemaMetadataName: string): string | number;

Parse the project from ConnectionSchemaMetadata resource.

Parameter
Name Description
connectionSchemaMetadataName string

A fully-qualified path representing ConnectionSchemaMetadata resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromConnectorName(connectorName)

matchProjectFromConnectorName(connectorName: string): string | number;

Parse the project from Connector resource.

Parameter
Name Description
connectorName string

A fully-qualified path representing Connector resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromConnectorVersionName(connectorVersionName)

matchProjectFromConnectorVersionName(connectorVersionName: string): string | number;

Parse the project from ConnectorVersion resource.

Parameter
Name Description
connectorVersionName string

A fully-qualified path representing ConnectorVersion resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProviderName(providerName)

matchProjectFromProviderName(providerName: string): string | number;

Parse the project from Provider resource.

Parameter
Name Description
providerName string

A fully-qualified path representing Provider resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRuntimeConfigName(runtimeConfigName)

matchProjectFromRuntimeConfigName(runtimeConfigName: string): string | number;

Parse the project from RuntimeConfig resource.

Parameter
Name Description
runtimeConfigName string

A fully-qualified path representing RuntimeConfig resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromSettingsName(settingsName)

matchProjectFromSettingsName(settingsName: string): string | number;

Parse the project from Settings resource.

Parameter
Name Description
settingsName string

A fully-qualified path representing Settings resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProviderFromConnectorName(connectorName)

matchProviderFromConnectorName(connectorName: string): string | number;

Parse the provider from Connector resource.

Parameter
Name Description
connectorName string

A fully-qualified path representing Connector resource.

Returns
Type Description
string | number

{string} A string representing the provider.

matchProviderFromConnectorVersionName(connectorVersionName)

matchProviderFromConnectorVersionName(connectorVersionName: string): string | number;

Parse the provider from ConnectorVersion resource.

Parameter
Name Description
connectorVersionName string

A fully-qualified path representing ConnectorVersion resource.

Returns
Type Description
string | number

{string} A string representing the provider.

matchProviderFromProviderName(providerName)

matchProviderFromProviderName(providerName: string): string | number;

Parse the provider from Provider resource.

Parameter
Name Description
providerName string

A fully-qualified path representing Provider resource.

Returns
Type Description
string | number

{string} A string representing the provider.

matchVersionFromConnectorVersionName(connectorVersionName)

matchVersionFromConnectorVersionName(connectorVersionName: string): string | number;

Parse the version from ConnectorVersion resource.

Parameter
Name Description
connectorVersionName string

A fully-qualified path representing ConnectorVersion resource.

Returns
Type Description
string | number

{string} A string representing the version.

providerPath(project, location, provider)

providerPath(project: string, location: string, provider: string): string;

Return a fully-qualified provider resource name string.

Parameters
Name Description
project string
location string
provider string
Returns
Type Description
string

{string} Resource name string.

refreshConnectionSchemaMetadata(request, options)

refreshConnectionSchemaMetadata(request?: protos.google.cloud.connectors.v1.IRefreshConnectionSchemaMetadataRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Refresh runtime schema of a connection.

Parameters
Name Description
request IRefreshConnectionSchemaMetadataRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name.
   *  Format:
   *  projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata
   */
  // const name = 'abc123'

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callRefreshConnectionSchemaMetadata() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await connectorsClient.refreshConnectionSchemaMetadata(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRefreshConnectionSchemaMetadata();

refreshConnectionSchemaMetadata(request, options, callback)

refreshConnectionSchemaMetadata(request: protos.google.cloud.connectors.v1.IRefreshConnectionSchemaMetadataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRefreshConnectionSchemaMetadataRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

refreshConnectionSchemaMetadata(request, callback)

refreshConnectionSchemaMetadata(request: protos.google.cloud.connectors.v1.IRefreshConnectionSchemaMetadataRequest, callback: Callback<LROperation<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRefreshConnectionSchemaMetadataRequest
callback Callback<LROperation<protos.google.cloud.connectors.v1.IConnectionSchemaMetadata, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

runtimeConfigPath(project, location)

runtimeConfigPath(project: string, location: string): string;

Return a fully-qualified runtimeConfig resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

setIamPolicy(request, options, callback)

setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.Policy]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

settingsPath(project)

settingsPath(project: string): string;

Return a fully-qualified settings resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

testIamPermissions(request, options, callback)

testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.TestIamPermissionsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

updateConnection(request, options)

updateConnection(request?: protos.google.cloud.connectors.v1.IUpdateConnectionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single Connection.

Parameters
Name Description
request IUpdateConnectionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Connection resource.
   */
  // const connection = {}
  /**
   *  Required. You can modify only the fields listed below.
   *  To lock/unlock a connection:
   *  * `lock_config`
   *  To suspend/resume a connection:
   *  * `suspended`
   *  To update the connection details:
   *  * `description`
   *  * `labels`
   *  * `connector_version`
   *  * `config_variables`
   *  * `auth_config`
   *  * `destination_configs`
   *  * `node_config`
   */
  // const updateMask = {}

  // Imports the Connectors library
  const {ConnectorsClient} = require('@google-cloud/connectors').v1;

  // Instantiates a client
  const connectorsClient = new ConnectorsClient();

  async function callUpdateConnection() {
    // Construct request
    const request = {
      connection,
      updateMask,
    };

    // Run request
    const [operation] = await connectorsClient.updateConnection(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateConnection();

updateConnection(request, options, callback)

updateConnection(request: protos.google.cloud.connectors.v1.IUpdateConnectionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateConnectionRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateConnection(request, callback)

updateConnection(request: protos.google.cloud.connectors.v1.IUpdateConnectionRequest, callback: Callback<LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateConnectionRequest
callback Callback<LROperation<protos.google.cloud.connectors.v1.IConnection, protos.google.cloud.connectors.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void