Class v1.VpcAccessServiceClient (1.0.5)

Serverless VPC Access API allows users to create and manage connectors for App Engine, Cloud Functions and Cloud Run to have internal connections to Virtual Private Cloud networks. v1

Package

@google-cloud/vpc-access!

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of VpcAccessServiceClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
TypeDescription
{ [name: string]: Function; }

operationsClient

operationsClient: gax.OperationsClient;
Property Value
TypeDescription
gax.OperationsClient

pathTemplates

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

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

scopes

static get scopes(): string[];

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

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

vpcAccessServiceStub

vpcAccessServiceStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
Promise<{ [name: string]: Function; }>

warn

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

Methods

checkCreateConnectorProgress(name)

checkCreateConnectorProgress(name: string): Promise<LROperation<protos.google.cloud.vpcaccess.v1.Connector, protos.google.cloud.vpcaccess.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.vpcaccess.v1.Connector, protos.google.cloud.vpcaccess.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

checkDeleteConnectorProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vpcaccess.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

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
TypeDescription
Promise<void>

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

connectorPath(project, location, connector)

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

Return a fully-qualified connector resource name string.

Parameters
NameDescription
project string
location string
connector string
Returns
TypeDescription
string

{string} Resource name string.

createConnector(request, options)

createConnector(request?: protos.google.cloud.vpcaccess.v1.ICreateConnectorRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vpcaccess.v1.IConnector, protos.google.cloud.vpcaccess.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.ICreateConnectorRequest
options CallOptions
Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.vpcaccess.v1.IConnector, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

createConnector(request, options, callback)

createConnector(request: protos.google.cloud.vpcaccess.v1.ICreateConnectorRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vpcaccess.v1.IConnector, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.ICreateConnectorRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vpcaccess.v1.IConnector, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createConnector(request, callback)

createConnector(request: protos.google.cloud.vpcaccess.v1.ICreateConnectorRequest, callback: Callback<LROperation<protos.google.cloud.vpcaccess.v1.IConnector, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.ICreateConnectorRequest
callback Callback<LROperation<protos.google.cloud.vpcaccess.v1.IConnector, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteConnector(request, options)

deleteConnector(request?: protos.google.cloud.vpcaccess.v1.IDeleteConnectorRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vpcaccess.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.IDeleteConnectorRequest
options CallOptions
Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

deleteConnector(request, options, callback)

deleteConnector(request: protos.google.cloud.vpcaccess.v1.IDeleteConnectorRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.IDeleteConnectorRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteConnector(request, callback)

deleteConnector(request: protos.google.cloud.vpcaccess.v1.IDeleteConnectorRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.IDeleteConnectorRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vpcaccess.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getConnector(request, options)

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

getConnector(request, options, callback)

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

getConnector(request, callback)

getConnector(request: protos.google.cloud.vpcaccess.v1.IGetConnectorRequest, callback: Callback<protos.google.cloud.vpcaccess.v1.IConnector, protos.google.cloud.vpcaccess.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.IGetConnectorRequest
callback Callback<protos.google.cloud.vpcaccess.v1.IConnector, protos.google.cloud.vpcaccess.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
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
TypeDescription
Promise<{ [name: string]: Function; }>

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

listConnectors(request, options)

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

listConnectors(request, options, callback)

listConnectors(request: protos.google.cloud.vpcaccess.v1.IListConnectorsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vpcaccess.v1.IListConnectorsRequest, protos.google.cloud.vpcaccess.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.vpcaccess.v1.IConnector>): void;
Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.IListConnectorsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vpcaccess.v1.IListConnectorsRequest, protos.google.cloud.vpcaccess.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.vpcaccess.v1.IConnector>
Returns
TypeDescription
void

listConnectors(request, callback)

listConnectors(request: protos.google.cloud.vpcaccess.v1.IListConnectorsRequest, callback: PaginationCallback<protos.google.cloud.vpcaccess.v1.IListConnectorsRequest, protos.google.cloud.vpcaccess.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.vpcaccess.v1.IConnector>): void;
Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.IListConnectorsRequest
callback PaginationCallback<protos.google.cloud.vpcaccess.v1.IListConnectorsRequest, protos.google.cloud.vpcaccess.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.vpcaccess.v1.IConnector>
Returns
TypeDescription
void

listConnectorsAsync(request, options)

listConnectorsAsync(request?: protos.google.cloud.vpcaccess.v1.IListConnectorsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vpcaccess.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
NameDescription
request protos.google.cloud.vpcaccess.v1.IListConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.vpcaccess.v1.IConnector>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listConnectorsStream(request, options)

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

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.vpcaccess.v1.IListConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchConnectorFromConnectorName(connectorName)

matchConnectorFromConnectorName(connectorName: string): string | number;

Parse the connector from Connector resource.

Parameter
NameDescription
connectorName string

A fully-qualified path representing Connector resource.

Returns
TypeDescription
string | number

{string} A string representing the connector.

matchLocationFromConnectorName(connectorName)

matchLocationFromConnectorName(connectorName: string): string | number;

Parse the location from Connector resource.

Parameter
NameDescription
connectorName string

A fully-qualified path representing Connector resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromConnectorName(connectorName)

matchProjectFromConnectorName(connectorName: string): string | number;

Parse the project from Connector resource.

Parameter
NameDescription
connectorName string

A fully-qualified path representing Connector resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.