Class v1.NetworkServicesClient (0.2.1)

v1

Package

@google-cloud/networkservices

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of NetworkServicesClient.

Parameters
NameDescription
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 NetworkServicesClient({fallback: true}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

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

locationsClient

locationsClient: LocationsClient;

networkServicesStub

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

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.

warn

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

Methods

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | 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
NameDescription
request CancelOperationRequest

The request object that will be sent.

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

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<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
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

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

checkCreateEndpointPolicyProgress(name)

checkCreateEndpointPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.EndpointPolicy, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.EndpointPolicy, protos.google.cloud.networkservices.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. The parent resource of the EndpointPolicy. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the EndpointPolicy resource to be created.
   *  E.g. "CustomECS".
   */
  // const endpointPolicyId = 'abc123'
  /**
   *  Required. EndpointPolicy resource to be created.
   */
  // const endpointPolicy = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateEndpointPolicy() {
    // Construct request
    const request = {
      parent,
      endpointPolicyId,
      endpointPolicy,
    };

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

  callCreateEndpointPolicy();

checkCreateGatewayProgress(name)

checkCreateGatewayProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.Gateway, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.Gateway, protos.google.cloud.networkservices.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. The parent resource of the Gateway. Must be in the
   *  format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the Gateway resource to be created.
   */
  // const gatewayId = 'abc123'
  /**
   *  Required. Gateway resource to be created.
   */
  // const gateway = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateGateway() {
    // Construct request
    const request = {
      parent,
      gatewayId,
      gateway,
    };

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

  callCreateGateway();

checkCreateGrpcRouteProgress(name)

checkCreateGrpcRouteProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.GrpcRoute, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.GrpcRoute, protos.google.cloud.networkservices.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. The parent resource of the GrpcRoute. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the GrpcRoute resource to be created.
   */
  // const grpcRouteId = 'abc123'
  /**
   *  Required. GrpcRoute resource to be created.
   */
  // const grpcRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateGrpcRoute() {
    // Construct request
    const request = {
      parent,
      grpcRouteId,
      grpcRoute,
    };

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

  callCreateGrpcRoute();

checkCreateHttpRouteProgress(name)

checkCreateHttpRouteProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.HttpRoute, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.HttpRoute, protos.google.cloud.networkservices.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. The parent resource of the HttpRoute. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the HttpRoute resource to be created.
   */
  // const httpRouteId = 'abc123'
  /**
   *  Required. HttpRoute resource to be created.
   */
  // const httpRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateHttpRoute() {
    // Construct request
    const request = {
      parent,
      httpRouteId,
      httpRoute,
    };

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

  callCreateHttpRoute();

checkCreateMeshProgress(name)

checkCreateMeshProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.Mesh, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.Mesh, protos.google.cloud.networkservices.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. The parent resource of the Mesh. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the Mesh resource to be created.
   */
  // const meshId = 'abc123'
  /**
   *  Required. Mesh resource to be created.
   */
  // const mesh = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateMesh() {
    // Construct request
    const request = {
      parent,
      meshId,
      mesh,
    };

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

  callCreateMesh();

checkCreateServiceBindingProgress(name)

checkCreateServiceBindingProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.ServiceBinding, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.ServiceBinding, protos.google.cloud.networkservices.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. The parent resource of the ServiceBinding. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the ServiceBinding resource to be created.
   */
  // const serviceBindingId = 'abc123'
  /**
   *  Required. ServiceBinding resource to be created.
   */
  // const serviceBinding = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateServiceBinding() {
    // Construct request
    const request = {
      parent,
      serviceBindingId,
      serviceBinding,
    };

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

  callCreateServiceBinding();

checkCreateTcpRouteProgress(name)

checkCreateTcpRouteProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.TcpRoute, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.TcpRoute, protos.google.cloud.networkservices.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. The parent resource of the TcpRoute. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the TcpRoute resource to be created.
   */
  // const tcpRouteId = 'abc123'
  /**
   *  Required. TcpRoute resource to be created.
   */
  // const tcpRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateTcpRoute() {
    // Construct request
    const request = {
      parent,
      tcpRouteId,
      tcpRoute,
    };

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

  callCreateTcpRoute();

checkCreateTlsRouteProgress(name)

checkCreateTlsRouteProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.TlsRoute, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.TlsRoute, protos.google.cloud.networkservices.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. The parent resource of the TlsRoute. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the TlsRoute resource to be created.
   */
  // const tlsRouteId = 'abc123'
  /**
   *  Required. TlsRoute resource to be created.
   */
  // const tlsRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateTlsRoute() {
    // Construct request
    const request = {
      parent,
      tlsRouteId,
      tlsRoute,
    };

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

  callCreateTlsRoute();

checkDeleteEndpointPolicyProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.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. A name of the EndpointPolicy to delete. Must be in the format
   *  `projects/* /locations/global/endpointPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteEndpointPolicy();

checkDeleteGatewayProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.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. A name of the Gateway to delete. Must be in the format
   *  `projects/* /locations/* /gateways/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteGateway();

checkDeleteGrpcRouteProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.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. A name of the GrpcRoute to delete. Must be in the format
   *  `projects/* /locations/global/grpcRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteGrpcRoute();

checkDeleteHttpRouteProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.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. A name of the HttpRoute to delete. Must be in the format
   *  `projects/* /locations/global/httpRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteHttpRoute();

checkDeleteMeshProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.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. A name of the Mesh to delete. Must be in the format
   *  `projects/* /locations/global/meshes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteMesh();

checkDeleteServiceBindingProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.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. A name of the ServiceBinding to delete. Must be in the format
   *  `projects/* /locations/global/serviceBindings/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteServiceBinding();

checkDeleteTcpRouteProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.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. A name of the TcpRoute to delete. Must be in the format
   *  `projects/* /locations/global/tcpRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteTcpRoute();

checkDeleteTlsRouteProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.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. A name of the TlsRoute to delete. Must be in the format
   *  `projects/* /locations/global/tlsRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteTlsRoute();

checkUpdateEndpointPolicyProgress(name)

checkUpdateEndpointPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.EndpointPolicy, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.EndpointPolicy, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  EndpointPolicy resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated EndpointPolicy resource.
   */
  // const endpointPolicy = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateEndpointPolicy() {
    // Construct request
    const request = {
      endpointPolicy,
    };

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

  callUpdateEndpointPolicy();

checkUpdateGatewayProgress(name)

checkUpdateGatewayProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.Gateway, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.Gateway, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Gateway resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated Gateway resource.
   */
  // const gateway = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateGateway() {
    // Construct request
    const request = {
      gateway,
    };

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

  callUpdateGateway();

checkUpdateGrpcRouteProgress(name)

checkUpdateGrpcRouteProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.GrpcRoute, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.GrpcRoute, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  GrpcRoute resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated GrpcRoute resource.
   */
  // const grpcRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateGrpcRoute() {
    // Construct request
    const request = {
      grpcRoute,
    };

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

  callUpdateGrpcRoute();

checkUpdateHttpRouteProgress(name)

checkUpdateHttpRouteProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.HttpRoute, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.HttpRoute, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  HttpRoute resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated HttpRoute resource.
   */
  // const httpRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateHttpRoute() {
    // Construct request
    const request = {
      httpRoute,
    };

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

  callUpdateHttpRoute();

checkUpdateMeshProgress(name)

checkUpdateMeshProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.Mesh, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.Mesh, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Mesh resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated Mesh resource.
   */
  // const mesh = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateMesh() {
    // Construct request
    const request = {
      mesh,
    };

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

  callUpdateMesh();

checkUpdateTcpRouteProgress(name)

checkUpdateTcpRouteProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.TcpRoute, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.TcpRoute, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  TcpRoute resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated TcpRoute resource.
   */
  // const tcpRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateTcpRoute() {
    // Construct request
    const request = {
      tcpRoute,
    };

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

  callUpdateTcpRoute();

checkUpdateTlsRouteProgress(name)

checkUpdateTlsRouteProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1.TlsRoute, protos.google.cloud.networkservices.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1.TlsRoute, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  TlsRoute resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated TlsRoute resource.
   */
  // const tlsRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateTlsRoute() {
    // Construct request
    const request = {
      tlsRoute,
    };

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

  callUpdateTlsRoute();

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.

createEndpointPolicy(request, options)

createEndpointPolicy(request?: protos.google.cloud.networkservices.v1.ICreateEndpointPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new EndpointPolicy in a given project and location.

Parameters
NameDescription
request ICreateEndpointPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.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. The parent resource of the EndpointPolicy. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the EndpointPolicy resource to be created.
   *  E.g. "CustomECS".
   */
  // const endpointPolicyId = 'abc123'
  /**
   *  Required. EndpointPolicy resource to be created.
   */
  // const endpointPolicy = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateEndpointPolicy() {
    // Construct request
    const request = {
      parent,
      endpointPolicyId,
      endpointPolicy,
    };

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

  callCreateEndpointPolicy();

createEndpointPolicy(request, options, callback)

createEndpointPolicy(request: protos.google.cloud.networkservices.v1.ICreateEndpointPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateEndpointPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEndpointPolicy(request, callback)

createEndpointPolicy(request: protos.google.cloud.networkservices.v1.ICreateEndpointPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateEndpointPolicyRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createGateway(request, options)

createGateway(request?: protos.google.cloud.networkservices.v1.ICreateGatewayRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Gateway in a given project and location.

Parameters
NameDescription
request ICreateGatewayRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.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. The parent resource of the Gateway. Must be in the
   *  format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the Gateway resource to be created.
   */
  // const gatewayId = 'abc123'
  /**
   *  Required. Gateway resource to be created.
   */
  // const gateway = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateGateway() {
    // Construct request
    const request = {
      parent,
      gatewayId,
      gateway,
    };

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

  callCreateGateway();

createGateway(request, options, callback)

createGateway(request: protos.google.cloud.networkservices.v1.ICreateGatewayRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateGatewayRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createGateway(request, callback)

createGateway(request: protos.google.cloud.networkservices.v1.ICreateGatewayRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateGatewayRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createGrpcRoute(request, options)

createGrpcRoute(request?: protos.google.cloud.networkservices.v1.ICreateGrpcRouteRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new GrpcRoute in a given project and location.

Parameters
NameDescription
request ICreateGrpcRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.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. The parent resource of the GrpcRoute. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the GrpcRoute resource to be created.
   */
  // const grpcRouteId = 'abc123'
  /**
   *  Required. GrpcRoute resource to be created.
   */
  // const grpcRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateGrpcRoute() {
    // Construct request
    const request = {
      parent,
      grpcRouteId,
      grpcRoute,
    };

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

  callCreateGrpcRoute();

createGrpcRoute(request, options, callback)

createGrpcRoute(request: protos.google.cloud.networkservices.v1.ICreateGrpcRouteRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateGrpcRouteRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createGrpcRoute(request, callback)

createGrpcRoute(request: protos.google.cloud.networkservices.v1.ICreateGrpcRouteRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateGrpcRouteRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createHttpRoute(request, options)

createHttpRoute(request?: protos.google.cloud.networkservices.v1.ICreateHttpRouteRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new HttpRoute in a given project and location.

Parameters
NameDescription
request ICreateHttpRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.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. The parent resource of the HttpRoute. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the HttpRoute resource to be created.
   */
  // const httpRouteId = 'abc123'
  /**
   *  Required. HttpRoute resource to be created.
   */
  // const httpRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateHttpRoute() {
    // Construct request
    const request = {
      parent,
      httpRouteId,
      httpRoute,
    };

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

  callCreateHttpRoute();

createHttpRoute(request, options, callback)

createHttpRoute(request: protos.google.cloud.networkservices.v1.ICreateHttpRouteRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateHttpRouteRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createHttpRoute(request, callback)

createHttpRoute(request: protos.google.cloud.networkservices.v1.ICreateHttpRouteRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateHttpRouteRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createMesh(request, options)

createMesh(request?: protos.google.cloud.networkservices.v1.ICreateMeshRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Mesh in a given project and location.

Parameters
NameDescription
request ICreateMeshRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.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. The parent resource of the Mesh. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the Mesh resource to be created.
   */
  // const meshId = 'abc123'
  /**
   *  Required. Mesh resource to be created.
   */
  // const mesh = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateMesh() {
    // Construct request
    const request = {
      parent,
      meshId,
      mesh,
    };

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

  callCreateMesh();

createMesh(request, options, callback)

createMesh(request: protos.google.cloud.networkservices.v1.ICreateMeshRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateMeshRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createMesh(request, callback)

createMesh(request: protos.google.cloud.networkservices.v1.ICreateMeshRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateMeshRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServiceBinding(request, options)

createServiceBinding(request?: protos.google.cloud.networkservices.v1.ICreateServiceBindingRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new ServiceBinding in a given project and location.

Parameters
NameDescription
request ICreateServiceBindingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.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. The parent resource of the ServiceBinding. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the ServiceBinding resource to be created.
   */
  // const serviceBindingId = 'abc123'
  /**
   *  Required. ServiceBinding resource to be created.
   */
  // const serviceBinding = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateServiceBinding() {
    // Construct request
    const request = {
      parent,
      serviceBindingId,
      serviceBinding,
    };

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

  callCreateServiceBinding();

createServiceBinding(request, options, callback)

createServiceBinding(request: protos.google.cloud.networkservices.v1.ICreateServiceBindingRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateServiceBindingRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServiceBinding(request, callback)

createServiceBinding(request: protos.google.cloud.networkservices.v1.ICreateServiceBindingRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateServiceBindingRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createTcpRoute(request, options)

createTcpRoute(request?: protos.google.cloud.networkservices.v1.ICreateTcpRouteRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new TcpRoute in a given project and location.

Parameters
NameDescription
request ICreateTcpRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.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. The parent resource of the TcpRoute. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the TcpRoute resource to be created.
   */
  // const tcpRouteId = 'abc123'
  /**
   *  Required. TcpRoute resource to be created.
   */
  // const tcpRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateTcpRoute() {
    // Construct request
    const request = {
      parent,
      tcpRouteId,
      tcpRoute,
    };

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

  callCreateTcpRoute();

createTcpRoute(request, options, callback)

createTcpRoute(request: protos.google.cloud.networkservices.v1.ICreateTcpRouteRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateTcpRouteRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createTcpRoute(request, callback)

createTcpRoute(request: protos.google.cloud.networkservices.v1.ICreateTcpRouteRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateTcpRouteRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createTlsRoute(request, options)

createTlsRoute(request?: protos.google.cloud.networkservices.v1.ICreateTlsRouteRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new TlsRoute in a given project and location.

Parameters
NameDescription
request ICreateTlsRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.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. The parent resource of the TlsRoute. Must be in the
   *  format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the TlsRoute resource to be created.
   */
  // const tlsRouteId = 'abc123'
  /**
   *  Required. TlsRoute resource to be created.
   */
  // const tlsRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callCreateTlsRoute() {
    // Construct request
    const request = {
      parent,
      tlsRouteId,
      tlsRoute,
    };

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

  callCreateTlsRoute();

createTlsRoute(request, options, callback)

createTlsRoute(request: protos.google.cloud.networkservices.v1.ICreateTlsRouteRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateTlsRouteRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createTlsRoute(request, callback)

createTlsRoute(request: protos.google.cloud.networkservices.v1.ICreateTlsRouteRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateTlsRouteRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteEndpointPolicy(request, options)

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

Deletes a single EndpointPolicy.

Parameters
NameDescription
request IDeleteEndpointPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.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. A name of the EndpointPolicy to delete. Must be in the format
   *  `projects/* /locations/global/endpointPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteEndpointPolicy();

deleteEndpointPolicy(request, options, callback)

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

deleteEndpointPolicy(request, callback)

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

deleteGateway(request, options)

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

Deletes a single Gateway.

Parameters
NameDescription
request IDeleteGatewayRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.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. A name of the Gateway to delete. Must be in the format
   *  `projects/* /locations/* /gateways/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteGateway();

deleteGateway(request, options, callback)

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

deleteGateway(request, callback)

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

deleteGrpcRoute(request, options)

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

Deletes a single GrpcRoute.

Parameters
NameDescription
request IDeleteGrpcRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.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. A name of the GrpcRoute to delete. Must be in the format
   *  `projects/* /locations/global/grpcRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteGrpcRoute();

deleteGrpcRoute(request, options, callback)

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

deleteGrpcRoute(request, callback)

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

deleteHttpRoute(request, options)

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

Deletes a single HttpRoute.

Parameters
NameDescription
request IDeleteHttpRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.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. A name of the HttpRoute to delete. Must be in the format
   *  `projects/* /locations/global/httpRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteHttpRoute();

deleteHttpRoute(request, options, callback)

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

deleteHttpRoute(request, callback)

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

deleteMesh(request, options)

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

Deletes a single Mesh.

Parameters
NameDescription
request IDeleteMeshRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.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. A name of the Mesh to delete. Must be in the format
   *  `projects/* /locations/global/meshes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteMesh();

deleteMesh(request, options, callback)

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

deleteMesh(request, callback)

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

deleteOperation(request, options, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: 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
NameDescription
request DeleteOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | 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<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
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

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

deleteServiceBinding(request, options)

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

Deletes a single ServiceBinding.

Parameters
NameDescription
request IDeleteServiceBindingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.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. A name of the ServiceBinding to delete. Must be in the format
   *  `projects/* /locations/global/serviceBindings/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteServiceBinding();

deleteServiceBinding(request, options, callback)

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

deleteServiceBinding(request, callback)

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

deleteTcpRoute(request, options)

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

Deletes a single TcpRoute.

Parameters
NameDescription
request IDeleteTcpRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.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. A name of the TcpRoute to delete. Must be in the format
   *  `projects/* /locations/global/tcpRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteTcpRoute();

deleteTcpRoute(request, options, callback)

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

deleteTcpRoute(request, callback)

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

deleteTlsRoute(request, options)

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

Deletes a single TlsRoute.

Parameters
NameDescription
request IDeleteTlsRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.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. A name of the TlsRoute to delete. Must be in the format
   *  `projects/* /locations/global/tlsRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callDeleteTlsRoute();

deleteTlsRoute(request, options, callback)

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

deleteTlsRoute(request, callback)

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

endpointPolicyPath(project, location, endpointPolicy)

endpointPolicyPath(project: string, location: string, endpointPolicy: string): string;

Return a fully-qualified endpointPolicy resource name string.

Parameters
NameDescription
project string
location string
endpointPolicy string
Returns
TypeDescription
string

{string} Resource name string.

gatewayPath(project, location, gateway)

gatewayPath(project: string, location: string, gateway: string): string;

Return a fully-qualified gateway resource name string.

Parameters
NameDescription
project string
location string
gateway string
Returns
TypeDescription
string

{string} Resource name string.

getEndpointPolicy(request, options)

getEndpointPolicy(request?: protos.google.cloud.networkservices.v1.IGetEndpointPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IEndpointPolicy,
        (protos.google.cloud.networkservices.v1.IGetEndpointPolicyRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single EndpointPolicy.

Parameters
NameDescription
request IGetEndpointPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IEndpointPolicy, (protos.google.cloud.networkservices.v1.IGetEndpointPolicyRequest | 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. A name of the EndpointPolicy to get. Must be in the format
   *  `projects/* /locations/global/endpointPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

    // Run request
    const response = await networkservicesClient.getEndpointPolicy(request);
    console.log(response);
  }

  callGetEndpointPolicy();

getEndpointPolicy(request, options, callback)

getEndpointPolicy(request: protos.google.cloud.networkservices.v1.IGetEndpointPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IGetEndpointPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetEndpointPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IGetEndpointPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEndpointPolicy(request, callback)

getEndpointPolicy(request: protos.google.cloud.networkservices.v1.IGetEndpointPolicyRequest, callback: Callback<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IGetEndpointPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetEndpointPolicyRequest
callback Callback<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IGetEndpointPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGateway(request, options)

getGateway(request?: protos.google.cloud.networkservices.v1.IGetGatewayRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IGateway,
        protos.google.cloud.networkservices.v1.IGetGatewayRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Gateway.

Parameters
NameDescription
request IGetGatewayRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IGetGatewayRequest | 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. A name of the Gateway to get. Must be in the format
   *  `projects/* /locations/* /gateways/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

    // Run request
    const response = await networkservicesClient.getGateway(request);
    console.log(response);
  }

  callGetGateway();

getGateway(request, options, callback)

getGateway(request: protos.google.cloud.networkservices.v1.IGetGatewayRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IGetGatewayRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetGatewayRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IGetGatewayRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGateway(request, callback)

getGateway(request: protos.google.cloud.networkservices.v1.IGetGatewayRequest, callback: Callback<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IGetGatewayRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetGatewayRequest
callback Callback<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IGetGatewayRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGrpcRoute(request, options)

getGrpcRoute(request?: protos.google.cloud.networkservices.v1.IGetGrpcRouteRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IGrpcRoute,
        protos.google.cloud.networkservices.v1.IGetGrpcRouteRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single GrpcRoute.

Parameters
NameDescription
request IGetGrpcRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IGetGrpcRouteRequest | 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. A name of the GrpcRoute to get. Must be in the format
   *  `projects/* /locations/global/grpcRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

    // Run request
    const response = await networkservicesClient.getGrpcRoute(request);
    console.log(response);
  }

  callGetGrpcRoute();

getGrpcRoute(request, options, callback)

getGrpcRoute(request: protos.google.cloud.networkservices.v1.IGetGrpcRouteRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IGetGrpcRouteRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetGrpcRouteRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IGetGrpcRouteRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGrpcRoute(request, callback)

getGrpcRoute(request: protos.google.cloud.networkservices.v1.IGetGrpcRouteRequest, callback: Callback<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IGetGrpcRouteRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetGrpcRouteRequest
callback Callback<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IGetGrpcRouteRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getHttpRoute(request, options)

getHttpRoute(request?: protos.google.cloud.networkservices.v1.IGetHttpRouteRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IHttpRoute,
        protos.google.cloud.networkservices.v1.IGetHttpRouteRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single HttpRoute.

Parameters
NameDescription
request IGetHttpRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IGetHttpRouteRequest | 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. A name of the HttpRoute to get. Must be in the format
   *  `projects/* /locations/global/httpRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

    // Run request
    const response = await networkservicesClient.getHttpRoute(request);
    console.log(response);
  }

  callGetHttpRoute();

getHttpRoute(request, options, callback)

getHttpRoute(request: protos.google.cloud.networkservices.v1.IGetHttpRouteRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IGetHttpRouteRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetHttpRouteRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IGetHttpRouteRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getHttpRoute(request, callback)

getHttpRoute(request: protos.google.cloud.networkservices.v1.IGetHttpRouteRequest, callback: Callback<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IGetHttpRouteRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetHttpRouteRequest
callback Callback<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IGetHttpRouteRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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);

getMesh(request, options)

getMesh(request?: protos.google.cloud.networkservices.v1.IGetMeshRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IMesh,
        protos.google.cloud.networkservices.v1.IGetMeshRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Mesh.

Parameters
NameDescription
request IGetMeshRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IGetMeshRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Mesh. 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. A name of the Mesh to get. Must be in the format
   *  `projects/* /locations/global/meshes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

    // Run request
    const response = await networkservicesClient.getMesh(request);
    console.log(response);
  }

  callGetMesh();

getMesh(request, options, callback)

getMesh(request: protos.google.cloud.networkservices.v1.IGetMeshRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IGetMeshRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetMeshRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IGetMeshRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getMesh(request, callback)

getMesh(request: protos.google.cloud.networkservices.v1.IGetMeshRequest, callback: Callback<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IGetMeshRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetMeshRequest
callback Callback<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IGetMeshRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getOperation(request, options, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, options?: 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
NameDescription
request GetOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | 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<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
TypeDescription
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
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getServiceBinding(request, options)

getServiceBinding(request?: protos.google.cloud.networkservices.v1.IGetServiceBindingRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IServiceBinding,
        (protos.google.cloud.networkservices.v1.IGetServiceBindingRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single ServiceBinding.

Parameters
NameDescription
request IGetServiceBindingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IServiceBinding, (protos.google.cloud.networkservices.v1.IGetServiceBindingRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ServiceBinding. 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. A name of the ServiceBinding to get. Must be in the format
   *  `projects/* /locations/global/serviceBindings/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

    // Run request
    const response = await networkservicesClient.getServiceBinding(request);
    console.log(response);
  }

  callGetServiceBinding();

getServiceBinding(request, options, callback)

getServiceBinding(request: protos.google.cloud.networkservices.v1.IGetServiceBindingRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.v1.IGetServiceBindingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetServiceBindingRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.v1.IGetServiceBindingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServiceBinding(request, callback)

getServiceBinding(request: protos.google.cloud.networkservices.v1.IGetServiceBindingRequest, callback: Callback<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.v1.IGetServiceBindingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetServiceBindingRequest
callback Callback<protos.google.cloud.networkservices.v1.IServiceBinding, protos.google.cloud.networkservices.v1.IGetServiceBindingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTcpRoute(request, options)

getTcpRoute(request?: protos.google.cloud.networkservices.v1.IGetTcpRouteRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.ITcpRoute,
        protos.google.cloud.networkservices.v1.IGetTcpRouteRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single TcpRoute.

Parameters
NameDescription
request IGetTcpRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IGetTcpRouteRequest | 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. A name of the TcpRoute to get. Must be in the format
   *  `projects/* /locations/global/tcpRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

    // Run request
    const response = await networkservicesClient.getTcpRoute(request);
    console.log(response);
  }

  callGetTcpRoute();

getTcpRoute(request, options, callback)

getTcpRoute(request: protos.google.cloud.networkservices.v1.IGetTcpRouteRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IGetTcpRouteRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetTcpRouteRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IGetTcpRouteRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTcpRoute(request, callback)

getTcpRoute(request: protos.google.cloud.networkservices.v1.IGetTcpRouteRequest, callback: Callback<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IGetTcpRouteRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetTcpRouteRequest
callback Callback<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IGetTcpRouteRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTlsRoute(request, options)

getTlsRoute(request?: protos.google.cloud.networkservices.v1.IGetTlsRouteRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.ITlsRoute,
        protos.google.cloud.networkservices.v1.IGetTlsRouteRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single TlsRoute.

Parameters
NameDescription
request IGetTlsRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IGetTlsRouteRequest | 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. A name of the TlsRoute to get. Must be in the format
   *  `projects/* /locations/global/tlsRoutes/*`.
   */
  // const name = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

    // Run request
    const response = await networkservicesClient.getTlsRoute(request);
    console.log(response);
  }

  callGetTlsRoute();

getTlsRoute(request, options, callback)

getTlsRoute(request: protos.google.cloud.networkservices.v1.IGetTlsRouteRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IGetTlsRouteRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetTlsRouteRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IGetTlsRouteRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTlsRoute(request, callback)

getTlsRoute(request: protos.google.cloud.networkservices.v1.IGetTlsRouteRequest, callback: Callback<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IGetTlsRouteRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetTlsRouteRequest
callback Callback<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IGetTlsRouteRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

grpcRoutePath(project, location, grpcRoute)

grpcRoutePath(project: string, location: string, grpcRoute: string): string;

Return a fully-qualified grpcRoute resource name string.

Parameters
NameDescription
project string
location string
grpcRoute string
Returns
TypeDescription
string

{string} Resource name string.

httpRoutePath(project, location, httpRoute)

httpRoutePath(project: string, location: string, httpRoute: string): string;

Return a fully-qualified httpRoute resource name string.

Parameters
NameDescription
project string
location string
httpRoute string
Returns
TypeDescription
string

{string} Resource name string.

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.

listEndpointPolicies(request, options)

listEndpointPolicies(request?: protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IEndpointPolicy[],
        protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest | null,
        protos.google.cloud.networkservices.v1.IListEndpointPoliciesResponse
    ]>;

Lists EndpointPolicies in a given project and location.

Parameters
NameDescription
request IListEndpointPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IEndpointPolicy[], protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest | null, protos.google.cloud.networkservices.v1.IListEndpointPoliciesResponse ]>

{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 listEndpointPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listEndpointPolicies(request, options, callback)

listEndpointPolicies(request: protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, protos.google.cloud.networkservices.v1.IListEndpointPoliciesResponse | null | undefined, protos.google.cloud.networkservices.v1.IEndpointPolicy>): void;
Parameters
NameDescription
request IListEndpointPoliciesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, protos.google.cloud.networkservices.v1.IListEndpointPoliciesResponse | null | undefined, protos.google.cloud.networkservices.v1.IEndpointPolicy>
Returns
TypeDescription
void

listEndpointPolicies(request, callback)

listEndpointPolicies(request: protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, protos.google.cloud.networkservices.v1.IListEndpointPoliciesResponse | null | undefined, protos.google.cloud.networkservices.v1.IEndpointPolicy>): void;
Parameters
NameDescription
request IListEndpointPoliciesRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, protos.google.cloud.networkservices.v1.IListEndpointPoliciesResponse | null | undefined, protos.google.cloud.networkservices.v1.IEndpointPolicy>
Returns
TypeDescription
void

listEndpointPoliciesAsync(request, options)

listEndpointPoliciesAsync(request?: protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1.IEndpointPolicy>;

Equivalent to listEndpointPolicies, but returns an iterable object.

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

Parameters
NameDescription
request IListEndpointPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1.IEndpointPolicy>

{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. The project and location from which the EndpointPolicies should
   *  be listed, specified in the format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of EndpointPolicies to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListEndpointPoliciesResponse`
   *  Indicates that this is a continuation of a prior
   *  `ListEndpointPolicies` call, and that the system should return the
   *  next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callListEndpointPolicies();

listEndpointPoliciesStream(request, options)

listEndpointPoliciesStream(request?: protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListEndpointPoliciesRequest

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 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 listEndpointPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listGateways(request, options)

listGateways(request?: protos.google.cloud.networkservices.v1.IListGatewaysRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IGateway[],
        protos.google.cloud.networkservices.v1.IListGatewaysRequest | null,
        protos.google.cloud.networkservices.v1.IListGatewaysResponse
    ]>;

Lists Gateways in a given project and location.

Parameters
NameDescription
request IListGatewaysRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IGateway[], protos.google.cloud.networkservices.v1.IListGatewaysRequest | null, protos.google.cloud.networkservices.v1.IListGatewaysResponse ]>

{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 listGatewaysAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listGateways(request, options, callback)

listGateways(request: protos.google.cloud.networkservices.v1.IListGatewaysRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListGatewaysRequest, protos.google.cloud.networkservices.v1.IListGatewaysResponse | null | undefined, protos.google.cloud.networkservices.v1.IGateway>): void;
Parameters
NameDescription
request IListGatewaysRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListGatewaysRequest, protos.google.cloud.networkservices.v1.IListGatewaysResponse | null | undefined, protos.google.cloud.networkservices.v1.IGateway>
Returns
TypeDescription
void

listGateways(request, callback)

listGateways(request: protos.google.cloud.networkservices.v1.IListGatewaysRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListGatewaysRequest, protos.google.cloud.networkservices.v1.IListGatewaysResponse | null | undefined, protos.google.cloud.networkservices.v1.IGateway>): void;
Parameters
NameDescription
request IListGatewaysRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListGatewaysRequest, protos.google.cloud.networkservices.v1.IListGatewaysResponse | null | undefined, protos.google.cloud.networkservices.v1.IGateway>
Returns
TypeDescription
void

listGatewaysAsync(request, options)

listGatewaysAsync(request?: protos.google.cloud.networkservices.v1.IListGatewaysRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1.IGateway>;

Equivalent to listGateways, but returns an iterable object.

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

Parameters
NameDescription
request IListGatewaysRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1.IGateway>

{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. The project and location from which the Gateways should be
   *  listed, specified in the format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of Gateways to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListGatewaysResponse`
   *  Indicates that this is a continuation of a prior `ListGateways` call,
   *  and that the system should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callListGateways();

listGatewaysStream(request, options)

listGatewaysStream(request?: protos.google.cloud.networkservices.v1.IListGatewaysRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListGatewaysRequest

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 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 listGatewaysAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listGrpcRoutes(request, options)

listGrpcRoutes(request?: protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IGrpcRoute[],
        protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest | null,
        protos.google.cloud.networkservices.v1.IListGrpcRoutesResponse
    ]>;

Lists GrpcRoutes in a given project and location.

Parameters
NameDescription
request IListGrpcRoutesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IGrpcRoute[], protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest | null, protos.google.cloud.networkservices.v1.IListGrpcRoutesResponse ]>

{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 listGrpcRoutesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listGrpcRoutes(request, options, callback)

listGrpcRoutes(request: protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, protos.google.cloud.networkservices.v1.IListGrpcRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.IGrpcRoute>): void;
Parameters
NameDescription
request IListGrpcRoutesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, protos.google.cloud.networkservices.v1.IListGrpcRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.IGrpcRoute>
Returns
TypeDescription
void

listGrpcRoutes(request, callback)

listGrpcRoutes(request: protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, protos.google.cloud.networkservices.v1.IListGrpcRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.IGrpcRoute>): void;
Parameters
NameDescription
request IListGrpcRoutesRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, protos.google.cloud.networkservices.v1.IListGrpcRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.IGrpcRoute>
Returns
TypeDescription
void

listGrpcRoutesAsync(request, options)

listGrpcRoutesAsync(request?: protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1.IGrpcRoute>;

Equivalent to listGrpcRoutes, but returns an iterable object.

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

Parameters
NameDescription
request IListGrpcRoutesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1.IGrpcRoute>

{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. The project and location from which the GrpcRoutes should be
   *  listed, specified in the format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of GrpcRoutes to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListGrpcRoutesResponse`
   *  Indicates that this is a continuation of a prior `ListGrpcRoutes` call,
   *  and that the system should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callListGrpcRoutes();

listGrpcRoutesStream(request, options)

listGrpcRoutesStream(request?: protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListGrpcRoutesRequest

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 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 listGrpcRoutesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listHttpRoutes(request, options)

listHttpRoutes(request?: protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IHttpRoute[],
        protos.google.cloud.networkservices.v1.IListHttpRoutesRequest | null,
        protos.google.cloud.networkservices.v1.IListHttpRoutesResponse
    ]>;

Lists HttpRoute in a given project and location.

Parameters
NameDescription
request IListHttpRoutesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IHttpRoute[], protos.google.cloud.networkservices.v1.IListHttpRoutesRequest | null, protos.google.cloud.networkservices.v1.IListHttpRoutesResponse ]>

{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 listHttpRoutesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listHttpRoutes(request, options, callback)

listHttpRoutes(request: protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, protos.google.cloud.networkservices.v1.IListHttpRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.IHttpRoute>): void;
Parameters
NameDescription
request IListHttpRoutesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, protos.google.cloud.networkservices.v1.IListHttpRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.IHttpRoute>
Returns
TypeDescription
void

listHttpRoutes(request, callback)

listHttpRoutes(request: protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, protos.google.cloud.networkservices.v1.IListHttpRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.IHttpRoute>): void;
Parameters
NameDescription
request IListHttpRoutesRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, protos.google.cloud.networkservices.v1.IListHttpRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.IHttpRoute>
Returns
TypeDescription
void

listHttpRoutesAsync(request, options)

listHttpRoutesAsync(request?: protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1.IHttpRoute>;

Equivalent to listHttpRoutes, but returns an iterable object.

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

Parameters
NameDescription
request IListHttpRoutesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1.IHttpRoute>

{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. The project and location from which the HttpRoutes should be
   *  listed, specified in the format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of HttpRoutes to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListHttpRoutesResponse`
   *  Indicates that this is a continuation of a prior `ListHttpRoutes` call,
   *  and that the system should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callListHttpRoutes();

listHttpRoutesStream(request, options)

listHttpRoutesStream(request?: protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListHttpRoutesRequest

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 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 listHttpRoutesAsync() 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
NameDescription
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
}

listMeshes(request, options)

listMeshes(request?: protos.google.cloud.networkservices.v1.IListMeshesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IMesh[],
        protos.google.cloud.networkservices.v1.IListMeshesRequest | null,
        protos.google.cloud.networkservices.v1.IListMeshesResponse
    ]>;

Lists Meshes in a given project and location.

Parameters
NameDescription
request IListMeshesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IMesh[], protos.google.cloud.networkservices.v1.IListMeshesRequest | null, protos.google.cloud.networkservices.v1.IListMeshesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Mesh. 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 listMeshesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listMeshes(request, options, callback)

listMeshes(request: protos.google.cloud.networkservices.v1.IListMeshesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListMeshesRequest, protos.google.cloud.networkservices.v1.IListMeshesResponse | null | undefined, protos.google.cloud.networkservices.v1.IMesh>): void;
Parameters
NameDescription
request IListMeshesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListMeshesRequest, protos.google.cloud.networkservices.v1.IListMeshesResponse | null | undefined, protos.google.cloud.networkservices.v1.IMesh>
Returns
TypeDescription
void

listMeshes(request, callback)

listMeshes(request: protos.google.cloud.networkservices.v1.IListMeshesRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListMeshesRequest, protos.google.cloud.networkservices.v1.IListMeshesResponse | null | undefined, protos.google.cloud.networkservices.v1.IMesh>): void;
Parameters
NameDescription
request IListMeshesRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListMeshesRequest, protos.google.cloud.networkservices.v1.IListMeshesResponse | null | undefined, protos.google.cloud.networkservices.v1.IMesh>
Returns
TypeDescription
void

listMeshesAsync(request, options)

listMeshesAsync(request?: protos.google.cloud.networkservices.v1.IListMeshesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1.IMesh>;

Equivalent to listMeshes, but returns an iterable object.

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

Parameters
NameDescription
request IListMeshesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1.IMesh>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Mesh. 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. The project and location from which the Meshes should be
   *  listed, specified in the format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of Meshes to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListMeshesResponse`
   *  Indicates that this is a continuation of a prior `ListMeshes` call,
   *  and that the system should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callListMeshes();

listMeshesStream(request, options)

listMeshesStream(request?: protos.google.cloud.networkservices.v1.IListMeshesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListMeshesRequest

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 Mesh 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 listMeshesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listOperationsAsync(request, options)

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

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
NameDescription
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
TypeDescription
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

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

Example

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

listServiceBindings(request, options)

listServiceBindings(request?: protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.IServiceBinding[],
        protos.google.cloud.networkservices.v1.IListServiceBindingsRequest | null,
        protos.google.cloud.networkservices.v1.IListServiceBindingsResponse
    ]>;

Lists ServiceBinding in a given project and location.

Parameters
NameDescription
request IListServiceBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.IServiceBinding[], protos.google.cloud.networkservices.v1.IListServiceBindingsRequest | null, protos.google.cloud.networkservices.v1.IListServiceBindingsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of ServiceBinding. 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 listServiceBindingsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listServiceBindings(request, options, callback)

listServiceBindings(request: protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, protos.google.cloud.networkservices.v1.IListServiceBindingsResponse | null | undefined, protos.google.cloud.networkservices.v1.IServiceBinding>): void;
Parameters
NameDescription
request IListServiceBindingsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, protos.google.cloud.networkservices.v1.IListServiceBindingsResponse | null | undefined, protos.google.cloud.networkservices.v1.IServiceBinding>
Returns
TypeDescription
void

listServiceBindings(request, callback)

listServiceBindings(request: protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, protos.google.cloud.networkservices.v1.IListServiceBindingsResponse | null | undefined, protos.google.cloud.networkservices.v1.IServiceBinding>): void;
Parameters
NameDescription
request IListServiceBindingsRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, protos.google.cloud.networkservices.v1.IListServiceBindingsResponse | null | undefined, protos.google.cloud.networkservices.v1.IServiceBinding>
Returns
TypeDescription
void

listServiceBindingsAsync(request, options)

listServiceBindingsAsync(request?: protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1.IServiceBinding>;

Equivalent to listServiceBindings, but returns an iterable object.

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

Parameters
NameDescription
request IListServiceBindingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1.IServiceBinding>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ServiceBinding. 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. The project and location from which the ServiceBindings should be
   *  listed, specified in the format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of ServiceBindings to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListServiceBindingsResponse`
   *  Indicates that this is a continuation of a prior `ListRouters` call,
   *  and that the system should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callListServiceBindings();

listServiceBindingsStream(request, options)

listServiceBindingsStream(request?: protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListServiceBindingsRequest

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 ServiceBinding 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 listServiceBindingsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTcpRoutes(request, options)

listTcpRoutes(request?: protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.ITcpRoute[],
        protos.google.cloud.networkservices.v1.IListTcpRoutesRequest | null,
        protos.google.cloud.networkservices.v1.IListTcpRoutesResponse
    ]>;

Lists TcpRoute in a given project and location.

Parameters
NameDescription
request IListTcpRoutesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.ITcpRoute[], protos.google.cloud.networkservices.v1.IListTcpRoutesRequest | null, protos.google.cloud.networkservices.v1.IListTcpRoutesResponse ]>

{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 listTcpRoutesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTcpRoutes(request, options, callback)

listTcpRoutes(request: protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, protos.google.cloud.networkservices.v1.IListTcpRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.ITcpRoute>): void;
Parameters
NameDescription
request IListTcpRoutesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, protos.google.cloud.networkservices.v1.IListTcpRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.ITcpRoute>
Returns
TypeDescription
void

listTcpRoutes(request, callback)

listTcpRoutes(request: protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, protos.google.cloud.networkservices.v1.IListTcpRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.ITcpRoute>): void;
Parameters
NameDescription
request IListTcpRoutesRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, protos.google.cloud.networkservices.v1.IListTcpRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.ITcpRoute>
Returns
TypeDescription
void

listTcpRoutesAsync(request, options)

listTcpRoutesAsync(request?: protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1.ITcpRoute>;

Equivalent to listTcpRoutes, but returns an iterable object.

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

Parameters
NameDescription
request IListTcpRoutesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1.ITcpRoute>

{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. The project and location from which the TcpRoutes should be
   *  listed, specified in the format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of TcpRoutes to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListTcpRoutesResponse`
   *  Indicates that this is a continuation of a prior `ListTcpRoutes` call,
   *  and that the system should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callListTcpRoutes();

listTcpRoutesStream(request, options)

listTcpRoutesStream(request?: protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListTcpRoutesRequest

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 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 listTcpRoutesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTlsRoutes(request, options)

listTlsRoutes(request?: protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1.ITlsRoute[],
        protos.google.cloud.networkservices.v1.IListTlsRoutesRequest | null,
        protos.google.cloud.networkservices.v1.IListTlsRoutesResponse
    ]>;

Lists TlsRoute in a given project and location.

Parameters
NameDescription
request IListTlsRoutesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1.ITlsRoute[], protos.google.cloud.networkservices.v1.IListTlsRoutesRequest | null, protos.google.cloud.networkservices.v1.IListTlsRoutesResponse ]>

{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 listTlsRoutesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTlsRoutes(request, options, callback)

listTlsRoutes(request: protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, protos.google.cloud.networkservices.v1.IListTlsRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.ITlsRoute>): void;
Parameters
NameDescription
request IListTlsRoutesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, protos.google.cloud.networkservices.v1.IListTlsRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.ITlsRoute>
Returns
TypeDescription
void

listTlsRoutes(request, callback)

listTlsRoutes(request: protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, protos.google.cloud.networkservices.v1.IListTlsRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.ITlsRoute>): void;
Parameters
NameDescription
request IListTlsRoutesRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, protos.google.cloud.networkservices.v1.IListTlsRoutesResponse | null | undefined, protos.google.cloud.networkservices.v1.ITlsRoute>
Returns
TypeDescription
void

listTlsRoutesAsync(request, options)

listTlsRoutesAsync(request?: protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1.ITlsRoute>;

Equivalent to listTlsRoutes, but returns an iterable object.

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

Parameters
NameDescription
request IListTlsRoutesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1.ITlsRoute>

{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. The project and location from which the TlsRoutes should be
   *  listed, specified in the format `projects/* /locations/global`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of TlsRoutes to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListTlsRoutesResponse`
   *  Indicates that this is a continuation of a prior `ListTlsRoutes` call,
   *  and that the system should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

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

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

  callListTlsRoutes();

listTlsRoutesStream(request, options)

listTlsRoutesStream(request?: protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListTlsRoutesRequest

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 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 listTlsRoutesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchEndpointPolicyFromEndpointPolicyName(endpointPolicyName)

matchEndpointPolicyFromEndpointPolicyName(endpointPolicyName: string): string | number;

Parse the endpoint_policy from EndpointPolicy resource.

Parameter
NameDescription
endpointPolicyName string

A fully-qualified path representing EndpointPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the endpoint_policy.

matchGatewayFromGatewayName(gatewayName)

matchGatewayFromGatewayName(gatewayName: string): string | number;

Parse the gateway from Gateway resource.

Parameter
NameDescription
gatewayName string

A fully-qualified path representing Gateway resource.

Returns
TypeDescription
string | number

{string} A string representing the gateway.

matchGrpcRouteFromGrpcRouteName(grpcRouteName)

matchGrpcRouteFromGrpcRouteName(grpcRouteName: string): string | number;

Parse the grpc_route from GrpcRoute resource.

Parameter
NameDescription
grpcRouteName string

A fully-qualified path representing GrpcRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the grpc_route.

matchHttpRouteFromHttpRouteName(httpRouteName)

matchHttpRouteFromHttpRouteName(httpRouteName: string): string | number;

Parse the http_route from HttpRoute resource.

Parameter
NameDescription
httpRouteName string

A fully-qualified path representing HttpRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the http_route.

matchLocationFromEndpointPolicyName(endpointPolicyName)

matchLocationFromEndpointPolicyName(endpointPolicyName: string): string | number;

Parse the location from EndpointPolicy resource.

Parameter
NameDescription
endpointPolicyName string

A fully-qualified path representing EndpointPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromGatewayName(gatewayName)

matchLocationFromGatewayName(gatewayName: string): string | number;

Parse the location from Gateway resource.

Parameter
NameDescription
gatewayName string

A fully-qualified path representing Gateway resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromGrpcRouteName(grpcRouteName)

matchLocationFromGrpcRouteName(grpcRouteName: string): string | number;

Parse the location from GrpcRoute resource.

Parameter
NameDescription
grpcRouteName string

A fully-qualified path representing GrpcRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromHttpRouteName(httpRouteName)

matchLocationFromHttpRouteName(httpRouteName: string): string | number;

Parse the location from HttpRoute resource.

Parameter
NameDescription
httpRouteName string

A fully-qualified path representing HttpRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromMeshName(meshName)

matchLocationFromMeshName(meshName: string): string | number;

Parse the location from Mesh resource.

Parameter
NameDescription
meshName string

A fully-qualified path representing Mesh resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromServiceBindingName(serviceBindingName)

matchLocationFromServiceBindingName(serviceBindingName: string): string | number;

Parse the location from ServiceBinding resource.

Parameter
NameDescription
serviceBindingName string

A fully-qualified path representing ServiceBinding resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTcpRouteName(tcpRouteName)

matchLocationFromTcpRouteName(tcpRouteName: string): string | number;

Parse the location from TcpRoute resource.

Parameter
NameDescription
tcpRouteName string

A fully-qualified path representing TcpRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTlsRouteName(tlsRouteName)

matchLocationFromTlsRouteName(tlsRouteName: string): string | number;

Parse the location from TlsRoute resource.

Parameter
NameDescription
tlsRouteName string

A fully-qualified path representing TlsRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchMeshFromMeshName(meshName)

matchMeshFromMeshName(meshName: string): string | number;

Parse the mesh from Mesh resource.

Parameter
NameDescription
meshName string

A fully-qualified path representing Mesh resource.

Returns
TypeDescription
string | number

{string} A string representing the mesh.

matchProjectFromEndpointPolicyName(endpointPolicyName)

matchProjectFromEndpointPolicyName(endpointPolicyName: string): string | number;

Parse the project from EndpointPolicy resource.

Parameter
NameDescription
endpointPolicyName string

A fully-qualified path representing EndpointPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromGatewayName(gatewayName)

matchProjectFromGatewayName(gatewayName: string): string | number;

Parse the project from Gateway resource.

Parameter
NameDescription
gatewayName string

A fully-qualified path representing Gateway resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromGrpcRouteName(grpcRouteName)

matchProjectFromGrpcRouteName(grpcRouteName: string): string | number;

Parse the project from GrpcRoute resource.

Parameter
NameDescription
grpcRouteName string

A fully-qualified path representing GrpcRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromHttpRouteName(httpRouteName)

matchProjectFromHttpRouteName(httpRouteName: string): string | number;

Parse the project from HttpRoute resource.

Parameter
NameDescription
httpRouteName string

A fully-qualified path representing HttpRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromMeshName(meshName)

matchProjectFromMeshName(meshName: string): string | number;

Parse the project from Mesh resource.

Parameter
NameDescription
meshName string

A fully-qualified path representing Mesh resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromServiceBindingName(serviceBindingName)

matchProjectFromServiceBindingName(serviceBindingName: string): string | number;

Parse the project from ServiceBinding resource.

Parameter
NameDescription
serviceBindingName string

A fully-qualified path representing ServiceBinding resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTcpRouteName(tcpRouteName)

matchProjectFromTcpRouteName(tcpRouteName: string): string | number;

Parse the project from TcpRoute resource.

Parameter
NameDescription
tcpRouteName string

A fully-qualified path representing TcpRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTlsRouteName(tlsRouteName)

matchProjectFromTlsRouteName(tlsRouteName: string): string | number;

Parse the project from TlsRoute resource.

Parameter
NameDescription
tlsRouteName string

A fully-qualified path representing TlsRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchServiceBindingFromServiceBindingName(serviceBindingName)

matchServiceBindingFromServiceBindingName(serviceBindingName: string): string | number;

Parse the service_binding from ServiceBinding resource.

Parameter
NameDescription
serviceBindingName string

A fully-qualified path representing ServiceBinding resource.

Returns
TypeDescription
string | number

{string} A string representing the service_binding.

matchTcpRouteFromTcpRouteName(tcpRouteName)

matchTcpRouteFromTcpRouteName(tcpRouteName: string): string | number;

Parse the tcp_route from TcpRoute resource.

Parameter
NameDescription
tcpRouteName string

A fully-qualified path representing TcpRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the tcp_route.

matchTlsRouteFromTlsRouteName(tlsRouteName)

matchTlsRouteFromTlsRouteName(tlsRouteName: string): string | number;

Parse the tls_route from TlsRoute resource.

Parameter
NameDescription
tlsRouteName string

A fully-qualified path representing TlsRoute resource.

Returns
TypeDescription
string | number

{string} A string representing the tls_route.

meshPath(project, location, mesh)

meshPath(project: string, location: string, mesh: string): string;

Return a fully-qualified mesh resource name string.

Parameters
NameDescription
project string
location string
mesh string
Returns
TypeDescription
string

{string} Resource name string.

serviceBindingPath(project, location, serviceBinding)

serviceBindingPath(project: string, location: string, serviceBinding: string): string;

Return a fully-qualified serviceBinding resource name string.

Parameters
NameDescription
project string
location string
serviceBinding string
Returns
TypeDescription
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
NameDescription
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
TypeDescription
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.

tcpRoutePath(project, location, tcpRoute)

tcpRoutePath(project: string, location: string, tcpRoute: string): string;

Return a fully-qualified tcpRoute resource name string.

Parameters
NameDescription
project string
location string
tcpRoute string
Returns
TypeDescription
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
NameDescription
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
TypeDescription
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.

tlsRoutePath(project, location, tlsRoute)

tlsRoutePath(project: string, location: string, tlsRoute: string): string;

Return a fully-qualified tlsRoute resource name string.

Parameters
NameDescription
project string
location string
tlsRoute string
Returns
TypeDescription
string

{string} Resource name string.

updateEndpointPolicy(request, options)

updateEndpointPolicy(request?: protos.google.cloud.networkservices.v1.IUpdateEndpointPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single EndpointPolicy.

Parameters
NameDescription
request IUpdateEndpointPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  EndpointPolicy resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated EndpointPolicy resource.
   */
  // const endpointPolicy = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateEndpointPolicy() {
    // Construct request
    const request = {
      endpointPolicy,
    };

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

  callUpdateEndpointPolicy();

updateEndpointPolicy(request, options, callback)

updateEndpointPolicy(request: protos.google.cloud.networkservices.v1.IUpdateEndpointPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateEndpointPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateEndpointPolicy(request, callback)

updateEndpointPolicy(request: protos.google.cloud.networkservices.v1.IUpdateEndpointPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateEndpointPolicyRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IEndpointPolicy, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGateway(request, options)

updateGateway(request?: protos.google.cloud.networkservices.v1.IUpdateGatewayRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single Gateway.

Parameters
NameDescription
request IUpdateGatewayRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Gateway resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated Gateway resource.
   */
  // const gateway = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateGateway() {
    // Construct request
    const request = {
      gateway,
    };

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

  callUpdateGateway();

updateGateway(request, options, callback)

updateGateway(request: protos.google.cloud.networkservices.v1.IUpdateGatewayRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateGatewayRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGateway(request, callback)

updateGateway(request: protos.google.cloud.networkservices.v1.IUpdateGatewayRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateGatewayRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IGateway, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGrpcRoute(request, options)

updateGrpcRoute(request?: protos.google.cloud.networkservices.v1.IUpdateGrpcRouteRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single GrpcRoute.

Parameters
NameDescription
request IUpdateGrpcRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  GrpcRoute resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated GrpcRoute resource.
   */
  // const grpcRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateGrpcRoute() {
    // Construct request
    const request = {
      grpcRoute,
    };

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

  callUpdateGrpcRoute();

updateGrpcRoute(request, options, callback)

updateGrpcRoute(request: protos.google.cloud.networkservices.v1.IUpdateGrpcRouteRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateGrpcRouteRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGrpcRoute(request, callback)

updateGrpcRoute(request: protos.google.cloud.networkservices.v1.IUpdateGrpcRouteRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateGrpcRouteRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IGrpcRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateHttpRoute(request, options)

updateHttpRoute(request?: protos.google.cloud.networkservices.v1.IUpdateHttpRouteRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single HttpRoute.

Parameters
NameDescription
request IUpdateHttpRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  HttpRoute resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated HttpRoute resource.
   */
  // const httpRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateHttpRoute() {
    // Construct request
    const request = {
      httpRoute,
    };

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

  callUpdateHttpRoute();

updateHttpRoute(request, options, callback)

updateHttpRoute(request: protos.google.cloud.networkservices.v1.IUpdateHttpRouteRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateHttpRouteRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateHttpRoute(request, callback)

updateHttpRoute(request: protos.google.cloud.networkservices.v1.IUpdateHttpRouteRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateHttpRouteRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IHttpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateMesh(request, options)

updateMesh(request?: protos.google.cloud.networkservices.v1.IUpdateMeshRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single Mesh.

Parameters
NameDescription
request IUpdateMeshRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  Mesh resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated Mesh resource.
   */
  // const mesh = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateMesh() {
    // Construct request
    const request = {
      mesh,
    };

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

  callUpdateMesh();

updateMesh(request, options, callback)

updateMesh(request: protos.google.cloud.networkservices.v1.IUpdateMeshRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateMeshRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateMesh(request, callback)

updateMesh(request: protos.google.cloud.networkservices.v1.IUpdateMeshRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateMeshRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.IMesh, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateTcpRoute(request, options)

updateTcpRoute(request?: protos.google.cloud.networkservices.v1.IUpdateTcpRouteRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single TcpRoute.

Parameters
NameDescription
request IUpdateTcpRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  TcpRoute resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated TcpRoute resource.
   */
  // const tcpRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateTcpRoute() {
    // Construct request
    const request = {
      tcpRoute,
    };

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

  callUpdateTcpRoute();

updateTcpRoute(request, options, callback)

updateTcpRoute(request: protos.google.cloud.networkservices.v1.IUpdateTcpRouteRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateTcpRouteRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateTcpRoute(request, callback)

updateTcpRoute(request: protos.google.cloud.networkservices.v1.IUpdateTcpRouteRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateTcpRouteRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.ITcpRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateTlsRoute(request, options)

updateTlsRoute(request?: protos.google.cloud.networkservices.v1.IUpdateTlsRouteRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single TlsRoute.

Parameters
NameDescription
request IUpdateTlsRouteRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.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.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  TlsRoute resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated TlsRoute resource.
   */
  // const tlsRoute = {}

  // Imports the Networkservices library
  const {NetworkServicesClient} = require('@google-cloud/networkservices').v1;

  // Instantiates a client
  const networkservicesClient = new NetworkServicesClient();

  async function callUpdateTlsRoute() {
    // Construct request
    const request = {
      tlsRoute,
    };

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

  callUpdateTlsRoute();

updateTlsRoute(request, options, callback)

updateTlsRoute(request: protos.google.cloud.networkservices.v1.IUpdateTlsRouteRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateTlsRouteRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateTlsRoute(request, callback)

updateTlsRoute(request: protos.google.cloud.networkservices.v1.IUpdateTlsRouteRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateTlsRouteRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1.ITlsRoute, protos.google.cloud.networkservices.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void