Class v1beta1.DepServiceClient (0.2.1)

Service describing handlers for resources. v1beta1

Package

@google-cloud/networkservices

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of DepServiceClient.

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 DepServiceClient({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;

depServiceStub

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

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [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

checkCreateLbRouteExtensionProgress(name)

checkCreateLbRouteExtensionProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1beta1.LbRouteExtension, protos.google.cloud.networkservices.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1beta1.LbRouteExtension, protos.google.cloud.networkservices.v1beta1.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 `LbRouteExtension` resource. Must be
   *  in the format `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. User-provided ID of the `LbRouteExtension` resource to be
   *  created.
   */
  // const lbRouteExtensionId = 'abc123'
  /**
   *  Required. `LbRouteExtension` resource to be created.
   */
  // const lbRouteExtension = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

  async function callCreateLbRouteExtension() {
    // Construct request
    const request = {
      parent,
      lbRouteExtensionId,
      lbRouteExtension,
    };

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

  callCreateLbRouteExtension();

checkCreateLbTrafficExtensionProgress(name)

checkCreateLbTrafficExtensionProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1beta1.LbTrafficExtension, protos.google.cloud.networkservices.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1beta1.LbTrafficExtension, protos.google.cloud.networkservices.v1beta1.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 `LbTrafficExtension` resource. Must be
   *  in the format `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. User-provided ID of the `LbTrafficExtension` resource to be
   *  created.
   */
  // const lbTrafficExtensionId = 'abc123'
  /**
   *  Required. `LbTrafficExtension` resource to be created.
   */
  // const lbTrafficExtension = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

  async function callCreateLbTrafficExtension() {
    // Construct request
    const request = {
      parent,
      lbTrafficExtensionId,
      lbTrafficExtension,
    };

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

  callCreateLbTrafficExtension();

checkDeleteLbRouteExtensionProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.v1beta1.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 name of the `LbRouteExtension` resource to delete. Must be in
   *  the format
   *  `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

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

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

  callDeleteLbRouteExtension();

checkDeleteLbTrafficExtensionProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkservices.v1beta1.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 name of the `LbTrafficExtension` resource to delete. Must be
   *  in the format
   *  `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

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

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

  callDeleteLbTrafficExtension();

checkUpdateLbRouteExtensionProgress(name)

checkUpdateLbRouteExtensionProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1beta1.LbRouteExtension, protos.google.cloud.networkservices.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1beta1.LbRouteExtension, protos.google.cloud.networkservices.v1beta1.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. Used to specify the fields to be overwritten in the
   *  `LbRouteExtension` resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field is overwritten if it is in the mask. If the
   *  user does not specify a mask, then all fields are overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. `LbRouteExtension` resource being updated.
   */
  // const lbRouteExtension = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

  async function callUpdateLbRouteExtension() {
    // Construct request
    const request = {
      updateMask,
      lbRouteExtension,
    };

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

  callUpdateLbRouteExtension();

checkUpdateLbTrafficExtensionProgress(name)

checkUpdateLbTrafficExtensionProgress(name: string): Promise<LROperation<protos.google.cloud.networkservices.v1beta1.LbTrafficExtension, protos.google.cloud.networkservices.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networkservices.v1beta1.LbTrafficExtension, protos.google.cloud.networkservices.v1beta1.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. Used to specify the fields to be overwritten in the
   *  `LbTrafficExtension` resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field is overwritten if it is in the mask. If the
   *  user does not specify a mask, then all fields are overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. `LbTrafficExtension` resource being updated.
   */
  // const lbTrafficExtension = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

  async function callUpdateLbTrafficExtension() {
    // Construct request
    const request = {
      updateMask,
      lbTrafficExtension,
    };

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

  callUpdateLbTrafficExtension();

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.

createLbRouteExtension(request, options)

createLbRouteExtension(request?: protos.google.cloud.networkservices.v1beta1.ICreateLbRouteExtensionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new LbRouteExtension resource in a given project and location.

Parameters
NameDescription
request ICreateLbRouteExtensionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.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 `LbRouteExtension` resource. Must be
   *  in the format `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. User-provided ID of the `LbRouteExtension` resource to be
   *  created.
   */
  // const lbRouteExtensionId = 'abc123'
  /**
   *  Required. `LbRouteExtension` resource to be created.
   */
  // const lbRouteExtension = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

  async function callCreateLbRouteExtension() {
    // Construct request
    const request = {
      parent,
      lbRouteExtensionId,
      lbRouteExtension,
    };

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

  callCreateLbRouteExtension();

createLbRouteExtension(request, options, callback)

createLbRouteExtension(request: protos.google.cloud.networkservices.v1beta1.ICreateLbRouteExtensionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateLbRouteExtensionRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createLbRouteExtension(request, callback)

createLbRouteExtension(request: protos.google.cloud.networkservices.v1beta1.ICreateLbRouteExtensionRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateLbRouteExtensionRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createLbTrafficExtension(request, options)

createLbTrafficExtension(request?: protos.google.cloud.networkservices.v1beta1.ICreateLbTrafficExtensionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new LbTrafficExtension resource in a given project and location.

Parameters
NameDescription
request ICreateLbTrafficExtensionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.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 `LbTrafficExtension` resource. Must be
   *  in the format `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. User-provided ID of the `LbTrafficExtension` resource to be
   *  created.
   */
  // const lbTrafficExtensionId = 'abc123'
  /**
   *  Required. `LbTrafficExtension` resource to be created.
   */
  // const lbTrafficExtension = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

  async function callCreateLbTrafficExtension() {
    // Construct request
    const request = {
      parent,
      lbTrafficExtensionId,
      lbTrafficExtension,
    };

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

  callCreateLbTrafficExtension();

createLbTrafficExtension(request, options, callback)

createLbTrafficExtension(request: protos.google.cloud.networkservices.v1beta1.ICreateLbTrafficExtensionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateLbTrafficExtensionRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createLbTrafficExtension(request, callback)

createLbTrafficExtension(request: protos.google.cloud.networkservices.v1beta1.ICreateLbTrafficExtensionRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateLbTrafficExtensionRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteLbRouteExtension(request, options)

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

Deletes the specified LbRouteExtension resource.

Parameters
NameDescription
request IDeleteLbRouteExtensionRequest

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.v1beta1.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 name of the `LbRouteExtension` resource to delete. Must be in
   *  the format
   *  `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

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

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

  callDeleteLbRouteExtension();

deleteLbRouteExtension(request, options, callback)

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

deleteLbRouteExtension(request, callback)

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

deleteLbTrafficExtension(request, options)

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

Deletes the specified LbTrafficExtension resource.

Parameters
NameDescription
request IDeleteLbTrafficExtensionRequest

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.v1beta1.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 name of the `LbTrafficExtension` resource to delete. Must be
   *  in the format
   *  `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

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

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

  callDeleteLbTrafficExtension();

deleteLbTrafficExtension(request, options, callback)

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

deleteLbTrafficExtension(request, callback)

deleteLbTrafficExtension(request: protos.google.cloud.networkservices.v1beta1.IDeleteLbTrafficExtensionRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteLbTrafficExtensionRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkservices.v1beta1.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.

getLbRouteExtension(request, options)

getLbRouteExtension(request?: protos.google.cloud.networkservices.v1beta1.IGetLbRouteExtensionRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1beta1.ILbRouteExtension,
        (protos.google.cloud.networkservices.v1beta1.IGetLbRouteExtensionRequest | undefined),
        {} | undefined
    ]>;

Gets details of the specified LbRouteExtension resource.

Parameters
NameDescription
request IGetLbRouteExtensionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, (protos.google.cloud.networkservices.v1beta1.IGetLbRouteExtensionRequest | undefined), {} | undefined ]>

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

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

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

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

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

  callGetLbRouteExtension();

getLbRouteExtension(request, options, callback)

getLbRouteExtension(request: protos.google.cloud.networkservices.v1beta1.IGetLbRouteExtensionRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IGetLbRouteExtensionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetLbRouteExtensionRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IGetLbRouteExtensionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getLbRouteExtension(request, callback)

getLbRouteExtension(request: protos.google.cloud.networkservices.v1beta1.IGetLbRouteExtensionRequest, callback: Callback<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IGetLbRouteExtensionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetLbRouteExtensionRequest
callback Callback<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IGetLbRouteExtensionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getLbTrafficExtension(request, options)

getLbTrafficExtension(request?: protos.google.cloud.networkservices.v1beta1.IGetLbTrafficExtensionRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension,
        (protos.google.cloud.networkservices.v1beta1.IGetLbTrafficExtensionRequest | undefined),
        {} | undefined
    ]>;

Gets details of the specified LbTrafficExtension resource.

Parameters
NameDescription
request IGetLbTrafficExtensionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, (protos.google.cloud.networkservices.v1beta1.IGetLbTrafficExtensionRequest | undefined), {} | undefined ]>

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

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

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

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

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

  callGetLbTrafficExtension();

getLbTrafficExtension(request, options, callback)

getLbTrafficExtension(request: protos.google.cloud.networkservices.v1beta1.IGetLbTrafficExtensionRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IGetLbTrafficExtensionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetLbTrafficExtensionRequest
options CallOptions
callback Callback<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IGetLbTrafficExtensionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getLbTrafficExtension(request, callback)

getLbTrafficExtension(request: protos.google.cloud.networkservices.v1beta1.IGetLbTrafficExtensionRequest, callback: Callback<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IGetLbTrafficExtensionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetLbTrafficExtensionRequest
callback Callback<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IGetLbTrafficExtensionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

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

getProjectId(callback)

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

initialize()

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

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

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

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

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

lbRouteExtensionPath(project, location, lbRouteExtension)

lbRouteExtensionPath(project: string, location: string, lbRouteExtension: string): string;

Return a fully-qualified lbRouteExtension resource name string.

Parameters
NameDescription
project string
location string
lbRouteExtension string
Returns
TypeDescription
string

{string} Resource name string.

lbTrafficExtensionPath(project, location, lbTrafficExtension)

lbTrafficExtensionPath(project: string, location: string, lbTrafficExtension: string): string;

Return a fully-qualified lbTrafficExtension resource name string.

Parameters
NameDescription
project string
location string
lbTrafficExtension string
Returns
TypeDescription
string

{string} Resource name string.

listLbRouteExtensions(request, options)

listLbRouteExtensions(request?: protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1beta1.ILbRouteExtension[],
        protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest | null,
        protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsResponse
    ]>;

Lists LbRouteExtension resources in a given project and location.

Parameters
NameDescription
request IListLbRouteExtensionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1beta1.ILbRouteExtension[], protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest | null, protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsResponse ]>

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

listLbRouteExtensions(request, options, callback)

listLbRouteExtensions(request: protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsResponse | null | undefined, protos.google.cloud.networkservices.v1beta1.ILbRouteExtension>): void;
Parameters
NameDescription
request IListLbRouteExtensionsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsResponse | null | undefined, protos.google.cloud.networkservices.v1beta1.ILbRouteExtension>
Returns
TypeDescription
void

listLbRouteExtensions(request, callback)

listLbRouteExtensions(request: protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsResponse | null | undefined, protos.google.cloud.networkservices.v1beta1.ILbRouteExtension>): void;
Parameters
NameDescription
request IListLbRouteExtensionsRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsResponse | null | undefined, protos.google.cloud.networkservices.v1beta1.ILbRouteExtension>
Returns
TypeDescription
void

listLbRouteExtensionsAsync(request, options)

listLbRouteExtensionsAsync(request?: protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension>;

Equivalent to listLbRouteExtensions, but returns an iterable object.

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

Parameters
NameDescription
request IListLbRouteExtensionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing LbRouteExtension. 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 `LbRouteExtension`
   *  resources are listed, specified in the following format:
   *  `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. The server might return fewer items than
   *  requested. If unspecified, the server picks an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results that the server returns.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Hint for how to order the results.
   */
  // const orderBy = 'abc123'

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

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

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

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

  callListLbRouteExtensions();

listLbRouteExtensionsStream(request, options)

listLbRouteExtensionsStream(request?: protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListLbRouteExtensionsRequest

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

listLbTrafficExtensions(request, options)

listLbTrafficExtensions(request?: protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension[],
        protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest | null,
        protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsResponse
    ]>;

Lists LbTrafficExtension resources in a given project and location.

Parameters
NameDescription
request IListLbTrafficExtensionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension[], protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest | null, protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsResponse ]>

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

listLbTrafficExtensions(request, options, callback)

listLbTrafficExtensions(request: protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsResponse | null | undefined, protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension>): void;
Parameters
NameDescription
request IListLbTrafficExtensionsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsResponse | null | undefined, protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension>
Returns
TypeDescription
void

listLbTrafficExtensions(request, callback)

listLbTrafficExtensions(request: protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, callback: PaginationCallback<protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsResponse | null | undefined, protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension>): void;
Parameters
NameDescription
request IListLbTrafficExtensionsRequest
callback PaginationCallback<protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsResponse | null | undefined, protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension>
Returns
TypeDescription
void

listLbTrafficExtensionsAsync(request, options)

listLbTrafficExtensionsAsync(request?: protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension>;

Equivalent to listLbTrafficExtensions, but returns an iterable object.

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

Parameters
NameDescription
request IListLbTrafficExtensionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing LbTrafficExtension. 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 `LbTrafficExtension`
   *  resources are listed, specified in the following format:
   *  `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. The server might return fewer items than
   *  requested. If unspecified, the server picks an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results that the server returns.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Hint for how to order the results.
   */
  // const orderBy = 'abc123'

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

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

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

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

  callListLbTrafficExtensions();

listLbTrafficExtensionsStream(request, options)

listLbTrafficExtensionsStream(request?: protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListLbTrafficExtensionsRequest

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

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

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.

matchLbRouteExtensionFromLbRouteExtensionName(lbRouteExtensionName)

matchLbRouteExtensionFromLbRouteExtensionName(lbRouteExtensionName: string): string | number;

Parse the lb_route_extension from LbRouteExtension resource.

Parameter
NameDescription
lbRouteExtensionName string

A fully-qualified path representing LbRouteExtension resource.

Returns
TypeDescription
string | number

{string} A string representing the lb_route_extension.

matchLbTrafficExtensionFromLbTrafficExtensionName(lbTrafficExtensionName)

matchLbTrafficExtensionFromLbTrafficExtensionName(lbTrafficExtensionName: string): string | number;

Parse the lb_traffic_extension from LbTrafficExtension resource.

Parameter
NameDescription
lbTrafficExtensionName string

A fully-qualified path representing LbTrafficExtension resource.

Returns
TypeDescription
string | number

{string} A string representing the lb_traffic_extension.

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.

matchLocationFromLbRouteExtensionName(lbRouteExtensionName)

matchLocationFromLbRouteExtensionName(lbRouteExtensionName: string): string | number;

Parse the location from LbRouteExtension resource.

Parameter
NameDescription
lbRouteExtensionName string

A fully-qualified path representing LbRouteExtension resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLbTrafficExtensionName(lbTrafficExtensionName)

matchLocationFromLbTrafficExtensionName(lbTrafficExtensionName: string): string | number;

Parse the location from LbTrafficExtension resource.

Parameter
NameDescription
lbTrafficExtensionName string

A fully-qualified path representing LbTrafficExtension resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

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.

matchProjectFromLbRouteExtensionName(lbRouteExtensionName)

matchProjectFromLbRouteExtensionName(lbRouteExtensionName: string): string | number;

Parse the project from LbRouteExtension resource.

Parameter
NameDescription
lbRouteExtensionName string

A fully-qualified path representing LbRouteExtension resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLbTrafficExtensionName(lbTrafficExtensionName)

matchProjectFromLbTrafficExtensionName(lbTrafficExtensionName: string): string | number;

Parse the project from LbTrafficExtension resource.

Parameter
NameDescription
lbTrafficExtensionName string

A fully-qualified path representing LbTrafficExtension resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

updateLbRouteExtension(request, options)

updateLbRouteExtension(request?: protos.google.cloud.networkservices.v1beta1.IUpdateLbRouteExtensionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of the specified LbRouteExtension resource.

Parameters
NameDescription
request IUpdateLbRouteExtensionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.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. Used to specify the fields to be overwritten in the
   *  `LbRouteExtension` resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field is overwritten if it is in the mask. If the
   *  user does not specify a mask, then all fields are overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. `LbRouteExtension` resource being updated.
   */
  // const lbRouteExtension = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

  async function callUpdateLbRouteExtension() {
    // Construct request
    const request = {
      updateMask,
      lbRouteExtension,
    };

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

  callUpdateLbRouteExtension();

updateLbRouteExtension(request, options, callback)

updateLbRouteExtension(request: protos.google.cloud.networkservices.v1beta1.IUpdateLbRouteExtensionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateLbRouteExtensionRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateLbRouteExtension(request, callback)

updateLbRouteExtension(request: protos.google.cloud.networkservices.v1beta1.IUpdateLbRouteExtensionRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateLbRouteExtensionRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbRouteExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateLbTrafficExtension(request, options)

updateLbTrafficExtension(request?: protos.google.cloud.networkservices.v1beta1.IUpdateLbTrafficExtensionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of the specified LbTrafficExtension resource.

Parameters
NameDescription
request IUpdateLbTrafficExtensionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.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. Used to specify the fields to be overwritten in the
   *  `LbTrafficExtension` resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field is overwritten if it is in the mask. If the
   *  user does not specify a mask, then all fields are overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. `LbTrafficExtension` resource being updated.
   */
  // const lbTrafficExtension = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server can ignore
   *  the request if it has already been completed. The server guarantees
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, ignores the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

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

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

  async function callUpdateLbTrafficExtension() {
    // Construct request
    const request = {
      updateMask,
      lbTrafficExtension,
    };

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

  callUpdateLbTrafficExtension();

updateLbTrafficExtension(request, options, callback)

updateLbTrafficExtension(request: protos.google.cloud.networkservices.v1beta1.IUpdateLbTrafficExtensionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateLbTrafficExtensionRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateLbTrafficExtension(request, callback)

updateLbTrafficExtension(request: protos.google.cloud.networkservices.v1beta1.IUpdateLbTrafficExtensionRequest, callback: Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateLbTrafficExtensionRequest
callback Callback<LROperation<protos.google.cloud.networkservices.v1beta1.ILbTrafficExtension, protos.google.cloud.networkservices.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void