Class v1.CrossNetworkAutomationServiceClient (4.6.0)

The service for CrossNetworkAutomation resources. v1

Package

@google-cloud/network-connectivity

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of CrossNetworkAutomationServiceClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

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

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

crossNetworkAutomationServiceStub

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

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

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

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

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

Methods

cancelOperation(request, optionsOrCallback, callback)

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

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

Parameters
Name Description
request CancelOperationRequest

The request object that will be sent.

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

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

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

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

checkCreateServiceConnectionMapProgress(name)

checkCreateServiceConnectionMapProgress(name: string): Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionMap, protos.google.cloud.networkconnectivity.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's name of the ServiceConnectionMap. ex.
   *  projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  Optional. Resource ID
   *  (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionMaps/foo')
   *  See https://google.aip.dev/122#resource-id-segments
   *  Unique per location.
   *  If one is not provided, one will be generated.
   */
  // const serviceConnectionMapId = 'abc123'
  /**
   *  Required. Initial values for a new ServiceConnectionMaps
   */
  // const serviceConnectionMap = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callCreateServiceConnectionMap();

checkCreateServiceConnectionPolicyProgress(name)

checkCreateServiceConnectionPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionPolicy, protos.google.cloud.networkconnectivity.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's name of the ServiceConnectionPolicy. ex.
   *  projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  Optional. Resource ID
   *  (i.e. 'foo' in
   *  '[...]/projects/p/locations/l/serviceConnectionPolicies/foo') See
   *  https://google.aip.dev/122#resource-id-segments Unique per location.
   */
  // const serviceConnectionPolicyId = 'abc123'
  /**
   *  Required. Initial values for a new ServiceConnectionPolicies
   */
  // const serviceConnectionPolicy = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callCreateServiceConnectionPolicy();

checkCreateServiceConnectionTokenProgress(name)

checkCreateServiceConnectionTokenProgress(name: string): Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionToken, protos.google.cloud.networkconnectivity.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionToken, protos.google.cloud.networkconnectivity.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's name of the ServiceConnectionToken. ex.
   *  projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  Optional. Resource ID
   *  (i.e. 'foo' in '[...]/projects/p/locations/l/ServiceConnectionTokens/foo')
   *  See https://google.aip.dev/122#resource-id-segments
   *  Unique per location.
   *  If one is not provided, one will be generated.
   */
  // const serviceConnectionTokenId = 'abc123'
  /**
   *  Required. Initial values for a new ServiceConnectionTokens
   */
  // const serviceConnectionToken = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callCreateServiceConnectionToken();

checkDeleteServiceClassProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkconnectivity.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 name of the ServiceClass to delete.
   */
  // 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 will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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'
  /**
   *  Optional. The etag is computed by the server, and may be sent on update and
   *  delete requests to ensure the client has an up-to-date value before
   *  proceeding.
   */
  // const etag = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callDeleteServiceClass();

checkDeleteServiceConnectionMapProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkconnectivity.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 name of the ServiceConnectionMap to delete.
   */
  // 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 will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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'
  /**
   *  Optional. The etag is computed by the server, and may be sent on update and
   *  delete requests to ensure the client has an up-to-date value before
   *  proceeding.
   */
  // const etag = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callDeleteServiceConnectionMap();

checkDeleteServiceConnectionPolicyProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkconnectivity.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 name of the ServiceConnectionPolicy to delete.
   */
  // 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 will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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'
  /**
   *  Optional. The etag is computed by the server, and may be sent on update and
   *  delete requests to ensure the client has an up-to-date value before
   *  proceeding.
   */
  // const etag = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callDeleteServiceConnectionPolicy();

checkDeleteServiceConnectionTokenProgress(name)

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

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networkconnectivity.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 name of the ServiceConnectionToken to delete.
   */
  // 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 will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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'
  /**
   *  Optional. The etag is computed by the server, and may be sent on update and
   *  delete requests to ensure the client has an up-to-date value before
   *  proceeding.
   */
  // const etag = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callDeleteServiceConnectionToken();

checkUpdateServiceClassProgress(name)

checkUpdateServiceClassProgress(name: string): Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceClass, protos.google.cloud.networkconnectivity.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceClass, protos.google.cloud.networkconnectivity.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
   *  ServiceClass 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. New values to be patched into the resource.
   */
  // const serviceClass = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

  async function callUpdateServiceClass() {
    // Construct request
    const request = {
      serviceClass,
    };

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

  callUpdateServiceClass();

checkUpdateServiceConnectionMapProgress(name)

checkUpdateServiceConnectionMapProgress(name: string): Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionMap, protos.google.cloud.networkconnectivity.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
   *  ServiceConnectionMap 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. New values to be patched into the resource.
   */
  // const serviceConnectionMap = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

  async function callUpdateServiceConnectionMap() {
    // Construct request
    const request = {
      serviceConnectionMap,
    };

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

  callUpdateServiceConnectionMap();

checkUpdateServiceConnectionPolicyProgress(name)

checkUpdateServiceConnectionPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.networkconnectivity.v1.ServiceConnectionPolicy, protos.google.cloud.networkconnectivity.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
   *  ServiceConnectionPolicy 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. New values to be patched into the resource.
   */
  // const serviceConnectionPolicy = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

  async function callUpdateServiceConnectionPolicy() {
    // Construct request
    const request = {
      serviceConnectionPolicy,
    };

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

  callUpdateServiceConnectionPolicy();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

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

Returns
Type Description
Promise<void>

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

createServiceConnectionMap(request, options)

createServiceConnectionMap(request?: protos.google.cloud.networkconnectivity.v1.ICreateServiceConnectionMapRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new ServiceConnectionMap in a given project and location.

Parameters
Name Description
request ICreateServiceConnectionMapRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.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's name of the ServiceConnectionMap. ex.
   *  projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  Optional. Resource ID
   *  (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionMaps/foo')
   *  See https://google.aip.dev/122#resource-id-segments
   *  Unique per location.
   *  If one is not provided, one will be generated.
   */
  // const serviceConnectionMapId = 'abc123'
  /**
   *  Required. Initial values for a new ServiceConnectionMaps
   */
  // const serviceConnectionMap = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callCreateServiceConnectionMap();

createServiceConnectionMap(request, options, callback)

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

createServiceConnectionMap(request, callback)

createServiceConnectionMap(request: protos.google.cloud.networkconnectivity.v1.ICreateServiceConnectionMapRequest, callback: Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateServiceConnectionMapRequest
callback Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createServiceConnectionPolicy(request, options)

createServiceConnectionPolicy(request?: protos.google.cloud.networkconnectivity.v1.ICreateServiceConnectionPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new ServiceConnectionPolicy in a given project and location.

Parameters
Name Description
request ICreateServiceConnectionPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.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's name of the ServiceConnectionPolicy. ex.
   *  projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  Optional. Resource ID
   *  (i.e. 'foo' in
   *  '[...]/projects/p/locations/l/serviceConnectionPolicies/foo') See
   *  https://google.aip.dev/122#resource-id-segments Unique per location.
   */
  // const serviceConnectionPolicyId = 'abc123'
  /**
   *  Required. Initial values for a new ServiceConnectionPolicies
   */
  // const serviceConnectionPolicy = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callCreateServiceConnectionPolicy();

createServiceConnectionPolicy(request, options, callback)

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

createServiceConnectionPolicy(request, callback)

createServiceConnectionPolicy(request: protos.google.cloud.networkconnectivity.v1.ICreateServiceConnectionPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateServiceConnectionPolicyRequest
callback Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createServiceConnectionToken(request, options)

createServiceConnectionToken(request?: protos.google.cloud.networkconnectivity.v1.ICreateServiceConnectionTokenRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new ServiceConnectionToken in a given project and location.

Parameters
Name Description
request ICreateServiceConnectionTokenRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken, protos.google.cloud.networkconnectivity.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's name of the ServiceConnectionToken. ex.
   *  projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  Optional. Resource ID
   *  (i.e. 'foo' in '[...]/projects/p/locations/l/ServiceConnectionTokens/foo')
   *  See https://google.aip.dev/122#resource-id-segments
   *  Unique per location.
   *  If one is not provided, one will be generated.
   */
  // const serviceConnectionTokenId = 'abc123'
  /**
   *  Required. Initial values for a new ServiceConnectionTokens
   */
  // const serviceConnectionToken = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callCreateServiceConnectionToken();

createServiceConnectionToken(request, options, callback)

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

createServiceConnectionToken(request, callback)

createServiceConnectionToken(request: protos.google.cloud.networkconnectivity.v1.ICreateServiceConnectionTokenRequest, callback: Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateServiceConnectionTokenRequest
callback Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteOperation(request, optionsOrCallback, callback)

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

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

Parameters
Name Description
request DeleteOperationRequest

The request object that will be sent.

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

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

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

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

deleteServiceClass(request, options)

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

Deletes a single ServiceClass.

Parameters
Name Description
request IDeleteServiceClassRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkconnectivity.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 name of the ServiceClass to delete.
   */
  // 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 will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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'
  /**
   *  Optional. The etag is computed by the server, and may be sent on update and
   *  delete requests to ensure the client has an up-to-date value before
   *  proceeding.
   */
  // const etag = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callDeleteServiceClass();

deleteServiceClass(request, options, callback)

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

deleteServiceClass(request, callback)

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

deleteServiceConnectionMap(request, options)

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

Deletes a single ServiceConnectionMap.

Parameters
Name Description
request IDeleteServiceConnectionMapRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkconnectivity.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 name of the ServiceConnectionMap to delete.
   */
  // 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 will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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'
  /**
   *  Optional. The etag is computed by the server, and may be sent on update and
   *  delete requests to ensure the client has an up-to-date value before
   *  proceeding.
   */
  // const etag = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callDeleteServiceConnectionMap();

deleteServiceConnectionMap(request, options, callback)

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

deleteServiceConnectionMap(request, callback)

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

deleteServiceConnectionPolicy(request, options)

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

Deletes a single ServiceConnectionPolicy.

Parameters
Name Description
request IDeleteServiceConnectionPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkconnectivity.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 name of the ServiceConnectionPolicy to delete.
   */
  // 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 will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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'
  /**
   *  Optional. The etag is computed by the server, and may be sent on update and
   *  delete requests to ensure the client has an up-to-date value before
   *  proceeding.
   */
  // const etag = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callDeleteServiceConnectionPolicy();

deleteServiceConnectionPolicy(request, options, callback)

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

deleteServiceConnectionPolicy(request, callback)

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

deleteServiceConnectionToken(request, options)

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

Deletes a single ServiceConnectionToken.

Parameters
Name Description
request IDeleteServiceConnectionTokenRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networkconnectivity.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 name of the ServiceConnectionToken to delete.
   */
  // 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 will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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'
  /**
   *  Optional. The etag is computed by the server, and may be sent on update and
   *  delete requests to ensure the client has an up-to-date value before
   *  proceeding.
   */
  // const etag = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callDeleteServiceConnectionToken();

deleteServiceConnectionToken(request, options, callback)

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

deleteServiceConnectionToken(request, callback)

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

destinationPath(project, location, multicloudDataTransferConfig, destination)

destinationPath(project: string, location: string, multicloudDataTransferConfig: string, destination: string): string;

Return a fully-qualified destination resource name string.

Parameters
Name Description
project string
location string
multicloudDataTransferConfig string
destination string
Returns
Type Description
string

{string} Resource name string.

getIamPolicy(request, options, callback)

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

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

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

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing .

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

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

getLocation(request, options, callback)

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

Gets information about a location.

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

The request object that will be sent.

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

Call options. See CallOptions for more details.

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

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

Example

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

getOperation(request, optionsOrCallback, callback)

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

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

Parameters
Name Description
request GetOperationRequest

The request object that will be sent.

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

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

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

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

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

getProjectId()

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

getProjectId(callback)

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

getServiceClass(request, options)

getServiceClass(request?: protos.google.cloud.networkconnectivity.v1.IGetServiceClassRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkconnectivity.v1.IServiceClass,
        protos.google.cloud.networkconnectivity.v1.IGetServiceClassRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single ServiceClass.

Parameters
Name Description
request IGetServiceClassRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.networkconnectivity.v1.IServiceClass, protos.google.cloud.networkconnectivity.v1.IGetServiceClassRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ServiceClass. 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. Name of the ServiceClass to get.
   */
  // const name = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

    // Run request
    const response = await networkconnectivityClient.getServiceClass(request);
    console.log(response);
  }

  callGetServiceClass();

getServiceClass(request, options, callback)

getServiceClass(request: protos.google.cloud.networkconnectivity.v1.IGetServiceClassRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkconnectivity.v1.IServiceClass, protos.google.cloud.networkconnectivity.v1.IGetServiceClassRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetServiceClassRequest
options CallOptions
callback Callback<protos.google.cloud.networkconnectivity.v1.IServiceClass, protos.google.cloud.networkconnectivity.v1.IGetServiceClassRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getServiceClass(request, callback)

getServiceClass(request: protos.google.cloud.networkconnectivity.v1.IGetServiceClassRequest, callback: Callback<protos.google.cloud.networkconnectivity.v1.IServiceClass, protos.google.cloud.networkconnectivity.v1.IGetServiceClassRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetServiceClassRequest
callback Callback<protos.google.cloud.networkconnectivity.v1.IServiceClass, protos.google.cloud.networkconnectivity.v1.IGetServiceClassRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getServiceConnectionMap(request, options)

getServiceConnectionMap(request?: protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionMapRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap,
        protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionMapRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single ServiceConnectionMap.

Parameters
Name Description
request IGetServiceConnectionMapRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionMapRequest | 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. Name of the ServiceConnectionMap to get.
   */
  // const name = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

    // Run request
    const response = await networkconnectivityClient.getServiceConnectionMap(request);
    console.log(response);
  }

  callGetServiceConnectionMap();

getServiceConnectionMap(request, options, callback)

getServiceConnectionMap(request: protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionMapRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetServiceConnectionMapRequest
options CallOptions
callback Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionMapRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getServiceConnectionMap(request, callback)

getServiceConnectionMap(request: protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionMapRequest, callback: Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetServiceConnectionMapRequest
callback Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionMapRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getServiceConnectionPolicy(request, options)

getServiceConnectionPolicy(request?: protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy,
        protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionPolicyRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single ServiceConnectionPolicy.

Parameters
Name Description
request IGetServiceConnectionPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionPolicyRequest | 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. Name of the ServiceConnectionPolicy to get.
   */
  // const name = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

    // Run request
    const response = await networkconnectivityClient.getServiceConnectionPolicy(request);
    console.log(response);
  }

  callGetServiceConnectionPolicy();

getServiceConnectionPolicy(request, options, callback)

getServiceConnectionPolicy(request: protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetServiceConnectionPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getServiceConnectionPolicy(request, callback)

getServiceConnectionPolicy(request: protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionPolicyRequest, callback: Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetServiceConnectionPolicyRequest
callback Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getServiceConnectionToken(request, options)

getServiceConnectionToken(request?: protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionTokenRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken,
        protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionTokenRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single ServiceConnectionToken.

Parameters
Name Description
request IGetServiceConnectionTokenRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionTokenRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ServiceConnectionToken. 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. Name of the ServiceConnectionToken to get.
   */
  // const name = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

    // Run request
    const response = await networkconnectivityClient.getServiceConnectionToken(request);
    console.log(response);
  }

  callGetServiceConnectionToken();

getServiceConnectionToken(request, options, callback)

getServiceConnectionToken(request: protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionTokenRequest, options: CallOptions, callback: Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionTokenRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetServiceConnectionTokenRequest
options CallOptions
callback Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionTokenRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getServiceConnectionToken(request, callback)

getServiceConnectionToken(request: protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionTokenRequest, callback: Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionTokenRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetServiceConnectionTokenRequest
callback Callback<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken, protos.google.cloud.networkconnectivity.v1.IGetServiceConnectionTokenRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

groupPath(project, hub, group)

groupPath(project: string, hub: string, group: string): string;

Return a fully-qualified group resource name string.

Parameters
Name Description
project string
hub string
group string
Returns
Type Description
string

{string} Resource name string.

hubPath(project, hub)

hubPath(project: string, hub: string): string;

Return a fully-qualified hub resource name string.

Parameters
Name Description
project string
hub string
Returns
Type Description
string

{string} Resource name string.

hubRoutePath(project, hub, routeTable, route)

hubRoutePath(project: string, hub: string, routeTable: string, route: string): string;

Return a fully-qualified hubRoute resource name string.

Parameters
Name Description
project string
hub string
routeTable string
route string
Returns
Type Description
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
Type Description
Promise<{ [name: string]: Function; }>

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

internalRangePath(project, location, internalRange)

internalRangePath(project: string, location: string, internalRange: string): string;

Return a fully-qualified internalRange resource name string.

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

{string} Resource name string.

listLocationsAsync(request, options)

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

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

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

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

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

listOperationsAsync(request, options)

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

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

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

Parameters
Name Description
request ListOperationsRequest

The request object that will be sent.

options CallOptions

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

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

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

Example

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

listServiceClasses(request, options)

listServiceClasses(request?: protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkconnectivity.v1.IServiceClass[],
        protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest | null,
        protos.google.cloud.networkconnectivity.v1.IListServiceClassesResponse
    ]>;

Lists ServiceClasses in a given project and location.

Parameters
Name Description
request IListServiceClassesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.networkconnectivity.v1.IServiceClass[], protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest | null, protos.google.cloud.networkconnectivity.v1.IListServiceClassesResponse ]>

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

listServiceClasses(request, options, callback)

listServiceClasses(request: protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest, protos.google.cloud.networkconnectivity.v1.IListServiceClassesResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceClass>): void;
Parameters
Name Description
request IListServiceClassesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest, protos.google.cloud.networkconnectivity.v1.IListServiceClassesResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceClass>
Returns
Type Description
void

listServiceClasses(request, callback)

listServiceClasses(request: protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest, callback: PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest, protos.google.cloud.networkconnectivity.v1.IListServiceClassesResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceClass>): void;
Parameters
Name Description
request IListServiceClassesRequest
callback PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest, protos.google.cloud.networkconnectivity.v1.IListServiceClassesResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceClass>
Returns
Type Description
void

listServiceClassesAsync(request, options)

listServiceClassesAsync(request?: protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkconnectivity.v1.IServiceClass>;

Equivalent to listServiceClasses, but returns an iterable object.

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

Parameters
Name Description
request IListServiceClassesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.networkconnectivity.v1.IServiceClass>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ServiceClass. 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 parent resource's name. ex. projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of results per page that should be returned.
   */
  // const pageSize = 1234
  /**
   *  The page token.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter expression that filters the results listed in the response.
   */
  // const filter = 'abc123'
  /**
   *  Sort the results by a certain order.
   */
  // const orderBy = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callListServiceClasses();

listServiceClassesStream(request, options)

listServiceClassesStream(request?: protos.google.cloud.networkconnectivity.v1.IListServiceClassesRequest, options?: CallOptions): Transform;

Equivalent to listServiceClasses, but returns a NodeJS Stream object.

Parameters
Name Description
request IListServiceClassesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing ServiceClass 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 listServiceClassesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listServiceConnectionMaps(request, options)

listServiceConnectionMaps(request?: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap[],
        protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest | null,
        protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsResponse
    ]>;

Lists ServiceConnectionMaps in a given project and location.

Parameters
Name Description
request IListServiceConnectionMapsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap[], protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest | null, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsResponse ]>

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

listServiceConnectionMaps(request, options, callback)

listServiceConnectionMaps(request: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap>): void;
Parameters
Name Description
request IListServiceConnectionMapsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap>
Returns
Type Description
void

listServiceConnectionMaps(request, callback)

listServiceConnectionMaps(request: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest, callback: PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap>): void;
Parameters
Name Description
request IListServiceConnectionMapsRequest
callback PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap>
Returns
Type Description
void

listServiceConnectionMapsAsync(request, options)

listServiceConnectionMapsAsync(request?: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap>;

Equivalent to listServiceConnectionMaps, but returns an iterable object.

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

Parameters
Name Description
request IListServiceConnectionMapsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap>

{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 parent resource's name. ex. projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of results per page that should be returned.
   */
  // const pageSize = 1234
  /**
   *  The page token.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter expression that filters the results listed in the response.
   */
  // const filter = 'abc123'
  /**
   *  Sort the results by a certain order.
   */
  // const orderBy = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callListServiceConnectionMaps();

listServiceConnectionMapsStream(request, options)

listServiceConnectionMapsStream(request?: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionMapsRequest, options?: CallOptions): Transform;

Equivalent to listServiceConnectionMaps, but returns a NodeJS Stream object.

Parameters
Name Description
request IListServiceConnectionMapsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

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

listServiceConnectionPolicies(request, options)

listServiceConnectionPolicies(request?: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy[],
        protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest | null,
        protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesResponse
    ]>;

Lists ServiceConnectionPolicies in a given project and location.

Parameters
Name Description
request IListServiceConnectionPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy[], protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest | null, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesResponse ]>

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

listServiceConnectionPolicies(request, options, callback)

listServiceConnectionPolicies(request: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy>): void;
Parameters
Name Description
request IListServiceConnectionPoliciesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy>
Returns
Type Description
void

listServiceConnectionPolicies(request, callback)

listServiceConnectionPolicies(request: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest, callback: PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy>): void;
Parameters
Name Description
request IListServiceConnectionPoliciesRequest
callback PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy>
Returns
Type Description
void

listServiceConnectionPoliciesAsync(request, options)

listServiceConnectionPoliciesAsync(request?: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy>;

Equivalent to listServiceConnectionPolicies, but returns an iterable object.

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

Parameters
Name Description
request IListServiceConnectionPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy>

{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 parent resource's name. ex. projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of results per page that should be returned.
   */
  // const pageSize = 1234
  /**
   *  The page token.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter expression that filters the results listed in the response.
   */
  // const filter = 'abc123'
  /**
   *  Sort the results by a certain order.
   */
  // const orderBy = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callListServiceConnectionPolicies();

listServiceConnectionPoliciesStream(request, options)

listServiceConnectionPoliciesStream(request?: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionPoliciesRequest, options?: CallOptions): Transform;

Equivalent to listServiceConnectionPolicies, but returns a NodeJS Stream object.

Parameters
Name Description
request IListServiceConnectionPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

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

listServiceConnectionTokens(request, options)

listServiceConnectionTokens(request?: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken[],
        protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest | null,
        protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensResponse
    ]>;

Lists ServiceConnectionTokens in a given project and location.

Parameters
Name Description
request IListServiceConnectionTokensRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken[], protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest | null, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensResponse ]>

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

listServiceConnectionTokens(request, options, callback)

listServiceConnectionTokens(request: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken>): void;
Parameters
Name Description
request IListServiceConnectionTokensRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken>
Returns
Type Description
void

listServiceConnectionTokens(request, callback)

listServiceConnectionTokens(request: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest, callback: PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken>): void;
Parameters
Name Description
request IListServiceConnectionTokensRequest
callback PaginationCallback<protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest, protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensResponse | null | undefined, protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken>
Returns
Type Description
void

listServiceConnectionTokensAsync(request, options)

listServiceConnectionTokensAsync(request?: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken>;

Equivalent to listServiceConnectionTokens, but returns an iterable object.

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

Parameters
Name Description
request IListServiceConnectionTokensRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.networkconnectivity.v1.IServiceConnectionToken>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ServiceConnectionToken. 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 parent resource's name. ex. projects/123/locations/us-east1
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of results per page that should be returned.
   */
  // const pageSize = 1234
  /**
   *  The page token.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter expression that filters the results listed in the response.
   */
  // const filter = 'abc123'
  /**
   *  Sort the results by a certain order.
   */
  // const orderBy = 'abc123'

  // Imports the Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

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

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

  callListServiceConnectionTokens();

listServiceConnectionTokensStream(request, options)

listServiceConnectionTokensStream(request?: protos.google.cloud.networkconnectivity.v1.IListServiceConnectionTokensRequest, options?: CallOptions): Transform;

Equivalent to listServiceConnectionTokens, but returns a NodeJS Stream object.

Parameters
Name Description
request IListServiceConnectionTokensRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing ServiceConnectionToken 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 listServiceConnectionTokensAsync() 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
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

matchDestinationFromDestinationName(destinationName)

matchDestinationFromDestinationName(destinationName: string): string | number;

Parse the destination from Destination resource.

Parameter
Name Description
destinationName string

A fully-qualified path representing Destination resource.

Returns
Type Description
string | number

{string} A string representing the destination.

matchGroupFromGroupName(groupName)

matchGroupFromGroupName(groupName: string): string | number;

Parse the group from Group resource.

Parameter
Name Description
groupName string

A fully-qualified path representing Group resource.

Returns
Type Description
string | number

{string} A string representing the group.

matchHubFromGroupName(groupName)

matchHubFromGroupName(groupName: string): string | number;

Parse the hub from Group resource.

Parameter
Name Description
groupName string

A fully-qualified path representing Group resource.

Returns
Type Description
string | number

{string} A string representing the hub.

matchHubFromHubName(hubName)

matchHubFromHubName(hubName: string): string | number;

Parse the hub from Hub resource.

Parameter
Name Description
hubName string

A fully-qualified path representing Hub resource.

Returns
Type Description
string | number

{string} A string representing the hub.

matchHubFromHubRouteName(hubRouteName)

matchHubFromHubRouteName(hubRouteName: string): string | number;

Parse the hub from HubRoute resource.

Parameter
Name Description
hubRouteName string

A fully-qualified path representing HubRoute resource.

Returns
Type Description
string | number

{string} A string representing the hub.

matchHubFromRouteTableName(routeTableName)

matchHubFromRouteTableName(routeTableName: string): string | number;

Parse the hub from RouteTable resource.

Parameter
Name Description
routeTableName string

A fully-qualified path representing RouteTable resource.

Returns
Type Description
string | number

{string} A string representing the hub.

matchInternalRangeFromInternalRangeName(internalRangeName)

matchInternalRangeFromInternalRangeName(internalRangeName: string): string | number;

Parse the internal_range from InternalRange resource.

Parameter
Name Description
internalRangeName string

A fully-qualified path representing InternalRange resource.

Returns
Type Description
string | number

{string} A string representing the internal_range.

matchLocationFromDestinationName(destinationName)

matchLocationFromDestinationName(destinationName: string): string | number;

Parse the location from Destination resource.

Parameter
Name Description
destinationName string

A fully-qualified path representing Destination resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromInternalRangeName(internalRangeName)

matchLocationFromInternalRangeName(internalRangeName: string): string | number;

Parse the location from InternalRange resource.

Parameter
Name Description
internalRangeName string

A fully-qualified path representing InternalRange resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromMulticloudDataTransferConfigName(multicloudDataTransferConfigName)

matchLocationFromMulticloudDataTransferConfigName(multicloudDataTransferConfigName: string): string | number;

Parse the location from MulticloudDataTransferConfig resource.

Parameter
Name Description
multicloudDataTransferConfigName string

A fully-qualified path representing MulticloudDataTransferConfig resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromMulticloudDataTransferSupportedServiceName(multicloudDataTransferSupportedServiceName)

matchLocationFromMulticloudDataTransferSupportedServiceName(multicloudDataTransferSupportedServiceName: string): string | number;

Parse the location from MulticloudDataTransferSupportedService resource.

Parameter
Name Description
multicloudDataTransferSupportedServiceName string

A fully-qualified path representing MulticloudDataTransferSupportedService resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromServiceClassName(serviceClassName)

matchLocationFromServiceClassName(serviceClassName: string): string | number;

Parse the location from ServiceClass resource.

Parameter
Name Description
serviceClassName string

A fully-qualified path representing ServiceClass resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromServiceConnectionMapName(serviceConnectionMapName)

matchLocationFromServiceConnectionMapName(serviceConnectionMapName: string): string | number;

Parse the location from ServiceConnectionMap resource.

Parameter
Name Description
serviceConnectionMapName string

A fully-qualified path representing ServiceConnectionMap resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromServiceConnectionPolicyName(serviceConnectionPolicyName)

matchLocationFromServiceConnectionPolicyName(serviceConnectionPolicyName: string): string | number;

Parse the location from ServiceConnectionPolicy resource.

Parameter
Name Description
serviceConnectionPolicyName string

A fully-qualified path representing ServiceConnectionPolicy resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromServiceConnectionTokenName(serviceConnectionTokenName)

matchLocationFromServiceConnectionTokenName(serviceConnectionTokenName: string): string | number;

Parse the location from ServiceConnectionToken resource.

Parameter
Name Description
serviceConnectionTokenName string

A fully-qualified path representing ServiceConnectionToken resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromSpokeName(spokeName)

matchLocationFromSpokeName(spokeName: string): string | number;

Parse the location from Spoke resource.

Parameter
Name Description
spokeName string

A fully-qualified path representing Spoke resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchMulticloudDataTransferConfigFromDestinationName(destinationName)

matchMulticloudDataTransferConfigFromDestinationName(destinationName: string): string | number;

Parse the multicloud_data_transfer_config from Destination resource.

Parameter
Name Description
destinationName string

A fully-qualified path representing Destination resource.

Returns
Type Description
string | number

{string} A string representing the multicloud_data_transfer_config.

matchMulticloudDataTransferConfigFromMulticloudDataTransferConfigName(multicloudDataTransferConfigName)

matchMulticloudDataTransferConfigFromMulticloudDataTransferConfigName(multicloudDataTransferConfigName: string): string | number;

Parse the multicloud_data_transfer_config from MulticloudDataTransferConfig resource.

Parameter
Name Description
multicloudDataTransferConfigName string

A fully-qualified path representing MulticloudDataTransferConfig resource.

Returns
Type Description
string | number

{string} A string representing the multicloud_data_transfer_config.

matchMulticloudDataTransferSupportedServiceFromMulticloudDataTransferSupportedServiceName(multicloudDataTransferSupportedServiceName)

matchMulticloudDataTransferSupportedServiceFromMulticloudDataTransferSupportedServiceName(multicloudDataTransferSupportedServiceName: string): string | number;

Parse the multicloud_data_transfer_supported_service from MulticloudDataTransferSupportedService resource.

Parameter
Name Description
multicloudDataTransferSupportedServiceName string

A fully-qualified path representing MulticloudDataTransferSupportedService resource.

Returns
Type Description
string | number

{string} A string representing the multicloud_data_transfer_supported_service.

matchPolicyBasedRouteFromPolicyBasedRouteName(policyBasedRouteName)

matchPolicyBasedRouteFromPolicyBasedRouteName(policyBasedRouteName: string): string | number;

Parse the policy_based_route from PolicyBasedRoute resource.

Parameter
Name Description
policyBasedRouteName string

A fully-qualified path representing PolicyBasedRoute resource.

Returns
Type Description
string | number

{string} A string representing the policy_based_route.

matchProjectFromDestinationName(destinationName)

matchProjectFromDestinationName(destinationName: string): string | number;

Parse the project from Destination resource.

Parameter
Name Description
destinationName string

A fully-qualified path representing Destination resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromGroupName(groupName)

matchProjectFromGroupName(groupName: string): string | number;

Parse the project from Group resource.

Parameter
Name Description
groupName string

A fully-qualified path representing Group resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromHubName(hubName)

matchProjectFromHubName(hubName: string): string | number;

Parse the project from Hub resource.

Parameter
Name Description
hubName string

A fully-qualified path representing Hub resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromHubRouteName(hubRouteName)

matchProjectFromHubRouteName(hubRouteName: string): string | number;

Parse the project from HubRoute resource.

Parameter
Name Description
hubRouteName string

A fully-qualified path representing HubRoute resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromInternalRangeName(internalRangeName)

matchProjectFromInternalRangeName(internalRangeName: string): string | number;

Parse the project from InternalRange resource.

Parameter
Name Description
internalRangeName string

A fully-qualified path representing InternalRange resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromMulticloudDataTransferConfigName(multicloudDataTransferConfigName)

matchProjectFromMulticloudDataTransferConfigName(multicloudDataTransferConfigName: string): string | number;

Parse the project from MulticloudDataTransferConfig resource.

Parameter
Name Description
multicloudDataTransferConfigName string

A fully-qualified path representing MulticloudDataTransferConfig resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromMulticloudDataTransferSupportedServiceName(multicloudDataTransferSupportedServiceName)

matchProjectFromMulticloudDataTransferSupportedServiceName(multicloudDataTransferSupportedServiceName: string): string | number;

Parse the project from MulticloudDataTransferSupportedService resource.

Parameter
Name Description
multicloudDataTransferSupportedServiceName string

A fully-qualified path representing MulticloudDataTransferSupportedService resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromNetworkName(networkName)

matchProjectFromNetworkName(networkName: string): string | number;

Parse the project from Network resource.

Parameter
Name Description
networkName string

A fully-qualified path representing Network resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromPolicyBasedRouteName(policyBasedRouteName)

matchProjectFromPolicyBasedRouteName(policyBasedRouteName: string): string | number;

Parse the project from PolicyBasedRoute resource.

Parameter
Name Description
policyBasedRouteName string

A fully-qualified path representing PolicyBasedRoute resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRouteTableName(routeTableName)

matchProjectFromRouteTableName(routeTableName: string): string | number;

Parse the project from RouteTable resource.

Parameter
Name Description
routeTableName string

A fully-qualified path representing RouteTable resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromServiceClassName(serviceClassName)

matchProjectFromServiceClassName(serviceClassName: string): string | number;

Parse the project from ServiceClass resource.

Parameter
Name Description
serviceClassName string

A fully-qualified path representing ServiceClass resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromServiceConnectionMapName(serviceConnectionMapName)

matchProjectFromServiceConnectionMapName(serviceConnectionMapName: string): string | number;

Parse the project from ServiceConnectionMap resource.

Parameter
Name Description
serviceConnectionMapName string

A fully-qualified path representing ServiceConnectionMap resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromServiceConnectionPolicyName(serviceConnectionPolicyName)

matchProjectFromServiceConnectionPolicyName(serviceConnectionPolicyName: string): string | number;

Parse the project from ServiceConnectionPolicy resource.

Parameter
Name Description
serviceConnectionPolicyName string

A fully-qualified path representing ServiceConnectionPolicy resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromServiceConnectionTokenName(serviceConnectionTokenName)

matchProjectFromServiceConnectionTokenName(serviceConnectionTokenName: string): string | number;

Parse the project from ServiceConnectionToken resource.

Parameter
Name Description
serviceConnectionTokenName string

A fully-qualified path representing ServiceConnectionToken resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromSpokeName(spokeName)

matchProjectFromSpokeName(spokeName: string): string | number;

Parse the project from Spoke resource.

Parameter
Name Description
spokeName string

A fully-qualified path representing Spoke resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchResourceIdFromNetworkName(networkName)

matchResourceIdFromNetworkName(networkName: string): string | number;

Parse the resource_id from Network resource.

Parameter
Name Description
networkName string

A fully-qualified path representing Network resource.

Returns
Type Description
string | number

{string} A string representing the resource_id.

matchRouteFromHubRouteName(hubRouteName)

matchRouteFromHubRouteName(hubRouteName: string): string | number;

Parse the route from HubRoute resource.

Parameter
Name Description
hubRouteName string

A fully-qualified path representing HubRoute resource.

Returns
Type Description
string | number

{string} A string representing the route.

matchRouteTableFromHubRouteName(hubRouteName)

matchRouteTableFromHubRouteName(hubRouteName: string): string | number;

Parse the route_table from HubRoute resource.

Parameter
Name Description
hubRouteName string

A fully-qualified path representing HubRoute resource.

Returns
Type Description
string | number

{string} A string representing the route_table.

matchRouteTableFromRouteTableName(routeTableName)

matchRouteTableFromRouteTableName(routeTableName: string): string | number;

Parse the route_table from RouteTable resource.

Parameter
Name Description
routeTableName string

A fully-qualified path representing RouteTable resource.

Returns
Type Description
string | number

{string} A string representing the route_table.

matchServiceClassFromServiceClassName(serviceClassName)

matchServiceClassFromServiceClassName(serviceClassName: string): string | number;

Parse the service_class from ServiceClass resource.

Parameter
Name Description
serviceClassName string

A fully-qualified path representing ServiceClass resource.

Returns
Type Description
string | number

{string} A string representing the service_class.

matchServiceConnectionMapFromServiceConnectionMapName(serviceConnectionMapName)

matchServiceConnectionMapFromServiceConnectionMapName(serviceConnectionMapName: string): string | number;

Parse the service_connection_map from ServiceConnectionMap resource.

Parameter
Name Description
serviceConnectionMapName string

A fully-qualified path representing ServiceConnectionMap resource.

Returns
Type Description
string | number

{string} A string representing the service_connection_map.

matchServiceConnectionPolicyFromServiceConnectionPolicyName(serviceConnectionPolicyName)

matchServiceConnectionPolicyFromServiceConnectionPolicyName(serviceConnectionPolicyName: string): string | number;

Parse the service_connection_policy from ServiceConnectionPolicy resource.

Parameter
Name Description
serviceConnectionPolicyName string

A fully-qualified path representing ServiceConnectionPolicy resource.

Returns
Type Description
string | number

{string} A string representing the service_connection_policy.

matchServiceConnectionTokenFromServiceConnectionTokenName(serviceConnectionTokenName)

matchServiceConnectionTokenFromServiceConnectionTokenName(serviceConnectionTokenName: string): string | number;

Parse the service_connection_token from ServiceConnectionToken resource.

Parameter
Name Description
serviceConnectionTokenName string

A fully-qualified path representing ServiceConnectionToken resource.

Returns
Type Description
string | number

{string} A string representing the service_connection_token.

matchSpokeFromSpokeName(spokeName)

matchSpokeFromSpokeName(spokeName: string): string | number;

Parse the spoke from Spoke resource.

Parameter
Name Description
spokeName string

A fully-qualified path representing Spoke resource.

Returns
Type Description
string | number

{string} A string representing the spoke.

multicloudDataTransferConfigPath(project, location, multicloudDataTransferConfig)

multicloudDataTransferConfigPath(project: string, location: string, multicloudDataTransferConfig: string): string;

Return a fully-qualified multicloudDataTransferConfig resource name string.

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

{string} Resource name string.

multicloudDataTransferSupportedServicePath(project, location, multicloudDataTransferSupportedService)

multicloudDataTransferSupportedServicePath(project: string, location: string, multicloudDataTransferSupportedService: string): string;

Return a fully-qualified multicloudDataTransferSupportedService resource name string.

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

{string} Resource name string.

networkPath(project, resourceId)

networkPath(project: string, resourceId: string): string;

Return a fully-qualified network resource name string.

Parameters
Name Description
project string
resourceId string
Returns
Type Description
string

{string} Resource name string.

policyBasedRoutePath(project, policyBasedRoute)

policyBasedRoutePath(project: string, policyBasedRoute: string): string;

Return a fully-qualified policyBasedRoute resource name string.

Parameters
Name Description
project string
policyBasedRoute string
Returns
Type Description
string

{string} Resource name string.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

routeTablePath(project, hub, routeTable)

routeTablePath(project: string, hub: string, routeTable: string): string;

Return a fully-qualified routeTable resource name string.

Parameters
Name Description
project string
hub string
routeTable string
Returns
Type Description
string

{string} Resource name string.

serviceClassPath(project, location, serviceClass)

serviceClassPath(project: string, location: string, serviceClass: string): string;

Return a fully-qualified serviceClass resource name string.

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

{string} Resource name string.

serviceConnectionMapPath(project, location, serviceConnectionMap)

serviceConnectionMapPath(project: string, location: string, serviceConnectionMap: string): string;

Return a fully-qualified serviceConnectionMap resource name string.

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

{string} Resource name string.

serviceConnectionPolicyPath(project, location, serviceConnectionPolicy)

serviceConnectionPolicyPath(project: string, location: string, serviceConnectionPolicy: string): string;

Return a fully-qualified serviceConnectionPolicy resource name string.

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

{string} Resource name string.

serviceConnectionTokenPath(project, location, serviceConnectionToken)

serviceConnectionTokenPath(project: string, location: string, serviceConnectionToken: string): string;

Return a fully-qualified serviceConnectionToken resource name string.

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

{string} Resource name string.

setIamPolicy(request, options, callback)

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

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

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

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

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing .

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

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

spokePath(project, location, spoke)

spokePath(project: string, location: string, spoke: string): string;

Return a fully-qualified spoke resource name string.

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

{string} Resource name string.

testIamPermissions(request, options, callback)

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

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

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

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

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing .

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

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

updateServiceClass(request, options)

updateServiceClass(request?: protos.google.cloud.networkconnectivity.v1.IUpdateServiceClassRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkconnectivity.v1.IServiceClass, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single ServiceClass.

Parameters
Name Description
request IUpdateServiceClassRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.networkconnectivity.v1.IServiceClass, protos.google.cloud.networkconnectivity.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
   *  ServiceClass 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. New values to be patched into the resource.
   */
  // const serviceClass = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

  async function callUpdateServiceClass() {
    // Construct request
    const request = {
      serviceClass,
    };

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

  callUpdateServiceClass();

updateServiceClass(request, options, callback)

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

updateServiceClass(request, callback)

updateServiceClass(request: protos.google.cloud.networkconnectivity.v1.IUpdateServiceClassRequest, callback: Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceClass, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateServiceClassRequest
callback Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceClass, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateServiceConnectionMap(request, options)

updateServiceConnectionMap(request?: protos.google.cloud.networkconnectivity.v1.IUpdateServiceConnectionMapRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single ServiceConnectionMap.

Parameters
Name Description
request IUpdateServiceConnectionMapRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.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
   *  ServiceConnectionMap 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. New values to be patched into the resource.
   */
  // const serviceConnectionMap = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

  async function callUpdateServiceConnectionMap() {
    // Construct request
    const request = {
      serviceConnectionMap,
    };

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

  callUpdateServiceConnectionMap();

updateServiceConnectionMap(request, options, callback)

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

updateServiceConnectionMap(request, callback)

updateServiceConnectionMap(request: protos.google.cloud.networkconnectivity.v1.IUpdateServiceConnectionMapRequest, callback: Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateServiceConnectionMapRequest
callback Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionMap, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateServiceConnectionPolicy(request, options)

updateServiceConnectionPolicy(request?: protos.google.cloud.networkconnectivity.v1.IUpdateServiceConnectionPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single ServiceConnectionPolicy.

Parameters
Name Description
request IUpdateServiceConnectionPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.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
   *  ServiceConnectionPolicy 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. New values to be patched into the resource.
   */
  // const serviceConnectionPolicy = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee 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, will ignore 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 Networkconnectivity library
  const {CrossNetworkAutomationServiceClient} = require('@google-cloud/network-connectivity').v1;

  // Instantiates a client
  const networkconnectivityClient = new CrossNetworkAutomationServiceClient();

  async function callUpdateServiceConnectionPolicy() {
    // Construct request
    const request = {
      serviceConnectionPolicy,
    };

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

  callUpdateServiceConnectionPolicy();

updateServiceConnectionPolicy(request, options, callback)

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

updateServiceConnectionPolicy(request, callback)

updateServiceConnectionPolicy(request: protos.google.cloud.networkconnectivity.v1.IUpdateServiceConnectionPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateServiceConnectionPolicyRequest
callback Callback<LROperation<protos.google.cloud.networkconnectivity.v1.IServiceConnectionPolicy, protos.google.cloud.networkconnectivity.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void